提交 181973a2 编写于 作者: B Ben Houston

Explicitly optimized, rather than theoretically pure.

上级 2d3f6990
......@@ -93,13 +93,17 @@ GeometricContext backGeometry = GeometricContext( geometry.position, -geometry.n
#endif
float frontDotNL = saturate( dot( geometry.normal, frontIndirectLight.direction ) );
vLightFront += frontDotNL * frontIndirectLight.color * BRDF_Diffuse_Lambert( frontIndirectLight, geometry, diffuse );
//float frontDotNL = saturate( dot( geometry.normal, frontIndirectLight.direction ) );
//vLightFront += frontDotNL * frontIndirectLight.color * BRDF_Diffuse_Lambert( frontIndirectLight, geometry, diffuse );
// the following is equivalent to the above
vLightFront += frontIndirectLight.color;
#ifdef DOUBLE_SIDED
float backDotNL = saturate( dot( -geometry.normal, backIndirectLight.direction ) );
vLightBack += backDotNL * backIndirectLight.color * BRDF_Diffuse_Lambert( backIndirectLight, backGeometry, diffuse );
//float backDotNL = saturate( dot( -geometry.normal, backIndirectLight.direction ) );
//vLightBack += backDotNL * backIndirectLight.color * BRDF_Diffuse_Lambert( backIndirectLight, backGeometry, diffuse );
// the following is equivalent to the above
vLightBack += backIndirectLight.color;
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册