From f56928d734602547ef2a7238848932cae83787ec Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sun, 10 Mar 2024 01:00:42 +0800 Subject: [PATCH] Fixed bug about SunLightPureColor.mtl --- ShaderLibrary/Std3D/BlinnPhong/SunLightPureColor.mtl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ShaderLibrary/Std3D/BlinnPhong/SunLightPureColor.mtl b/ShaderLibrary/Std3D/BlinnPhong/SunLightPureColor.mtl index 3b1b4426..fee714cf 100644 --- a/ShaderLibrary/Std3D/BlinnPhong/SunLightPureColor.mtl +++ b/ShaderLibrary/Std3D/BlinnPhong/SunLightPureColor.mtl @@ -40,6 +40,8 @@ Code void main() { HandoverMI(); + + Output.Normal=Normal; gl_Position=GetPosition3D(); } } @@ -66,7 +68,7 @@ Code vec3 diffuse =vec3(0.5)*dot(world_light_direction.xyz,world_normal)+vec3(0.5); //直接光颜色 - vec3 direct_color =sun.color.rgb*mi.Color.rgb; + vec3 direct_color =diffuse*sun.color.rgb*mi.Color.rgb; // #ifndef HAVE_SPECULAR FragColor=vec4(direct_color,1.0);