clu Posted March 20, 2003 Share Posted March 20, 2003 Hey all Here's a pic of a transparent grate shader I made that's having some anti-aliasing or some other issues. It has this ugly white, halo/jaggy effect around the edges where it becomes transparent: http://www.jakekeating.com/pub/grate_problem/shot0001.jpg Anyone know how to get rid of this? My shader code follows: textures/colo/fence01_2sided { cull none qer_editorimage textures/colo/fence01.tga { map $lightmap alphaFunc GE128 } { map textures/colo/fence01 alphaFunc GE128 blendFunc GL_DST_COLOR GL_ZERO rgbGen identity } } My targa file is fine (no white things on edges), so I'm hoping theres a magic line of code I can add to feather the edges or something. Anyway, any help would be great. -clu Link to comment Share on other sites More sharing options...
Leslie Judge Posted March 20, 2003 Share Posted March 20, 2003 First of all I would delete the aplhaFunc from the lightmap stage. I use a grate with the following shader code: textures/twoofakind/floorgrate { qer_editorimage textures/doomgiver/floorgrate1 surfaceparm trans surfaceparm nomarks cull disable { map textures/doomgiver/floorgrate1 blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA rgbGen identity } { map $lightmap blendFunc GL_DST_COLOR GL_SRC_COLOR } } Maybe this helps to figure out something. Link to comment Share on other sites More sharing options...
clu Posted March 21, 2003 Author Share Posted March 21, 2003 Thanks for the response, Leslie. I don't know, maybe my alpha channel is messed up. I can't say I'm an expert with those. Here's what I get with your code: http://www.jakekeating.com/pub/grate_problem/shot0002.jpg If you're incredibly curious, I posted my targa file as well: http://www.jakekeating.com/pub/grate_problem/fence01.tga -clu Link to comment Share on other sites More sharing options...
clu Posted March 21, 2003 Author Share Posted March 21, 2003 OK. I think I'm almost there. I used your same code again, Leslie. This time I re-did my targa. Used a layer mask to make the alpha channel, and somehow it now works (almost). Now the only weird things are as follows: 1) The transparent areas of the grate appear slightly grey (instead of truley transparent): http://www.jakekeating.com/pub/grate_problem/shot0003.jpg 2) When looking through one grate to the other side, both grate textures seem to flicker a bit and kind of blink in and out. By the way, I am using a fully caulked brush with one face textured with the shader. -clu Link to comment Share on other sites More sharing options...
Leslie Judge Posted March 21, 2003 Share Posted March 21, 2003 It always seemed a little weird how the game engine displays the transparent textures. I got your TGA, and I'll make a few test with it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.