Skip to content

Commit

Permalink
improve the depth encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhuang01 committed Jun 7, 2019
1 parent a7f810c commit 0c23eb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/experimental/sun/src/shadow-effect/shadow-module.js
Expand Up @@ -27,9 +27,9 @@ uniform vec4 shadow_color;
varying vec3 shadow_vPosition;
const vec4 bitPackShift = vec4(1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0);
const vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);
const vec4 bitUnpackShift = 1.0 / bitPackShift;
const vec4 bitMask = vec4(1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0, 0.0);
const vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
float shadow_getShadowWeight(vec2 texCoords) {
vec4 rgbaDepth = texture2D(shadow_shadowMap, texCoords);
Expand Down

0 comments on commit 0c23eb8

Please sign in to comment.