File tree Expand file tree Collapse file tree
Sources/Rendering/OpenGL/OrderIndependentTranslucentPass Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -296,6 +296,12 @@ function vtkOpenGLOrderIndependentTranslucentPass(publicAPI, model) {
296296 publicAPI . createVBO ( viewNode ) ;
297297 }
298298
299+ const cullFaceEnabled = gl . isEnabled ( gl . CULL_FACE ) ;
300+ const cullFaceMode = cullFaceEnabled
301+ ? gl . getParameter ( gl . CULL_FACE_MODE )
302+ : null ;
303+ viewNode . disableCullFace ( ) ;
304+
299305 gl . blendFuncSeparate (
300306 gl . SRC_ALPHA ,
301307 gl . ONE_MINUS_SRC_ALPHA ,
@@ -325,6 +331,10 @@ function vtkOpenGLOrderIndependentTranslucentPass(publicAPI, model) {
325331
326332 gl . depthMask ( true ) ;
327333 gl . depthFunc ( gl . LEQUAL ) ;
334+ if ( cullFaceEnabled ) {
335+ viewNode . enableCullFace ( ) ;
336+ gl . cullFace ( cullFaceMode ) ;
337+ }
328338 model . translucentRGBATexture . deactivate ( ) ;
329339 model . translucentRTexture . deactivate ( ) ;
330340
You can’t perform that action at this time.
0 commit comments