Skip to main content
gamedev.net
🔒 Locked

Simple lightmap headaches

Started by qpwoeiruty 5 replies 1.6k views
Lord_Evil
Lord_Evil
Might be a matter of render order. However, I guess there's no correct order since one light would "cut off" the other in either order.

You could try additive blending, i.e. using GL_ONE one both the source and the destination.
If I was helpful, feel free to rate me up ;)If I wasn't and you feel to rate me down, please let me know why!
BionicBytes
BionicBytes
Also - it might be worth trying to remove unwanted pixels by first using ALPHA testing before the blending stage.

For best results you really need to perform additive blending.
bzroom
bzroom
Try this for additive blending: glBlendFunc( GL_SRC_ALPHA, GL_ONE );

Is your texture an RGBA?

Are you using shaders by any chance?

Can you post a screen shot from the same vantage point of the 3rd, using the above blending function?
bzroom
bzroom
Well, you need a source alpha channel, 32 bit, to use glBlendFunc( GL_SRC_ALPHA, GL_ONE );

It's nearly impossible to see anything in your first two screen shots.
zedz
zedz
based on that ONE ONE screenshot, the bledning is not the problem,
it looks like a depth issue
use glDisable( GL_DEPTH_TEST ) with GL_ONE GL_ONE + it should work (it will not be correct though cause i assume u want to have depth in the scene, but it will show u that u were looking at the wrong cause)
zedz
zedz
if youve got it all setup correctly, it should just work
are u using glDepthFunc( GL_LEQUAL )

is the ground flat ie are all the dots on the same level plane, if so LEQUAL should work, u could perhaps try glDepthMask( GL_FALSE ) but thats not ideal

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.