Advertisement

per-pixel attenuation

Started by August 22, 2004 09:18 AM
39 comments, last by vincoof 20 years, 3 months ago
Do changes in brightness occur rather smoothly, or does it look like flicker ?
it doesn't flicker, when change the current view with moving arround or looking arround sometimes the faces get darker suddenly, looks like the effect that happens when you apply GL lighting with wrong normals.
www.prsoftware.de
Advertisement
Quote: Original post by JazzD
it doesn't flicker, when change the current view with moving arround or looking arround sometimes the faces get darker suddenly, looks like the effect that happens when you apply GL lighting with wrong normals.

That sounds like it could be some left-over GL state, perhaps you're forgetting to unbind a texture or reset a vertex colour in one part and its spilling over into unwanted geometry? Changing your view can cause objects to be drawn in different orders and have this effect.
ahhh I got rid of it, it was caused by the Frustum culling since I also checked the Frustum everytime I drew a new light and sometimes the faces were not valid and so the blending wasn't correct. now it works :). still with 3 lights it gets slow hehe.
www.prsoftware.de
Lemme guess, the framerate is around three times slower ? :P
it's very low yea hehehe.
www.prsoftware.de
Advertisement
Quote: Original post by snisarenko
When you render a second pass, shouldn't you also turn on polygon offset to prevent z fighting? Just like when you render a decal.


How can i turn off polygon offset because i`m getting z-fighting
Quote: Original post by Undertaker
How can i turn off polygon offset because i`m getting z-fighting

Are you using position invariant vertex programs? If not try that first.
You should never let your fears become the boundaries of your dreams.
As a first note, are you rendering *exactly* the same geometry ?
The common mistake is to think the geometry is rendered at the same place but in fact is not. For instance if you're rendering bullet hits on a wall, you will experience Z-fighting if your bullet hits are smaller than the wall, even if both polygons are rendered eg at plane X=0.
Yes the z-fighting is for decals such as bullet holes and some overlap of surfaces (not the same size) rezulted from the csg-ing.

What are position invariant vertex programs ? :)

This topic is closed to new replies.

Advertisement