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?
Advertisement
Page 1 of 1
scripts advice
need some help with writing scripts
Page 1 of 1
1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users
Advertisement