WS30: Include ambient light in ALS fragment shader
Previously only the diffuse term was considered in the fragment shader, leading to very dark scenery and deep shadows. Now the ambient light term is also included making the scenery much closer to the way it should be lit.
This commit is contained in:
parent
0bce3c966f
commit
fc42ef3fe4
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ void main()
|
|||
vec4 mat_diffuse = texture(diffuseArray, index);
|
||||
vec4 mat_specular = texture(specularArray, index);
|
||||
|
||||
vec4 color = mat_diffuse * NdotL * gl_LightSource[0].diffuse;
|
||||
vec4 color = gl_Color + mat_diffuse * NdotL * gl_LightSource[0].diffuse;
|
||||
|
||||
// Testing code:
|
||||
// Use rlc even when looking up textures to recreate the extra performance hit
|
||||
|
|
Loading…
Add table
Reference in a new issue