Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be multiplication sign here? this.height * this.height

} ),
uniforms: UniformsUtils.clone( SSRShader.uniforms ),
vertexShader: SSRShader.vertexShader,
fragmentShader: SSRShader.fragmentShader,
Expand Down Expand Up @@ -639,7 +639,7 @@ SSRPass.prototype = Object.assign( Object.create( Pass.prototype ), {
this.width = width;
this.height = height;

this.ssrMaterial.defines.MAX_STEP = Math.sqrt( width * width + height * height );
this.ssrMaterial.defines.MAX_STEP = Math.sqrt( width * width + height * height ).toFixed(1);
this.ssrMaterial.needsUpdate = true;
this.beautyRenderTarget.setSize( width, height );
this.prevRenderTarget.setSize( width, height );
Expand Down