Shader problem...I think


(Occisor) #1

Ive made a custom grate transparent texture that works in the game and editor…except I want the grate to be shoot-through but I want it to clip players aswell. At the moment the tranparancy is working fine and I can shoot through it…problem is I fall through it when I walk over. The brush I am using is nodraw on 5 faces and the 6th face has the shader below applied to it…any ideas on what I am doing wrong?

textures/test/grate
{
cull disable
nomipmaps
nopicmip
surfaceparm nomarks
surfaceparm alphashadow
surfaceparm metalsteps
surfaceparm pointlight
surfaceparm trans
surfaceparm playerclip
implicitMask -
}


(SCDS_reyalP) #2

the nodraw on the other 5 faces is your problem, as it is nonsolid. Use playerclip instead. You might want to use clipmissile (and surfaceparm clipmissile in the grate shader) if you want it to stop nades and panzerfaust.

Player clipping is a content flag (as are several other things misleadingly called surfaceparm) meaning that there can only be one value of it for the whole brush. If different faces try to have different values, which one is used changes randomly between compiles.