File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-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+ fxaaPass . material . uniforms [ "resolution" ] . value . x = 1 / ( window . innerWidth * window . devicePixelRatio ) ;
142+ fxaaPass . material . uniforms [ "resolution" ] . value . y = 1 / ( window . innerHeight * window . devicePixelRatio ) ;
143143
144144 composer1 = new THREE . EffectComposer ( renderer ) ;
145145 composer1 . addPass ( renderPass ) ;
169169 composer1 . setSize ( window . innerWidth , window . innerHeight ) ;
170170 composer2 . setSize ( window . innerWidth , window . innerHeight ) ;
171171
172- fxaaPass . material . uniforms [ 'resolution' ] . value . x = 1 / window . innerWidth ;
173- fxaaPass . material . uniforms [ 'resolution' ] . value . y = 1 / window . innerHeight ;
172+ fxaaPass . material . uniforms [ 'resolution' ] . value . x = 1 / ( window . innerWidth * window . devicePixelRatio ) ;
173+ fxaaPass . material . uniforms [ 'resolution' ] . value . y = 1 / ( window . innerHeight * window . devicePixelRatio ) ;
174174
175175 }
176176
You can’t perform that action at this time.
0 commit comments