Browse Source

use getLod(0) (avoid dx driver bug error X4014)

ncannasse 7 years ago
parent
commit
053e18868c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      h3d/shader/Parallax.hx

+ 2 - 2
h3d/shader/Parallax.hx

@@ -33,10 +33,10 @@ class Parallax extends hxsl.Shader {
 				var curLayerDepth = 0.;
 				var delta = (viewNS.xy / viewNS.z) * amount / numLayers;
 				var curUV = calculatedUV;
-				var curDepth = heightMap.get(curUV);
+				var curDepth = heightMap.getLod(curUV,0.);
 			    while( curLayerDepth < curDepth ) {
 			        curUV += delta;
-			        curDepth = heightMap.get(curUV);
+			        curDepth = heightMap.getLod(curUV,0.);
 			        curLayerDepth += layerDepth;
 				}
 				var prevUV = curUV - delta;