Answer the question
In order to leave comments, you need to log in
When using lightmap, where does the information about the position of the light source come from?
Lightmaps just contain information about the intensity and "color" of light, right? Say, in a pixel shader, a color is extracted from a regular texture (let it be RGB(0.5, 0.4, 0.3)), then information is extracted from a lightmap (for example, RGB(0.7, 0.7, 0.7)), and then what? I am only familiar with the Blinn-Fong lighting model, but as far as I know, all lighting models need a normal and a vector that specifies the direction of the light. Where does this vector come from? Or is it simply neglected when using simple lightmaps? And if so, what happens next in the standard shader? Are the values just multiplied component by component?
I know that there are maps that bake directional information, but if they are not used, how does it work?
Answer the question
In order to leave comments, you need to log in
Lightmap is a way of generating textures that simulate lighting of your game environment. Lightmaps are baked during compiling (when you build lights) and are overlaid on top of geometry (bsp and custom static meshes) to simulate lighting and shadows.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question