perf: reduce terrain shadow samples
This commit is contained in:
1 parent
96161b1f9e
commit
5364348b21
1 file changed
+2
-2
Vendored
+2
-2
@@ -852,11 +852,11 @@ var CLOUD_SAMPLER_GLSL = [
|
|||||||
// march stops once the ray is above the tallest terrain.
|
// march stops once the ray is above the tallest terrain.
|
||||||
'float terrainShadow(vec3 p, vec3 L) {',
|
'float terrainShadow(vec3 p, vec3 L) {',
|
||||||
'if (uTerrainShadowOn < 0.5 || L.y < 0.01) return 1.0;',
|
'if (uTerrainShadowOn < 0.5 || L.y < 0.01) return 1.0;',
|
||||||
'float stepT = 0.22;',
|
'float stepT = 0.30;',
|
||||||
'float clearance = 1000.0;',
|
'float clearance = 1000.0;',
|
||||||
'float y = p.y;',
|
'float y = p.y;',
|
||||||
'float top = p.y + 1.4;',
|
'float top = p.y + 1.4;',
|
||||||
'for (int i = 0; i < 11; i++) {',
|
'for (int i = 0; i < 8; i++) {',
|
||||||
'vec2 q = p.xz + L.xz * (stepT * (float(i) + 0.5));',
|
'vec2 q = p.xz + L.xz * (stepT * (float(i) + 0.5));',
|
||||||
'float h = terrElevT(q) * uElevScale;',
|
'float h = terrElevT(q) * uElevScale;',
|
||||||
'y += L.y * stepT;',
|
'y += L.y * stepT;',
|
||||||
|
|||||||
Reference in new issue
Block a user