I've been having a discussion with AlecMoody about adding lightmap functionality to my shader. It's not in there yet, but I'd like to do it. He asked for modulate 2x blending of lightmaps. As far as I understood, that goes like this:
Value from lightmap is sampled and ends up in between 0 and 1.
That value gets multiplied by 2.0, expanding the range to 0 - 2
That value then gets multiplied with say your diffuse texture.
Now what I want to understand is, what are the implications of doing this, since it essentially overbrights all the pixels that have lightmap values over 0.5 ? I always thought lightmaps should just go from not lit to fully lit 100%. Any multipliers are basically light intensity, so i guess dependant on what lights your lightmap was rendered with.
Anybody care to shed some light ?
Replies
While of course specular cannot be baked, say you have a bright torch next to a wall, you would get higher intensity values there.
you achieve more color richness this way.
If you really wanted to get fancy could you do some sort of adjustable tonal curve? That way you could control mid tone, shadow, and highlight contrast separately. I'm guessing the math and interface work for something like that would be pretty large.