Urban Terror Forums: scripts advice - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

scripts advice Rate Topic: -----

need some help with writing scripts

#1 User is offline   killspree Icon

  • Account: killspree
  • Main tag: ds`
  • Country:
  • Joined: 21-November 12
  • Posts: 310

Posted 21 November 2020 - 09:11 AM

Hi folks,

I'm trying to create some scripts and have looked at some shader files.
But, when I try to apply a decal for a crack in the floor I get ugly shadows on the entire brush.

I used this shader:


textures/myfolder/mytexture
{
// surfaceparm trans
polygonOffset
nomipmaps
nopicmip

{
map textures/myfolder/mytexture.tga
blendfunc filter
}
}

I also tried to apply this shader:



textures/myfolder/mytexture

{
surfaceparm trans
polygonOffset
nomipmaps
nopicmip

{
map textures/myfolder/mytexture.jpg
blendfunc filter
}

// {
// map textures/myfolder/mytexture.tga
// alphaFunc GE128
// depthwrite
// }
// {
// map $lightmap
// rgbGen identity
// blendFunc GL_DST_COLOR GL_ZERO
// depthFunc equal
// }

}

I have tried to replace the .jpg format on the second shader and tried to remove the double \ but this shader seems to only show the infamous texture that is shown when a texture is missing.

Lastly, I have put this shader on a manhole cover:


textures/myfolder/mytexture
{
qer_editorimage textures/myfolder/mytexture.tga
surfaceparm metalsteps
surfaceparm trans
surfaceparm alphashadow
surfaceparm playerclip
surfaceparm nonsolid
surfaceparm nomarks
cull none
nopicmip

{
map textures/myfolder/mytexture.tga
blendFunc GL_ONE GL_ZERO
alphaFunc GE128
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}

I have placed it just above the floor and it does work like a proper alpha masked image, but from a distance, you start to see a white line around the image.
I have tried to apply the first shader to the manhole cover and it does work but you can again see ugly shadow lines around them and obviously, you can see the stone floor through the steel manhole cover.

Am I better of just pasting the decals I want to use on floors on the textures in gimp or photoshop and only use decals on walls?




Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942