diff --git a/src/renderers/shaders/ShaderChunk/lights_pars.glsl b/src/renderers/shaders/ShaderChunk/lights_pars.glsl index f3873a882fdc2de5b58aecc0451e0cb23a8dd972..50fe62c515fb6453d2e2b11edd18c1ba7d1d7d62 100644 --- a/src/renderers/shaders/ShaderChunk/lights_pars.glsl +++ b/src/renderers/shaders/ShaderChunk/lights_pars.glsl @@ -146,7 +146,7 @@ uniform vec3 ambientLightColor; #endif - reflectVec = normalize( inverseTransformDirection( reflectVec, viewMatrix ) ); + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); #ifdef ENVMAP_TYPE_CUBE diff --git a/src/renderers/shaders/ShaderChunk/lights_template.glsl b/src/renderers/shaders/ShaderChunk/lights_template.glsl index 5bdb86291675939f4bbfa1266365c957006cd468..168fb6192e289a72f56c9b83ff39aec2b7ac2a1e 100644 --- a/src/renderers/shaders/ShaderChunk/lights_template.glsl +++ b/src/renderers/shaders/ShaderChunk/lights_template.glsl @@ -1,6 +1,17 @@ +// +// This is a template that can be used to light a material, it uses pluggable RenderEquations (RE) +// for specific lighting scenarios. +// // Instructions for use: -// - Ensure that both BRDF_Material_DirectLight and BRDF_Material_Indirect light are defined +// - Ensure that both Material_RE_DirectLight, Material_RE_IndirectDiffuseLight and Material_RE_IndirectSpecularLight are defined +// - If you have defined a Material_RE_IndirectSpecularLight, you need to also provide a Material_LightProbeLOD. // - Create a material parameter that is to be passed as the third parameter to your lighting functions. +// +// TODO: +// - Add area light support. +// - Add sphere light support. +// - Add diffuse light probe (irradiance cubemap) support. +// GeometricContext geometry = GeometricContext( -vViewPosition, normalize( normal ), normalize(vViewPosition ) );