File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 138138 fxaaPass = new THREE . ShaderPass ( THREE . FXAAShader ) ;
139139 fxaaPass . renderToScreen = true ;
140140
141- fxaaPass . material . uniforms [ "resolution" ] . value . x = 1 / window . innerWidth ;
142- fxaaPass . material . uniforms [ "resolution" ] . value . y = 1 / window . innerHeight ;
141+ var pixelRatio = renderer . getPixelRatio ( ) ;
142+
143+ fxaaPass . material . uniforms [ 'resolution' ] . value . x = 1 / ( window . innerWidth * pixelRatio ) ;
144+ fxaaPass . material . uniforms [ 'resolution' ] . value . y = 1 / ( window . innerHeight * pixelRatio ) ;
143145
144146 composer1 = new THREE . EffectComposer ( renderer ) ;
145147 composer1 . addPass ( renderPass ) ;
169171 composer1 . setSize ( window . innerWidth , window . innerHeight ) ;
170172 composer2 . setSize ( window . innerWidth , window . innerHeight ) ;
171173
172- fxaaPass . material . uniforms [ 'resolution' ] . value . x = 1 / window . innerWidth ;
173- fxaaPass . material . uniforms [ 'resolution' ] . value . y = 1 / window . innerHeight ;
174+ var pixelRatio = renderer . getPixelRatio ( ) ;
175+
176+ fxaaPass . material . uniforms [ 'resolution' ] . value . x = 1 / ( window . innerWidth * pixelRatio ) ;
177+ fxaaPass . material . uniforms [ 'resolution' ] . value . y = 1 / ( window . innerHeight * pixelRatio ) ;
174178
175179 }
176180
You can’t perform that action at this time.
0 commit comments