File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/renderers/webgl-fallback Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1104,11 +1104,16 @@ class WebGLBackend extends Backend {
1104
1104
1105
1105
const vp = subCamera . viewport ;
1106
1106
1107
+ const x = vp . x * pixelRatio ;
1108
+ const y = vp . y * pixelRatio ;
1109
+ const width = vp . width * pixelRatio ;
1110
+ const height = vp . height * pixelRatio ;
1111
+
1107
1112
state . viewport (
1108
- Math . floor ( vp . x * pixelRatio ) ,
1109
- Math . floor ( ( renderObject . context . height - vp . height - vp . y ) * pixelRatio ) ,
1110
- Math . floor ( vp . width * pixelRatio ) ,
1111
- Math . floor ( vp . height * pixelRatio )
1113
+ Math . floor ( x ) ,
1114
+ Math . floor ( renderObject . context . height - height - y ) ,
1115
+ Math . floor ( width ) ,
1116
+ Math . floor ( height )
1112
1117
) ;
1113
1118
1114
1119
state . bindBufferBase ( gl . UNIFORM_BUFFER , cameraIndexData . index , cameraData . indexesGPU [ i ] ) ;
You can’t perform that action at this time.
0 commit comments