瀏覽代碼

MAX_STEP toFixed

ycw 4 年之前
父節點
當前提交
4592ca0167
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/jsm/postprocessing/SSRPass.js

+ 1 - 1
examples/jsm/postprocessing/SSRPass.js

@@ -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 );