You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With vertex lighting, the wrong diffuse color is used for realtime lights. Instead of the basic diffuse texture, the result of multiplying the diffuse with the vertex color is used. This comes from the line diffuse *= var_Color; in lightMapping_fp.glsl. So dynamic lights are practically impossible to see on dimly lit vertex-lit surfaces such as parts of the station15 evergreen trees.
I guess it's structured this way because vertex lighting is a type of "rgbGen", at least in explicitly specified vertex lighting shaders where the syntax is rgbGen vertex. In principle, any rgbGen operation should be included in the diffuse. But obviously this is the wrong idea for vertex lighting, so we should try to detect the vertex lighting case and exclude that calculation from the diffuse used for lighting purposes. I guess the criteria for detecting vertex lighting can be rgbgen vertex + is bsp surface + no lightmap, in a lightmap stage.
The text was updated successfully, but these errors were encountered:
With vertex lighting, the wrong diffuse color is used for realtime lights. Instead of the basic diffuse texture, the result of multiplying the diffuse with the vertex color is used. This comes from the line
diffuse *= var_Color;
inlightMapping_fp.glsl
. So dynamic lights are practically impossible to see on dimly lit vertex-lit surfaces such as parts of the station15 evergreen trees.I guess it's structured this way because vertex lighting is a type of "rgbGen", at least in explicitly specified vertex lighting shaders where the syntax is
rgbGen vertex
. In principle, any rgbGen operation should be included in the diffuse. But obviously this is the wrong idea for vertex lighting, so we should try to detect the vertex lighting case and exclude that calculation from the diffuse used for lighting purposes. I guess the criteria for detecting vertex lighting can be rgbgen vertex + is bsp surface + no lightmap, in a lightmap stage.The text was updated successfully, but these errors were encountered: