WS30 ultra shader - port ambient lighting fix
commit aca259acaccffbaf1cb264be423dda72c106150e Author: vs <vs2009@mail.com> Date: Sat Oct 23 22:55:56 2021 +1000 WS30 shaders: varying fix commit 91b194f6766d432206cb013d99e0a96cd34ff33b Author: vs <vs2009@mail.com> Date: Sat Oct 23 22:17:03 2021 +1000 WS30 ultra shader: port the ambient lighting fix.
This commit is contained in:
parent
c81870cff1
commit
63487bbe7b
3 changed files with 5 additions and 5 deletions
|
@ -140,7 +140,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
|
||||
|
|
|
@ -79,7 +79,7 @@ void main()
|
|||
|
||||
// this code is copied from default.vert
|
||||
|
||||
vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
||||
ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
||||
gl_Position = ftransform();
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
orthoTexCoord = orthophotoTexCoord;
|
||||
|
@ -226,7 +226,7 @@ else // the faster, full-day version without lightfields
|
|||
gl_FrontColor.rgb = constant_term.rgb; gl_FrontColor.a = 1.0;
|
||||
gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0;
|
||||
|
||||
setupShadows(gl_ModelViewMatrix * gl_Vertex);
|
||||
setupShadows(ecPosition);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ void main()
|
|||
|
||||
// this code is copied from default.vert
|
||||
|
||||
vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
||||
ecPosition = gl_ModelViewMatrix * gl_Vertex;
|
||||
gl_Position = ftransform();
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
orthoTexCoord = orthophotoTexCoord;
|
||||
|
@ -226,7 +226,7 @@ else // the faster, full-day version without lightfields
|
|||
gl_FrontColor.rgb = constant_term.rgb; gl_FrontColor.a = 1.0;
|
||||
gl_BackColor.rgb = constant_term.rgb; gl_BackColor.a = 0.0;
|
||||
|
||||
setupShadows(gl_ModelViewMatrix * gl_Vertex);
|
||||
setupShadows(ecPosition);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue