halo
12-19-2003, 12:26 AM
I have a dynamic light I am rendering as a decal on a wall in a second pass.
-The light texture should only increase the brightness of the texture on the wall, not darken it.
-The light should brighten the wall towards the full-bright color of the wall texture, NOT towards the white color of the light.
-The wall is actually darkened because I rendered a second pass with a lightmap. Lightmapped surfaces are full-bright, just textured with a dark lightmap. They are not effected by GL lights.
Right now I am using GL_SRC_COLOR,GL_ONE. This meets the first condition listed above, but it tends to gray-out the wall.
See how gray this is?
http://www.leadwerks.com/gl3.jpg
Here is a more visual display of what I am after.
Start with the texture:
http://www.leadwerks.com/help1.jpg
This is the lightmap:
http://www.leadwerks.com/help2.jpg
Texture+lightmap with multiplicative blending:
http://www.leadwerks.com/help4.jpg
This is the decal:
http://www.leadwerks.com/help3.jpg
This is the texture+lightmap+decal, as it is now:
http://www.leadwerks.com/help5.jpg
And here is what I actually want. The decal lightens the lightmap, so the original texture shows through with its correct colors:
http://www.leadwerks.com/help6.jpg
It's worth noting that the lightmap and decal are at very different resolutions, so altering the lightmap is not a good idea.
Thanks.
[This message has been edited by halo (edited 12-19-2003).]
-The light texture should only increase the brightness of the texture on the wall, not darken it.
-The light should brighten the wall towards the full-bright color of the wall texture, NOT towards the white color of the light.
-The wall is actually darkened because I rendered a second pass with a lightmap. Lightmapped surfaces are full-bright, just textured with a dark lightmap. They are not effected by GL lights.
Right now I am using GL_SRC_COLOR,GL_ONE. This meets the first condition listed above, but it tends to gray-out the wall.
See how gray this is?
http://www.leadwerks.com/gl3.jpg
Here is a more visual display of what I am after.
Start with the texture:
http://www.leadwerks.com/help1.jpg
This is the lightmap:
http://www.leadwerks.com/help2.jpg
Texture+lightmap with multiplicative blending:
http://www.leadwerks.com/help4.jpg
This is the decal:
http://www.leadwerks.com/help3.jpg
This is the texture+lightmap+decal, as it is now:
http://www.leadwerks.com/help5.jpg
And here is what I actually want. The decal lightens the lightmap, so the original texture shows through with its correct colors:
http://www.leadwerks.com/help6.jpg
It's worth noting that the lightmap and decal are at very different resolutions, so altering the lightmap is not a good idea.
Thanks.
[This message has been edited by halo (edited 12-19-2003).]