File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -886,8 +886,26 @@ class PassNode extends TempNode {
886886
887887 this . renderTarget . setSize ( effectiveWidth , effectiveHeight ) ;
888888
889- if ( this . _scissor !== null ) this . renderTarget . scissor . copy ( this . _scissor ) ;
890- if ( this . _viewport !== null ) this . renderTarget . viewport . copy ( this . _viewport ) ;
889+ // scissor
890+
891+ if ( this . _scissor !== null ) {
892+
893+ this . renderTarget . scissor . copy ( this . _scissor ) . multiplyScalar ( this . _pixelRatio * this . _resolutionScale ) . floor ( ) ;
894+ this . renderTarget . scissorTest = true ;
895+
896+ } else {
897+
898+ this . renderTarget . scissorTest = false ;
899+
900+ }
901+
902+ // viewport
903+
904+ if ( this . _viewport !== null ) {
905+
906+ this . renderTarget . viewport . copy ( this . _viewport ) . multiplyScalar ( this . _pixelRatio * this . _resolutionScale ) . floor ( ) ;
907+
908+ }
891909
892910 }
893911
@@ -922,8 +940,6 @@ class PassNode extends TempNode {
922940
923941 }
924942
925- this . _scissor . multiplyScalar ( this . _pixelRatio * this . _resolutionScale ) . floor ( ) ;
926-
927943 }
928944
929945 }
@@ -958,8 +974,6 @@ class PassNode extends TempNode {
958974
959975 }
960976
961- this . _viewport . multiplyScalar ( this . _pixelRatio * this . _resolutionScale ) . floor ( ) ;
962-
963977 }
964978
965979 }
You can’t perform that action at this time.
0 commit comments