This commit is contained in:
Nishi 2026-02-02 16:33:12 +09:00
commit 5210e22684
Signed by: nishi
GPG key ID: 27EF69B208EB9343
2 changed files with 4 additions and 0 deletions

Binary file not shown.

View file

@ -15,6 +15,10 @@ vec4 PhongShading(void)
vec3 N = normalize(vNrm);
vec3 L = normalize(gl_LightSource[0].position.xyz-vPos.xyz);
if(gl_LightSource[0].position.w < 0.5){
L = normalize(gl_LightSource[0].position.xyz);
}
vec4 ambient = gl_FrontLightProduct[0].ambient;
float dcoef = max(dot(L, N), 0.0);