File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
examples/jsm/postprocessing Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ class BokehPass extends Pass {
26
26
this . camera = camera ;
27
27
28
28
const focus = ( params . focus !== undefined ) ? params . focus : 1.0 ;
29
- const aspect = ( params . aspect !== undefined ) ? params . aspect : camera . aspect ;
30
29
const aperture = ( params . aperture !== undefined ) ? params . aperture : 0.025 ;
31
30
const maxblur = ( params . maxblur !== undefined ) ? params . maxblur : 1.0 ;
32
31
@@ -54,7 +53,7 @@ class BokehPass extends Pass {
54
53
bokehUniforms [ 'tDepth' ] . value = this . renderTargetDepth . texture ;
55
54
56
55
bokehUniforms [ 'focus' ] . value = focus ;
57
- bokehUniforms [ 'aspect' ] . value = aspect ;
56
+ bokehUniforms [ 'aspect' ] . value = camera . aspect ;
58
57
bokehUniforms [ 'aperture' ] . value = aperture ;
59
58
bokehUniforms [ 'maxblur' ] . value = maxblur ;
60
59
bokehUniforms [ 'nearClip' ] . value = camera . near ;
@@ -120,6 +119,8 @@ class BokehPass extends Pass {
120
119
121
120
setSize ( width , height ) {
122
121
122
+ this . materialBokeh . uniforms [ 'aspect' ] . value = width / height ;
123
+
123
124
this . renderTargetDepth . setSize ( width , height ) ;
124
125
125
126
}
You can’t perform that action at this time.
0 commit comments