From 65229be644504e6d3b15b65e2f9601abc3fc3f75 Mon Sep 17 00:00:00 2001 From: aGiser0 <12932593+agiser0@user.noreply.gitee.com> Date: Tue, 9 Apr 2024 03:09:01 +0000 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=85=89=E6=BA=90.html=E4=B8=AD?= =?UTF-8?q?=E5=85=89=E7=BA=BF=E6=96=B9=E5=90=91=E7=9A=84=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=9C=89=E8=AF=AF=EF=BC=9B=E5=85=89=E7=BA=BF=E6=96=B9=E5=90=91?= =?UTF-8?q?=20=3D=20=E7=82=B9=E5=85=89=E6=BA=90=E5=9D=90=E6=A0=87=20-=20?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E9=A1=B6=E7=82=B9=E5=9D=90=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: aGiser0 <12932593+agiser0@user.noreply.gitee.com> --- .../code/\347\202\271\345\205\211\346\272\220.html" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/15_\347\202\271\345\205\211\346\272\220/code/\347\202\271\345\205\211\346\272\220.html" "b/15_\347\202\271\345\205\211\346\272\220/code/\347\202\271\345\205\211\346\272\220.html" index c8304f4..7ea61e7 100644 --- "a/15_\347\202\271\345\205\211\346\272\220/code/\347\202\271\345\205\211\346\272\220.html" +++ "b/15_\347\202\271\345\205\211\346\272\220/code/\347\202\271\345\205\211\346\272\220.html" @@ -29,7 +29,7 @@ gl_Position = u_formMatrix * a_position; vec3 normal = normalize(vec3(u_NormalMatrix * a_Normal)); - vec3 lightDirection = normalize( vec3(gl_Position.xyz)-u_PointLightPosition ); + vec3 lightDirection = normalize( u_PointLightPosition-vec3(gl_Position.xyz) ); float nDotL = max(dot(lightDirection, normal), 0.0); vec3 diffuse = u_DiffuseLight * vec3(1.0,0,1.0)* nDotL; vec3 ambient = u_AmbientLight * vec3(1.0,0,1.0); -- Gitee