提交 9021bc38 编写于 作者: M Mr.doob

WebGLRenderer: Reimplemented vertexAlphas program check.

上级 aead204b
......@@ -1452,6 +1452,7 @@ function WebGLRenderer( parameters ) {
materialProperties.instancing = parameters.instancing;
materialProperties.numClippingPlanes = parameters.numClippingPlanes;
materialProperties.numIntersection = parameters.numClipIntersection;
materialProperties.vertexAlphas = parameters.vertexAlphas;
}
......@@ -1465,6 +1466,7 @@ function WebGLRenderer( parameters ) {
const environment = material.isMeshStandardMaterial ? scene.environment : null;
const encoding = ( _currentRenderTarget === null ) ? _this.outputEncoding : _currentRenderTarget.texture.encoding;
const envMap = cubemaps.get( material.envMap || environment );
const vertexAlphas = material.vertexColors === true && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4;
const materialProperties = properties.get( material );
const lights = currentRenderState.state.lights;
......@@ -1522,6 +1524,10 @@ function WebGLRenderer( parameters ) {
needsProgramChange = true;
} else if ( materialProperties.vertexAlphas !== vertexAlphas ) {
needsProgramChange = true;
}
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册