I have run into an issue with MeshPhsicalMaterial after R144. I was updating to 147 and tracked back it started in 145. It came down to having a transmission setting greater than 0. If I set it to anything above that it fails with a shader error. All else seems to work fine, but now I cant do glass and other such things with the error.
I am using standard es5 code with three.js not module. The error in console is this
THREE.WebGLProgram: Shader Error 1282 - VALIDATE_STATUS false
Program Info Log: Fragment shader is not compiled.
FRAGMENT
ERROR: 0:885: 'isinf' : no matching overloaded function found
ERROR: 0:885: '' : boolean expression expected
880: #else
881: return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );
882: #endif
883: }
884: vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
> 885: if ( isinf( attenuationDistance ) ) {
886: return radiance;
887: } else {
888: vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
889: vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance;
890: }
891: }
THREE.WebGLProgram: Shader Error 1282 - VALIDATE_STATUS false
Program Info Log: Fragment shader is not compiled.
FRAGMENT
ERROR: 0:886: 'isinf' : no matching overloaded function found
ERROR: 0:886: '' : boolean expression expected
881: #else
882: return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );
883: #endif
884: }
885: vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
> 886: if ( isinf( attenuationDistance ) ) {
887: return radiance;
888: } else {
889: vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
890: vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance;
891: }
892: }
THREE.WebGLProgram: Shader Error 1282 - VALIDATE_STATUS false
Program Info Log: Fragment shader is not compiled.
FRAGMENT
ERROR: 0:885: 'isinf' : no matching overloaded function found
ERROR: 0:885: '' : boolean expression expected
880: #else
881: return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );
882: #endif
883: }
884: vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
> 885: if ( isinf( attenuationDistance ) ) {
886: return radiance;
887: } else {
888: vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
889: vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance;
890: }
891: }
Is the Shader code for Physical in the main three js file or external?
this is the code I use
var GlassnormalMap = loader.load("content/glass/normal.jpg");
if (IVS_normalMap[num])
GlassnormalMap = IVS_normalMap[num];
Object_Material[num] = new THREE.MeshPhysicalMaterial({
color: shinecolor,
metalness: metalness,
roughness: roughness,
opacity: Object_Opacity,
thickness: 6,
clearcoat: 1,
clearcoatRoughness: 0.1,
clearcoatNormalScale: new THREE.Vector2(0.2),
reflectivity: envmap,
transparent : true,
envMap: envmapimage,
envMapIntensity: envmap,
normalScale: new THREE.Vector2( normalscale, normalscale ),
normalMap: GlassnormalMap,
ior: 1.8,
clearcoatNormalMap: GlassnormalMap,
transmission: transmission,
/*
error on transmission
*/
});
As I said it works just fine up to 145 but then I get these errors when I set transmission
Any ideas?
Jeff