|
@@ -15,7 +15,7 @@ import {
|
|
|
NeverStencilFunc, AlwaysStencilFunc, LessStencilFunc, LessEqualStencilFunc, EqualStencilFunc, GreaterEqualStencilFunc, GreaterStencilFunc, NotEqualStencilFunc
|
|
NeverStencilFunc, AlwaysStencilFunc, LessStencilFunc, LessEqualStencilFunc, EqualStencilFunc, GreaterEqualStencilFunc, GreaterStencilFunc, NotEqualStencilFunc
|
|
|
} from '../../../constants.js';
|
|
} from '../../../constants.js';
|
|
|
|
|
|
|
|
-import { error } from '../../../utils.js';
|
|
|
|
|
|
|
+import { error, warnOnce } from '../../../utils.js';
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* A WebGPU backend utility module for managing pipelines.
|
|
* A WebGPU backend utility module for managing pipelines.
|
|
@@ -161,15 +161,25 @@ class WebGPUPipelineUtils {
|
|
|
|
|
|
|
|
if ( mrt !== null ) {
|
|
if ( mrt !== null ) {
|
|
|
|
|
|
|
|
- const blendMode = mrt.getBlendMode( texture.name );
|
|
|
|
|
|
|
+ if ( this.backend.compatibilityMode !== true ) {
|
|
|
|
|
|
|
|
- if ( blendMode.blending === MaterialBlending ) {
|
|
|
|
|
|
|
+ const blendMode = mrt.getBlendMode( texture.name );
|
|
|
|
|
|
|
|
- blending = materialBlending;
|
|
|
|
|
|
|
+ if ( blendMode.blending === MaterialBlending ) {
|
|
|
|
|
+
|
|
|
|
|
+ blending = materialBlending;
|
|
|
|
|
+
|
|
|
|
|
+ } else if ( blendMode.blending !== NoBlending ) {
|
|
|
|
|
+
|
|
|
|
|
+ blending = this._getBlending( blendMode );
|
|
|
|
|
|
|
|
- } else if ( blendMode.blending !== NoBlending ) {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- blending = this._getBlending( blendMode );
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+
|
|
|
|
|
+ warnOnce( 'WebGPURenderer: Multiple Render Targets (MRT) blending configuration is not fully supported in compatibility mode. The material blending will be used for all render targets.' );
|
|
|
|
|
+
|
|
|
|
|
+ blending = materialBlending;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|