Skip to content

Commit

Permalink
fixed MAX_STEP
Browse files Browse the repository at this point in the history
  • Loading branch information
ycw committed Mar 1, 2021
1 parent be6a7db commit 9395d72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/jsm/postprocessing/SSRPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ var SSRPass = function ( { renderer, scene, camera, width, height, selects, enco
}

this.ssrMaterial = new ShaderMaterial( {
defines: Object.assign( {
MAX_STEP: Math.sqrt( window.innerWidth * window.innerWidth + window.innerHeight * window.innerHeight )
}, SSRShader.defines ),
defines: Object.assign( {}, SSRShader.defines, {
MAX_STEP: Math.sqrt( this.width * this.width + this.height + this.height ).toFixed(1)
} ),
uniforms: UniformsUtils.clone( SSRShader.uniforms ),
vertexShader: SSRShader.vertexShader,
fragmentShader: SSRShader.fragmentShader,
Expand Down

0 comments on commit 9395d72

Please sign in to comment.