Explorar o código

Fixed bug where GBufferGlobal.frag didn't add the diffuse component to phong

Sanjay Madhav %!s(int64=8) %!d(string=hai) anos
pai
achega
959fe2673d
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      Chapter13/Shaders/GBufferGlobal.frag

+ 1 - 0
Chapter13/Shaders/GBufferGlobal.frag

@@ -60,6 +60,7 @@ void main()
 	if (NdotL > 0)
 	{
 		vec3 Diffuse = uDirLight.mDiffuseColor * dot(N, L);
+		Phong += Diffuse;
 	}
 	// Clamp light between 0-1 RGB values
 	Phong = clamp(Phong, 0.0, 1.0);