Skip to content

Commit

Permalink
Fix negative tonemapped values (#7179)
Browse files Browse the repository at this point in the history
  • Loading branch information
slimbuck committed Dec 9, 2024
1 parent ec86af7 commit c017a1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scene/shader-lib/chunks/gsplat/vert/gsplat.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ void main(void) {
// evaluate spherical harmonics
#if SH_BANDS > 0
clr.xyz = max(vec3(0.0), clr.xyz + evalSH(state, projState));
clr.xyz += evalSH(state, projState));
#endif
applyClipping(projState, clr.w);
// write output
gl_Position = projState.cornerProj;
gaussianUV = projState.cornerUV;
gaussianColor = vec4(prepareOutputFromGamma(clr.xyz), clr.w);
gaussianColor = vec4(prepareOutputFromGamma(max(clr.xyz, 0.0)), clr.w);
#ifndef DITHER_NONE
id = float(state.id);
Expand Down

0 comments on commit c017a1f

Please sign in to comment.