Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
FarazzShaikh committed Sep 21, 2024
1 parent 47c4c9c commit fe47446
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package/src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const defaultCsmMainDefinitions = /* glsl */ `
#else
csm_FragNormal = normalize(vNormal);
#ifdef DOUBLE_SIDED
csm_FragNormal *= faceDirection;
csm_FragNormal *= gl_FrontFacing ? 1.0 : - 1.0;
#endif
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion package/src/maps/patchMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const defaultPatchMap: CSMPatchMap = {
},
[`${keywordMap.depthAlpha}`]: {
"gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );": `
gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity * ${keywordMap.depthAlpha} );
gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity * 1.0 - ${keywordMap.depthAlpha} );
`,
"gl_FragColor = packDepthToRGBA( fragCoordZ );": `
if(${keywordMap.depthAlpha} < 1.0) discard;
Expand Down

0 comments on commit fe47446

Please sign in to comment.