- The spec allows it to be implementation-dependent (clicky) so the same values may give different results on different hardware.
- You may encounter floating point precision problems when moving between 16-bit and 24-bit depth buffers.
- The depth buffer is non-linear so the same values will give different results at different depths.
Polygon Offset Sucks
Polygon Offset Sucks
Another thing to not do:
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
you don't. you don't wanna make this guy angry
look at those eyes don't piss him off
or you can use stainmaps for decals which really suck for bullets and really obstruct appearances of floors. i'm glad that was only a short time novelty but it doesn't need polygon offset as it just touches the lightmap
also - could decals be rendered in a separate pass from the world which is calculated by z after the render to peel away from the obstructed decals but the rendering of the decals themselves don't use an offset but a depth check after they're made while calculating an offset?!! i don't know what the hell i'm saying
look at those eyes don't piss him off
or you can use stainmaps for decals which really suck for bullets and really obstruct appearances of floors. i'm glad that was only a short time novelty but it doesn't need polygon offset as it just touches the lightmap
also - could decals be rendered in a separate pass from the world which is calculated by z after the render to peel away from the obstructed decals but the rendering of the decals themselves don't use an offset but a depth check after they're made while calculating an offset?!! i don't know what the hell i'm saying
i should not be here
see? when you spend over $600 on the real deal, the slug RIVAl and pathATIc hardware are just small time. The ultra performance blazing at 1024x768 HIGH RESOLUTION with T-buffer and more game companies adopting Glide as the new industry standard... is why you should invest in TDFX today
i should not be here
Multipass is easy, GLQuake, Quake II and Q3A already do it without needing to use polygon offset and without any trouble (look at R_BlendLightmaps for example). Invariance guarantees that this will work just fine. The only trouble happens when you have co-planar polygons that don't use the same vertexes.
For decals you can just tweak the projection matrix to get the desired result. Even Microsoft's software implementation will allow that. A quick search on Google for "polygon offset alternatives" throws up quite a few interesting candidates too.
For decals you can just tweak the projection matrix to get the desired result. Even Microsoft's software implementation will allow that. A quick search on Google for "polygon offset alternatives" throws up quite a few interesting candidates too.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
Q3's clipped decals use polygon offset. Its a shader attribute to say 'push this nearer'.
But yeah, two polys drawn with the same vertex coords will have the exact same depth coords (different glsl/fixed-function might not!), which is how q3 gets away with the bulk of its multipass rendering.
Thus one way to do clipped decals is to use texture clamping and draw the decal the full size of each surface its superimposed upon (minecraft seems to do its blob shadows like this, for example).
Note that you do have to take care with your matricies. glLoadMatrix is more robust than recalculating the different matricies each time, I find...
But yeah, two polys drawn with the same vertex coords will have the exact same depth coords (different glsl/fixed-function might not!), which is how q3 gets away with the bulk of its multipass rendering.
Thus one way to do clipped decals is to use texture clamping and draw the decal the full size of each surface its superimposed upon (minecraft seems to do its blob shadows like this, for example).
Note that you do have to take care with your matricies. glLoadMatrix is more robust than recalculating the different matricies each time, I find...
ftransform guarantees invariance, but then again ftransform is also deprecated. (It might also be slower as it sends the vertex through the same calculations as fixed, which presumably has a lot of extra generic baggage attached.) Still handy though if you're happy to aim at a lower version of the spec.
If you're using GLSL at all I guess you really should be using it for everything.
If you're using GLSL at all I guess you really should be using it for everything.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
Yeah ftransform and fixed-function pipeline are deprecated together.
OK I will do this from now on. Duhh.Spike wrote:Thus one way to do clipped decals is to use texture clamping and draw the decal the full size of each surface its superimposed upon
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.