modern@Posted: Thu May 05, 2005 9:33 pm :
I'm trying to use the global keyword "polygonoffset" to defeat z fighting in a decal, but it just turns the unmasked areas of my texture black. I have notice that polygonoffset is turned off in most [//polygonoffset] in all the textures/decal scripts. Do I take it that it simply does not work, or am I missing the point?

[dont ask me to post the script because it is exactly the same as the decal script but without the // before the "polygonoffset"]

http://www.planetdoom.com/modernhomes/



kat@Posted: Thu May 05, 2005 9:57 pm :
Doesn't work. You 'offset' decals physically by placing them 1 grid unit above the surface. There's probably a technical reason why the didn't use it and it'll most likely be something to do with the way textures blend in the final render to screen.



modern@Posted: Thu May 05, 2005 10:21 pm :
Yeah, I'm well aware of manually offsetting the surface be it patch or polygon by one unit [ imported geometry could be much closer], but the offset keyword is evidently quoted in many scripts so it must have worked at some point. I recon the reason for it being switched off is engine efficiency. The quuestion is can it be switched back on?



rich_is_bored@Posted: Fri May 06, 2005 1:26 am :
Maybe.

Get your hands on a copy of the SDK and do some grepping in search for "polygonoffset".

If you don't find it then you can't re-enable it.



SnoopJeDi@Posted: Fri May 06, 2005 1:33 am :
There are definitely results, but wouldn't we need access to the renderer code to actually reenable an effect like that? Bah, don't mind me, just letting you know there are some references to it (glext.h, material.h*, qgl.h, qgl_linked.h, qgl_enforce.h)

*- Probably the best place to start looking



rich_is_bored@Posted: Fri May 06, 2005 3:11 am :
That depends how they disabled it. There's a whole multitude of things they could have done.

They could have removed all related code completely in which case you'd see no results from a grep.

Or they could have removed a small section of code.

You wouldn't need access to renderer code unless that's where they disabled it.