|
@@ -37,7 +37,9 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
'precision', 'isWebGL2', 'supportsVertexTextures', 'outputEncoding', 'instancing', 'instancingColor',
|
|
'precision', 'isWebGL2', 'supportsVertexTextures', 'outputEncoding', 'instancing', 'instancingColor',
|
|
'map', 'mapEncoding', 'matcap', 'matcapEncoding', 'envMap', 'envMapMode', 'envMapEncoding', 'envMapCubeUV',
|
|
'map', 'mapEncoding', 'matcap', 'matcapEncoding', 'envMap', 'envMapMode', 'envMapEncoding', 'envMapCubeUV',
|
|
'lightMap', 'lightMapEncoding', 'aoMap', 'emissiveMap', 'emissiveMapEncoding', 'bumpMap', 'normalMap',
|
|
'lightMap', 'lightMapEncoding', 'aoMap', 'emissiveMap', 'emissiveMapEncoding', 'bumpMap', 'normalMap',
|
|
- 'objectSpaceNormalMap', 'tangentSpaceNormalMap', 'clearcoatMap', 'clearcoatRoughnessMap', 'clearcoatNormalMap', 'displacementMap',
|
|
|
|
|
|
+ 'objectSpaceNormalMap', 'tangentSpaceNormalMap',
|
|
|
|
+ 'clearcoat', 'clearcoatMap', 'clearcoatRoughnessMap', 'clearcoatNormalMap',
|
|
|
|
+ 'displacementMap',
|
|
'specularMap', 'specularIntensityMap', 'specularTintMap', 'specularTintMapEncoding', 'roughnessMap', 'metalnessMap', 'gradientMap',
|
|
'specularMap', 'specularIntensityMap', 'specularTintMap', 'specularTintMapEncoding', 'roughnessMap', 'metalnessMap', 'gradientMap',
|
|
'alphaMap', 'combine', 'vertexColors', 'vertexAlphas', 'vertexTangents', 'vertexUvs', 'uvsVertexOnly', 'fog', 'useFog', 'fogExp2',
|
|
'alphaMap', 'combine', 'vertexColors', 'vertexAlphas', 'vertexTangents', 'vertexUvs', 'uvsVertexOnly', 'fog', 'useFog', 'fogExp2',
|
|
'flatShading', 'sizeAttenuation', 'logarithmicDepthBuffer', 'skinning',
|
|
'flatShading', 'sizeAttenuation', 'logarithmicDepthBuffer', 'skinning',
|
|
@@ -152,6 +154,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
|
|
|
|
const currentRenderTarget = renderer.getRenderTarget();
|
|
const currentRenderTarget = renderer.getRenderTarget();
|
|
|
|
|
|
|
|
+ const useClearcoat = material.clearcoat > 0;
|
|
|
|
+
|
|
const parameters = {
|
|
const parameters = {
|
|
|
|
|
|
isWebGL2: isWebGL2,
|
|
isWebGL2: isWebGL2,
|
|
@@ -190,9 +194,12 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
|
|
normalMap: !! material.normalMap,
|
|
normalMap: !! material.normalMap,
|
|
objectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap,
|
|
objectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap,
|
|
tangentSpaceNormalMap: material.normalMapType === TangentSpaceNormalMap,
|
|
tangentSpaceNormalMap: material.normalMapType === TangentSpaceNormalMap,
|
|
- clearcoatMap: !! material.clearcoatMap,
|
|
|
|
- clearcoatRoughnessMap: !! material.clearcoatRoughnessMap,
|
|
|
|
- clearcoatNormalMap: !! material.clearcoatNormalMap,
|
|
|
|
|
|
+
|
|
|
|
+ clearcoat: useClearcoat,
|
|
|
|
+ clearcoatMap: useClearcoat && !! material.clearcoatMap,
|
|
|
|
+ clearcoatRoughnessMap: useClearcoat && !! material.clearcoatRoughnessMap,
|
|
|
|
+ clearcoatNormalMap: useClearcoat && !! material.clearcoatNormalMap,
|
|
|
|
+
|
|
displacementMap: !! material.displacementMap,
|
|
displacementMap: !! material.displacementMap,
|
|
roughnessMap: !! material.roughnessMap,
|
|
roughnessMap: !! material.roughnessMap,
|
|
metalnessMap: !! material.metalnessMap,
|
|
metalnessMap: !! material.metalnessMap,
|