David Catuhe 5 éve
szülő
commit
77f2daefd9

+ 1 - 1
dist/preview release/what's new.md

@@ -3,7 +3,7 @@
 ## Major updates
 
 - Added particle editor to the Inspector ([Deltakosh](https://github.com/deltakosh)
-- Added the `ShadowDepthWrapper` class to support accurate shadow generation for custom as well as node material shaders ([Popov72](https://github.com/Popov72))
+- Added the `ShadowDepthWrapper` class to support accurate shadow generation for custom as well as node material shaders. [Doc](https://doc.babylonjs.com/babylon101/shadows#custom-shadow-map-shaders) ([Popov72](https://github.com/Popov72))
 
 ## Updates
 

+ 1 - 1
src/Shaders/ShadersInclude/shadowMapFragment.fx

@@ -1,6 +1,6 @@
     float depthSM = vDepthMetricSM;
 
-#if SM_DEPTHCLAMP == 1
+#if defined(SM_DEPTHCLAMP) &&  SM_DEPTHCLAMP == 1
     #if SM_USEDISTANCE == 1
         depthSM = clamp(((length(vPositionWSM - lightDataSM) + depthValuesSM.x) / (depthValuesSM.y)) + biasAndScaleSM.x, 0.0, 1.0);
     #else

+ 1 - 1
src/Shaders/ShadersInclude/shadowMapFragmentDeclaration.fx

@@ -12,6 +12,6 @@ varying float vDepthMetricSM;
 uniform vec3 biasAndScaleSM;
 uniform vec2 depthValuesSM;
 
-#if SM_DEPTHCLAMP == 1
+#if defined(SM_DEPTHCLAMP) &&  SM_DEPTHCLAMP == 1
     varying float zSM;
 #endif

+ 1 - 1
src/Shaders/ShadersInclude/shadowMapVertexDeclaration.fx

@@ -11,6 +11,6 @@ varying float vDepthMetricSM;
     varying vec3 vPositionWSM;
 #endif
 
-#if SM_DEPTHCLAMP == 1
+#if defined(SM_DEPTHCLAMP) &&  SM_DEPTHCLAMP == 1
     varying float zSM;
 #endif

+ 1 - 1
src/Shaders/ShadersInclude/shadowMapVertexMetric.fx

@@ -7,7 +7,7 @@
     gl_Position.z += biasAndScaleSM.x * gl_Position.w;
 #endif
 
-#if SM_DEPTHCLAMP == 1
+#if defined(SM_DEPTHCLAMP) &&  SM_DEPTHCLAMP == 1
     zSM = gl_Position.z;
     gl_Position.z = 0.0;
 #elif SM_USEDISTANCE == 0