Jump to content

WebGL2 shadow fallback - bug?


babbleon
 Share

Recommended Posts

Hello,

As per the docs, the WebGL2 shadows are meant to fall back to Poisson Sampling on non compatible devices.

However, Chrome 65.0.3325.109 on Android (Samsung S6 edge+)  only display a red cube on this PG without ground and no shadows.

That said, Chrome >= v. 64 should support WebGL2. and checking on another Android phone, with Chrome 64 it shows shadows.

Is this a bug?

Link to comment
Share on other sites

Here you go:

22:23:13]: Error: 0:83: S0032: no default precision defined for parameter 'webgl_4aeb46af4241331f'

[22:23:13]: Fragment shader: default 1	#version 300 es 2	#define WEBGL2 3	#define MAINUV1 4	#define DIFFUSE 5	#define DIFFUSEDIRECTUV 1 6	#define AMBIENTDIRECTUV 0 7	#define OPACITYDIRECTUV 0 8	#define EMISSIVEDIRECTUV 0 9	#define SPECULARDIRECTUV 0 10	#define BUMPDIRECTUV 0 11	12	#define NORMAL 13	#define UV1 14	#define NUM_BONE_INFLUENCERS 0 15	#define BonesPerMesh 0 16	#define LIGHTMAPDIRECTUV 0 17	#define SHADOWFLOAT 18	#define NUM_MORPH_INFLUENCERS 0 19	#define VIGNETTEBLENDMODEMULTIPLY 20	#define SAMPLER3DGREENDEPTH 21	#define SAMPLER3DBGRMAP 22	#define LIGHT0 23	#define SPOTLIGHT0 24	#define SHADOW0 25	#define SHADOWPCF0 26	#define SHADOWS 27	28	#define SHADER_NAME fragment:default 29	precision highp float; 30 layout(std140,column_major) uniform; 31	uniform Material 32	{ 33 vec4 diffuseLeftColor; 34	vec4 diffuseRightColor; 35	vec4 opacityParts; 36	vec4 reflectionLeftColor; 37	vec4 reflectionRightColor; 38	vec4 refractionLeftColor; 39	vec4 refractionRightColor; 40	vec4 emissiveLeftColor; 41	vec4 emissiveRightColor; 42	vec2 vDiffuseInfos; 43	vec2 vAmbientInfos; 44	vec2 vOpacityInfos; 45	vec2 vReflectionInfos; 46	vec3 vReflectionPosition; 47	vec3 vReflectionSize; 48	vec2 vEmissiveInfos; 49	vec2 vLightmapInfos; 50	vec2 vSpecularInfos; 51 vec3 vBumpInfos; 52	mat4 diffuseMatrix; 53	mat4 ambientMatrix; 54 mat4 opacityMatrix; 55	mat4 reflectionMatrix; 56	mat4 emissiveMatrix; 57	mat4 lightmapMatrix; 58	mat4 specularMatrix; 59 mat4 bumpMatrix; 60	vec4 vTangentSpaceParams; 61	mat4 refractionMatrix; 62	vec4 vRefractionInfos; 63	vec4 vSpecularColor; 64	vec3 vEmissiveColor; 65	vec4 vDiffuseColor; 66	float pointSize; 67	}; 68	uniform Scene { 69	mat4 viewProjection; 70	mat4 view; 71 }; 72	#if defined(BUMP) || !defined(NORMAL) 73	74	#endif 75	#define CUSTOM_FRAGMENT_BEGIN 76	#ifdef LOGARITHMICDEPTH 77	78	#endif 79	80 #define RECIPROCAL_PI2 0.15915494 81	uniform vec3 vEyePosition; 82 uniform vec3 vAmbientColor; 83	84	in vec3 vPositionW; 85	#ifdef NORMAL 86	in vec3 vNormalW; 87	#endif 88	#ifdef VERTEXCOLOR 89	in vec4 vColor; 90	#endif 91	#ifdef MAINUV1 92	in vec2 vMainUV1; 93 #endif 94	#ifdef MAINUV2 95	in vec2 vMainUV2; 96	#endif 97	98	const float PI=3.1415926535897932384626433832795; 99	const float LinearEncodePowerApprox=2.2; 100	const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox; 101	const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722); 102	mat3 transposeMat3(mat3 inMatrix) { 103	vec3 i0=inMatrix[0]; 104	vec3 i1=inMatrix[1]; 105	vec3 i2=inMatrix[2]; 106	mat3 outMatrix=mat3( 107	vec3(i0.x,i1.x,i2.x), 108	vec3(i0.y,i1.y,i2.y), 109 vec3(i0.z,i1.z,i2.z) 110	); 111	return outMatrix; 112	} 113	114 mat3 inverseMat3(mat3 inMatrix) { 115	float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2]; 116	float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2]; 117	float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2]; 118	float b01=a22*a11-a12*a21; 119	float b11=-a22*a10+a12*a20; 120	float b21=a21*a10-a11*a20; 121	float det=a00*b01+a01*b11+a02*b21; 122 return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11), 123	b11,(a22*a00-a02*a20),(-a12*a00+a02*a10), 124	b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det; 125	} 126	float computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff) 127	{ 128	float mask=smoothstep(1.0-frustumEdgeFalloff,1.0,clamp(dot(clipSpace,clipSpace),0.,1.)); 129 return mix(value,1.0,mask); 130	} 131	vec3 applyEaseInOut(vec3 x){ 132	return x*x*(3.0-2.0*x); 133	} 134	vec3 toLinearSpace(vec3 color) 135	{ 136	return pow(color,vec3(LinearEncodePowerApprox)); 137	} 138	vec3 toGammaSpace(vec3 color) 139	{ 140	return pow(color,vec3(GammaEncodePowerApprox)); 141	} 142	float square(float value) 143	{ 144	return value*value; 145	} 146	float getLuminance(vec3 color) 147	{ 148	return clamp(dot(color,LuminanceEncodeApprox),0.,1.); 149	} 150	151	float getRand(vec2 seed) { 152	return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453); 153	} 154	float dither(vec2 seed,float varianceAmount) { 155	float rand=getRand(seed); 156 float dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand); 157	return dither; 158	} 159	160	#ifdef LIGHT0 161	uniform Light0 162	{ 163	vec4 vLightData; 164	vec4 vLightDiffuse; 165	vec3 vLightSpecular; 166	#ifdef SPOTLIGHT0 167	vec4 vLightDirection; 168 #endif 169	#ifdef HEMILIGHT0 170	vec3 vLightGround; 171	#endif 172 vec4 shadowsInfo; 173	vec2 depthValues; 174	} light0; 175	#ifdef PROJECTEDLIGHTTEXTURE0 176	uniform mat4 textureProjectionMatrix0; 177	uniform sampler2D projectionLightSampler0; 178	#endif 179 #ifdef SHADOW0 180	#if defined(SHADOWCUBE0) 181	uniform samplerCube shadowSampler0; 182	#else 183	in vec4 vPositionFromLight0; 184	in float vDepthMetric0; 185	#if defined(SHADOWPCSS0) 186	uniform highp sampler2DShadow shadowSampler0; 187	uniform highp sampler2D depthSampler0; 188	#elif defined(SHADOWPCF0) 189	uniform highp sampler2DShadow shadowSampler0; 190	#else 191	uniform sampler2D shadowSampler0; 192	#endif 193	uniform mat4 lightMatrix0; 194 #endif 195	#endif 196	#endif 197	#ifdef LIGHT1 198	uniform Light1 199	{ 200	vec4 vLightData; 201	vec4 vLightDiffuse; 202	vec3 vLightSpecular; 203	#ifdef SPOTLIGHT1 204	vec4 vLightDirection; 205 #endif 206	#ifdef HEMILIGHT1 207	vec3 vLightGround; 208	#endif 209 vec4 shadowsInfo; 210	vec2 depthValues; 211	} light1; 212	#ifdef PROJECTEDLIGHTTEXTURE1 213	uniform mat4 textureProjectionMatrix1; 214	uniform sampler2D projectionLightSampler1; 215	#endif 216 #ifdef SHADOW1 217	#if defined(SHADOWCUBE1) 218	uniform samplerCube shadowSampler1; 219	#else 220	in vec4 vPositionFromLight1; 221	in float vDepthMetric1; 222	#if defined(SHADOWPCSS1) 223	uniform highp sampler2DShadow shadowSampler1; 224	uniform highp sampler2D depthSampler1; 225	#elif defined(SHADOWPCF1) 226	uniform highp sampler2DShadow shadowSampler1; 227	#else 228	uniform sampler2D shadowSampler1; 229	#endif 230	uniform mat4 lightMatrix1; 231 #endif 232	#endif 233	#endif 234	#ifdef LIGHT2 235	uniform Light2 236	{ 237	vec4 vLightData; 238	vec4 vLightDiffuse; 239	vec3 vLightSpecular; 240	#ifdef SPOTLIGHT2 241	vec4 vLightDirection; 242 #endif 243	#ifdef HEMILIGHT2 244	vec3 vLightGround; 245	#endif 246 vec4 shadowsInfo; 247	vec2 depthValues; 248	} light2; 249	#ifdef PROJECTEDLIGHTTEXTURE2 250	uniform mat4 textureProjectionMatrix2; 251	uniform sampler2D projectionLightSampler2; 252	#endif 253 #ifdef SHADOW2 254	#if defined(SHADOWCUBE2) 255	uniform samplerCube shadowSampler2; 256	#else 257	in vec4 vPositionFromLight2; 258	in float vDepthMetric2; 259	#if defined(SHADOWPCSS2) 260	uniform highp sampler2DShadow shadowSampler2; 261	uniform highp sampler2D depthSampler2; 262	#elif defined(SHADOWPCF2) 263	uniform highp sampler2DShadow shadowSampler2; 264	#else 265	uniform sampler2D shadowSampler2; 266	#endif 267	uniform mat4 lightMatrix2; 268 #endif 269	#endif 270	#endif 271	#ifdef LIGHT3 272	uniform Light3 273	{ 274	vec4 vLightData; 275	vec4 vLightDiffuse; 276	vec3 vLightSpecular; 277	#ifdef SPOTLIGHT3 278	vec4 vLightDirection; 279 #endif 280	#ifdef HEMILIGHT3 281	vec3 vLightGround; 282	#endif 283 vec4 shadowsInfo; 284	vec2 depthValues; 285	} light3; 286	#ifdef PROJECTEDLIGHTTEXTURE3 287	uniform mat4 textureProjectionMatrix3; 288	uniform sampler2D projectionLightSampler3; 289	#endif 290 #ifdef SHADOW3 291	#if defined(SHADOWCUBE3) 292	uniform samplerCube shadowSampler3; 293	#else 294	in vec4 vPositionFromLight3; 295	in float vDepthMetric3; 296	#if defined(SHADOWPCSS3) 297	uniform highp sampler2DShadow shadowSampler3; 298	uniform highp sampler2D depthSampler3; 299	#elif defined(SHADOWPCF3) 300	uniform highp sampler2DShadow shadowSampler3; 301	#else 302	uniform sampler2D shadowSampler3; 303	#endif 304	uniform mat4 lightMatrix3; 305 #endif 306	#endif 307	#endif 308	309	310	struct lightingInfo 311	{ 312	vec3 diffuse; 313	#ifdef SPECULARTERM 314	vec3 specular; 315 #endif 316	#ifdef NDOTL 317	float ndl; 318	#endif 319	}; 320 lightingInfo computeLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) { 321	lightingInfo result; 322	vec3 lightVectorW; 323 float attenuation=1.0; 324	if (lightData.w == 0.) 325	{ 326	vec3 direction=lightData.xyz-vPositionW; 327	attenuation=max(0.,1.0-length(direction)/range); 328	lightVectorW=normalize(direction); 329	} 330	else 331	{ 332	lightVectorW=normalize(-lightData.xyz); 333	} 334	335	float ndl=max(0.,dot(vNormal,lightVectorW)); 336 #ifdef NDOTL 337	result.ndl=ndl; 338	#endif 339 result.diffuse=ndl*diffuseColor*attenuation; 340	#ifdef SPECULARTERM 341	342	vec3 angleW=normalize(viewDirectionW+lightVectorW); 343	float specComp=max(0.,dot(vNormal,angleW)); 344 specComp=pow(specComp,max(1.,glossiness)); 345 result.specular=specComp*specularColor*attenuation; 346	#endif 347 return result; 348	} 349	lightingInfo computeSpotLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec4 lightDirection,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) { 350 lightingInfo result; 351	vec3 direction=lightData.xyz-vPositionW; 352	vec3 lightVectorW=normalize(direction); 353	float attenuation=max(0.,1.0-length(direction)/range); 354	355	float cosAngle=max(0.,dot(lightDirection.xyz,-lightVectorW)); 356	if (cosAngle>=lightDirection.w) 357	{ 358 cosAngle=max(0.,pow(cosAngle,lightData.w)); 359 attenuation*=cosAngle; 360	361	float ndl=max(0.,dot(vNormal,lightVectorW)); 362	#ifdef NDOTL 363 result.ndl=ndl; 364	#endif 365 result.diffuse=ndl*diffuseColor*attenuation; 366	#ifdef SPECULARTERM 367	368	vec3 angleW=normalize(viewDirectionW+lightVectorW); 369	float specComp=max(0.,dot(vNormal,angleW)); 370 specComp=pow(specComp,max(1.,glossiness)); 371 result.specular=specComp*specularColor*attenuation; 372	#endif 373 return result; 374	} 375	result.diffuse=vec3(0.); 376	#ifdef SPECULARTERM 377	result.specular=vec3(0.); 378	#endif 379	#ifdef NDOTL 380	result.ndl=0.; 381	#endif 382	return result; 383	} 384 lightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float glossiness) { 385	lightingInfo result; 386	387 float ndl=dot(vNormal,lightData.xyz)*0.5+0.5; 388	#ifdef NDOTL 389 result.ndl=ndl; 390	#endif 391 result.diffuse=mix(groundColor,diffuseColor,ndl); 392	#ifdef SPECULARTERM 393	394	vec3 angleW=normalize(viewDirectionW+lightData.xyz); 395	float specComp=max(0.,dot(vNormal,angleW)); 396 specComp=pow(specComp,max(1.,glossiness)); 397 result.specular=specComp*specularColor; 398	#endif 399	return result; 400	} 401	vec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){ 402	vec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0); 403 strq/=strq.w; 404	vec3 textureColor=texture(projectionLightSampler,strq.xy).rgb; 405 #ifdef PBR 406	textureColor=toLinearSpace(textureColor); 407	#endif 408	return textureColor; 409	} 410	#ifdef SHADOWS 411	#ifndef SHADOWFLOAT 412	float unpack(vec4 color) 413	{ 414	const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0); 415	return dot(color,bit_shift); 416	} 417	#endif 418	float computeShadowCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,vec2 depthValues) 419	{ 420	vec3 directionToLight=vPositionW-lightPosition; 421	float depth=length(directionToLight); 422	depth=(depth+depthValues.x)/(depthValues.y); 423 depth=clamp(depth,0.,1.0); 424 directionToLight=normalize(directionToLight); 425 directionToLight.y=-directionToLight.y; 426	#ifndef SHADOWFLOAT 427 float shadow=unpack(texture(shadowSampler,directionToLight)); 428 #else 429	float shadow=texture(shadowSampler,directionToLight).x; 430	#endif 431	if (depth>shadow) 432	{ 433	return darkness; 434	} 435	return 1.0; 436	} 437	float computeShadowWithPoissonSamplingCube(vec3 lightPosition,samplerCube shadowSampler,float mapSize,float darkness,vec2 depthValues) 438	{ 439	vec3 directionToLight=vPositionW-lightPosition; 440	float depth=length(directionToLight); 441	depth=(depth+depthValues.x)/(depthValues.y); 442 depth=clamp(depth,0.,1.0); 443 directionToLight=normalize(directionToLight); 444 directionToLight.y=-directionToLight.y; 445	float visibility=1.; 446	vec3 poissonDisk[4]; 447	poissonDisk[0]=vec3(-1.0,1.0,-1.0); 448	poissonDisk[1]=vec3(1.0,-1.0,-1.0); 449 poissonDisk[2]=vec3(-1.0,-1.0,-1.0); 450 poissonDisk[3]=vec3(1.0,-1.0,1.0); 451	452	#ifndef SHADOWFLOAT 453 if (unpack(texture(shadowSampler,directionToLight+poissonDisk[0]*mapSize))1.0 || uv.y<0. || uv.y>1.0) 502	{ 503	return 1.0; 504	} 505	float shadowPixelDepth=clamp(depthMetric,0.,1.0); 506	#ifndef SHADOWFLOAT 507	float shadow=unpack(texture(shadowSampler,uv)); 508	#else 509 float shadow=texture(shadowSampler,uv).x; 510	#endif 511	if (shadowPixelDepth>shadow) 512	{ 513	return computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff); 514	} 515 return 1.; 516	} 517	float computeShadowWithPoissonSampling(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float mapSize,float darkness,float frustumEdgeFalloff) 518	{ 519	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 520	vec2 uv=0.5*clipSpace.xy+vec2(0.5); 521	if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) 522	{ 523	return 1.0; 524	} 525	float shadowPixelDepth=clamp(depthMetric,0.,1.0); 526	float visibility=1.; 527	vec2 poissonDisk[4]; 528 poissonDisk[0]=vec2(-0.94201624,-0.39906216); 529 poissonDisk[1]=vec2(0.94558609,-0.76890725); 530 poissonDisk[2]=vec2(-0.094184101,-0.92938870); 531 poissonDisk[3]=vec2(0.34495938,0.29387760); 532	533	#ifndef SHADOWFLOAT 534	if (unpack(texture(shadowSampler,uv+poissonDisk[0]*mapSize))1.0 || uv.y<0. || uv.y>1.0) 551	{ 552	return 1.0; 553	} 554	float shadowPixelDepth=clamp(depthMetric,0.,1.0); 555	#ifndef SHADOWFLOAT 556	float shadowMapSample=unpack(texture(shadowSampler,uv)); 557 #else 558	float shadowMapSample=texture(shadowSampler,uv).x; 559 #endif 560	float esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness); 561	return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff); 562	} 563 float computeShadowWithCloseESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff) 564	{ 565	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 566	vec2 uv=0.5*clipSpace.xy+vec2(0.5); 567	if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) 568	{ 569	return 1.0; 570	} 571	float shadowPixelDepth=clamp(depthMetric,0.,1.0); 572	#ifndef SHADOWFLOAT 573	float shadowMapSample=unpack(texture(shadowSampler,uv)); 574 #else 575	float shadowMapSample=texture(shadowSampler,uv).x; 576 #endif 577	float esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.); 578	return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff); 579	} 580 #ifdef WEBGL2 581	582	float computeShadowWithPCF1(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,float darkness,float frustumEdgeFalloff) 583	{ 584	if (depthMetric>1.0 || depthMetric<0.0) { 585	return 1.0; 586	} 587 vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 588 vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); 589	float shadow=texture(shadowSampler,uvDepth); 590 shadow=mix(darkness,1.,shadow); 591	return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); 592	} 593 594	595	596	float computeShadowWithPCF3(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) 597	{ 598	if (depthMetric>1.0 || depthMetric<0.0) { 599	return 1.0; 600	} 601	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 602	vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); 603	vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; 604	uv+=0.5; 605	vec2 st=fract(uv); 606	vec2 base_uv=floor(uv)-0.5; 607 base_uv*=shadowMapSizeAndInverse.y; 608	609	610	611	612	vec2 uvw0=3.-2.*st; 613	vec2 uvw1=1.+2.*st; 614	vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y; 615	vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y; 616	float shadow=0.; 617 shadow+=uvw0.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z)); 618 shadow+=uvw1.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z)); 619 shadow+=uvw0.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z)); 620 shadow+=uvw1.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z)); 621	shadow=shadow/16.; 622	shadow=mix(darkness,1.,shadow); 623 return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); 624 } 625	626	627	628	float computeShadowWithPCF5(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) 629	{ 630	if (depthMetric>1.0 || depthMetric<0.0) { 631	return 1.0; 632	} 633	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 634	vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); 635	vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; 636	uv+=0.5; 637	vec2 st=fract(uv); 638	vec2 base_uv=floor(uv)-0.5; 639 base_uv*=shadowMapSizeAndInverse.y; 640	641	642	vec2 uvw0=4.-3.*st; 643	vec2 uvw1=vec2(7.); 644	vec2 uvw2=1.+3.*st; 645	vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y; 646 vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y; 647 float shadow=0.; 648 shadow+=uvw0.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z)); 649 shadow+=uvw1.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z)); 650 shadow+=uvw2.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[0]),uvDepth.z)); 651 shadow+=uvw0.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z)); 652 shadow+=uvw1.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z)); 653 shadow+=uvw2.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[1]),uvDepth.z)); 654 shadow+=uvw0.x*uvw2.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[2]),uvDepth.z)); 655 shadow+=uvw1.x*uvw2.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[2]),uvDepth.z)); 656 shadow+=uvw2.x*uvw2.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[2]),uvDepth.z)); 657	shadow=shadow/144.; 658	shadow=mix(darkness,1.,shadow); 659 return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); 660 } 661	const vec3 PoissonSamplers32[64]=vec3[64]( 662 vec3(0.06407013,0.05409927,0.), 663	vec3(0.7366577,0.5789394,0.), 664	vec3(-0.6270542,-0.5320278,0.), 665 vec3(-0.4096107,0.8411095,0.), 666	vec3(0.6849564,-0.4990818,0.), 667	vec3(-0.874181,-0.04579735,0.), 668 vec3(0.9989998,0.0009880066,0.), 669 vec3(-0.004920578,-0.9151649,0.), 670	vec3(0.1805763,0.9747483,0.), 671	vec3(-0.2138451,0.2635818,0.), 672	vec3(0.109845,0.3884785,0.), 673	vec3(0.06876755,-0.3581074,0.), 674 vec3(0.374073,-0.7661266,0.), 675	vec3(0.3079132,-0.1216763,0.), 676	vec3(-0.3794335,-0.8271583,0.), 677 vec3(-0.203878,-0.07715034,0.), 678	vec3(0.5912697,0.1469799,0.), 679	vec3(-0.88069,0.3031784,0.), 680	vec3(0.5040108,0.8283722,0.), 681	vec3(-0.5844124,0.5494877,0.), 682 vec3(0.6017799,-0.1726654,0.), 683	vec3(-0.5554981,0.1559997,0.), 684	vec3(-0.3016369,-0.3900928,0.), 685 vec3(-0.5550632,-0.1723762,0.), 686	vec3(0.925029,0.2995041,0.), 687	vec3(-0.2473137,0.5538505,0.), 688 vec3(0.9183037,-0.2862392,0.), 689	vec3(0.2469421,0.6718712,0.), 690	vec3(0.3916397,-0.4328209,0.), 691 vec3(-0.03576927,-0.6220032,0.), 692 vec3(-0.04661255,0.7995201,0.), 693	vec3(0.4402924,0.3640312,0.), 694	vec3(0.,0.,0.), 695	vec3(0.,0.,0.), 696	vec3(0.,0.,0.), 697 vec3(0.,0.,0.), 698	vec3(0.,0.,0.), 699	vec3(0.,0.,0.), 700 vec3(0.,0.,0.), 701	vec3(0.,0.,0.), 702	vec3(0.,0.,0.), 703 vec3(0.,0.,0.), 704	vec3(0.,0.,0.), 705	vec3(0.,0.,0.), 706 vec3(0.,0.,0.), 707	vec3(0.,0.,0.), 708	vec3(0.,0.,0.), 709 vec3(0.,0.,0.), 710	vec3(0.,0.,0.), 711	vec3(0.,0.,0.), 712 vec3(0.,0.,0.), 713	vec3(0.,0.,0.), 714	vec3(0.,0.,0.), 715 vec3(0.,0.,0.), 716	vec3(0.,0.,0.), 717	vec3(0.,0.,0.), 718 vec3(0.,0.,0.), 719	vec3(0.,0.,0.), 720	vec3(0.,0.,0.), 721 vec3(0.,0.,0.), 722	vec3(0.,0.,0.), 723	vec3(0.,0.,0.), 724 vec3(0.,0.,0.), 725	vec3(0.,0.,0.) 726	); 727	const vec3 PoissonSamplers64[64]=vec3[64]( 728	vec3(-0.613392,0.617481,0.), 729	vec3(0.170019,-0.040254,0.), 730	vec3(-0.299417,0.791925,0.), 731	vec3(0.645680,0.493210,0.), 732	vec3(-0.651784,0.717887,0.), 733	vec3(0.421003,0.027070,0.), 734	vec3(-0.817194,-0.271096,0.), 735	vec3(-0.705374,-0.668203,0.), 736	vec3(0.977050,-0.108615,0.), 737	vec3(0.063326,0.142369,0.), 738	vec3(0.203528,0.214331,0.), 739 vec3(-0.667531,0.326090,0.), 740	vec3(-0.098422,-0.295755,0.), 741 vec3(-0.885922,0.215369,0.), 742	vec3(0.566637,0.605213,0.), 743 vec3(0.039766,-0.396100,0.), 744	vec3(0.751946,0.453352,0.), 745 vec3(0.078707,-0.715323,0.), 746	vec3(-0.075838,-0.529344,0.), 747 vec3(0.724479,-0.580798,0.), 748	vec3(0.222999,-0.215125,0.), 749 vec3(-0.467574,-0.405438,0.), 750	vec3(-0.248268,-0.814753,0.), 751 vec3(0.354411,-0.887570,0.), 752	vec3(0.175817,0.382366,0.), 753 vec3(0.487472,-0.063082,0.), 754	vec3(-0.084078,0.898312,0.), 755 vec3(0.488876,-0.783441,0.), 756	vec3(0.470016,0.217933,0.), 757 vec3(-0.696890,-0.549791,0.), 758	vec3(-0.149693,0.605762,0.), 759 vec3(0.034211,0.979980,0.), 760	vec3(0.503098,-0.308878,0.), 761 vec3(-0.016205,-0.872921,0.), 762	vec3(0.385784,-0.393902,0.), 763 vec3(-0.146886,-0.859249,0.), 764	vec3(0.643361,0.164098,0.), 765 vec3(0.634388,-0.049471,0.), 766	vec3(-0.688894,0.007843,0.), 767 vec3(0.464034,-0.188818,0.), 768	vec3(-0.440840,0.137486,0.), 769 vec3(0.364483,0.511704,0.), 770	vec3(0.034028,0.325968,0.), 771 vec3(0.099094,-0.308023,0.), 772	vec3(0.693960,-0.366253,0.), 773 vec3(0.678884,-0.204688,0.), 774	vec3(0.001801,0.780328,0.), 775 vec3(0.145177,-0.898984,0.), 776	vec3(0.062655,-0.611866,0.), 777 vec3(0.315226,-0.604297,0.), 778	vec3(-0.780145,0.486251,0.), 779 vec3(-0.371868,0.882138,0.), 780	vec3(0.200476,0.494430,0.), 781 vec3(-0.494552,-0.711051,0.), 782	vec3(0.612476,0.705252,0.), 783 vec3(-0.578845,-0.768792,0.), 784	vec3(-0.772454,-0.090976,0.), 785 vec3(0.504440,0.372295,0.), 786	vec3(0.155736,0.065157,0.), 787 vec3(0.391522,0.849605,0.), 788	vec3(-0.620106,-0.328104,0.), 789 vec3(0.789239,-0.419965,0.), 790	vec3(-0.545396,0.538133,0.), 791 vec3(-0.178564,-0.596057,0.) 792	); 793	794	795	796	797	798	float computeShadowWithPCSS(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers) 799	{ 800	if (depthMetric>1.0 || depthMetric<0.0) { 801	return 1.0; 802	} 803	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 804	vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); 805	float blockerDepth=0.0; 806	float sumBlockerDepth=0.0; 807	float numBlocker=0.0; 808	for (int i=0; icurrRayHeight) 1208	{ 1209	float delta1=currSampledHeight-currRayHeight; 1210	float delta2=(currRayHeight+stepSize)-lastSampledHeight; 1211	float ratio=delta1/(delta1+delta2); 1212	vCurrOffset=(ratio)* vLastOffset+(1.0-ratio)*vCurrOffset; 1213	1214	break; 1215	} 1216 else 1217	{ 1218	currRayHeight-=stepSize; 1219 vLastOffset=vCurrOffset; 1220	vCurrOffset+=stepSize*vMaxOffset; 1221	lastSampledHeight=currSampledHeight; 1222	} 1223	} 1224	return vCurrOffset; 1225	} 1226	vec2 parallaxOffset(vec3 viewDir,float heightScale) 1227	{ 1228	1229	float height=texture(bumpSampler,vBumpUV).w; 1230	vec2 texCoordOffset=heightScale*viewDir.xy*height; 1231	return -texCoordOffset; 1232	} 1233	#endif 1234	#endif 1235	#ifdef CLIPPLANE 1236	in float fClipDistance; 1237	#endif 1238	#ifdef LOGARITHMICDEPTH 1239	uniform float logarithmicDepthConstant; 1240 in float vFragmentDepth; 1241	#endif 1242	#ifdef FOG 1243	#define FOGMODE_NONE 0. 1244	#define FOGMODE_EXP 1. 1245	#define FOGMODE_EXP2 2. 1246	#define FOGMODE_LINEAR 3. 1247	#define E 2.71828 1248	uniform vec4 vFogInfos; 1249	uniform vec3 vFogColor; 1250	in vec3 vFogDistance; 1251	float CalcFogFactor() 1252	{ 1253 float fogCoeff=1.0; 1254	float fogStart=vFogInfos.y; 1255	float fogEnd=vFogInfos.z; 1256	float fogDensity=vFogInfos.w; 1257	float fogDistance=length(vFogDistance); 1258	if (FOGMODE_LINEAR == vFogInfos.x) 1259	{ 1260	fogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart); 1261	} 1262	else if (FOGMODE_EXP == vFogInfos.x) 1263	{ 1264	fogCoeff=1.0/pow(E,fogDistance*fogDensity); 1265	} 1266	else if (FOGMODE_EXP2 == vFogInfos.x) 1267	{ 1268 fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity); 1269	} 1270	return clamp(fogCoeff,0.0,1.0); 1271	} 1272	#endif 1273 #define CUSTOM_FRAGMENT_DEFINITIONS 1274	out vec4 glFragColor; 1275 void main(void) { 1276	#define CUSTOM_FRAGMENT_MAIN_BEGIN 1277 #ifdef CLIPPLANE 1278	if (fClipDistance>0.0) 1279	{ 1280	discard; 1281	} 1282	#endif 1283	vec3 viewDirectionW=normalize(vEyePosition-vPositionW); 1284	1285	vec4 baseColor=vec4(1.,1.,1.,1.); 1286	vec3 diffuseColor=vDiffuseColor.rgb; 1287	1288	float alpha=vDiffuseColor.a; 1289	1290	#ifdef NORMAL 1291	vec3 normalW=normalize(vNormalW); 1292	#else 1293	vec3 normalW=normalize(-cross(dFdx(vPositionW),dFdy(vPositionW))); 1294 #endif 1295	vec2 uvOffset=vec2(0.0,0.0); 1296	#if defined(BUMP) || defined(PARALLAX) 1297	#ifdef NORMALXYSCALE 1298	float normalScale=1.0; 1299	#else 1300	float normalScale=vBumpInfos.y; 1301	#endif 1302	#if defined(TANGENT) && defined(NORMAL) 1303	mat3 TBN=vTBN; 1304	#else 1305	mat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,vBumpUV); 1306 #endif 1307	#endif 1308	#ifdef PARALLAX 1309	mat3 invTBN=transposeMat3(TBN); 1310	#ifdef PARALLAXOCCLUSION 1311 uvOffset=parallaxOcclusion(invTBN*-viewDirectionW,invTBN*normalW,vBumpUV,vBumpInfos.z); 1312	#else 1313	uvOffset=parallaxOffset(invTBN*viewDirectionW,vBumpInfos.z); 1314	#endif 1315	#endif 1316	#ifdef BUMP 1317	#ifdef OBJECTSPACE_NORMALMAP 1318 normalW=normalize(texture(bumpSampler,vBumpUV).xyz*2.0-1.0); 1319 normalW=normalize(mat3(normalMatrix)*normalW); 1320	#else 1321 normalW=perturbNormal(TBN,vBumpUV+uvOffset); 1322	#endif 1323 #endif 1324	#ifdef TWOSIDEDLIGHTING 1325	normalW=gl_FrontFacing ? normalW : -normalW; 1326	#endif 1327	#ifdef DIFFUSE 1328 baseColor=texture(diffuseSampler,vDiffuseUV+uvOffset); 1329	#ifdef ALPHATEST 1330	if (baseColor.a<0.4) 1331	discard; 1332	#endif 1333 #ifdef ALPHAFROMDIFFUSE 1334	alpha*=baseColor.a; 1335	#endif 1336 #define CUSTOM_FRAGMENT_UPDATE_ALPHA 1337 baseColor.rgb*=vDiffuseInfos.y; 1338	#endif 1339	#ifdef DEPTHPREPASS 1340	glFragColor=vec4(0.,0.,0.,1.0); 1341	return; 1342 #endif 1343	#ifdef VERTEXCOLOR 1344	baseColor.rgb*=vColor.rgb; 1345 #endif 1346	#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE 1347	1348	vec3 baseAmbientColor=vec3(1.,1.,1.); 1349	#ifdef AMBIENT 1350 baseAmbientColor=texture(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y; 1351	#endif 1352	#define CUSTOM_FRAGMENT_BEFORE_LIGHTS 1353	1354 #ifdef SPECULARTERM 1355	float glossiness=vSpecularColor.a; 1356 vec3 specularColor=vSpecularColor.rgb; 1357	#ifdef SPECULAR 1358 vec4 specularMapColor=texture(specularSampler,vSpecularUV+uvOffset); 1359	specularColor=specularMapColor.rgb; 1360	#ifdef GLOSSINESS 1361	glossiness=glossiness*specularMapColor.a; 1362	#endif 1363 #endif 1364	#else 1365	float glossiness=0.; 1366	#endif 1367	1368 vec3 diffuseBase=vec3(0.,0.,0.); 1369	lightingInfo info; 1370 #ifdef SPECULARTERM 1371	vec3 specularBase=vec3(0.,0.,0.); 1372 #endif 1373	float shadow=1.; 1374	#ifdef LIGHTMAP 1375	vec3 lightmapColor=texture(lightmapSampler,vLightmapUV+uvOffset).rgb*vLightmapInfos.y; 1376	#endif 1377	#ifdef LIGHT0 1378	#if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED0) && defined(LIGHTMAPNOSPECULAR0)) 1379	1380	#else 1381	#ifdef PBR 1382 #ifdef SPOTLIGHT0 1383 info=computeSpotLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDirection,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1384	#endif 1385	#ifdef HEMILIGHT0 1386 info=computeHemisphericLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightGround,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1387	#endif 1388	#if defined(POINTLIGHT0) || defined(DIRLIGHT0) 1389 info=computeLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1390	#endif 1391	#else 1392	#ifdef SPOTLIGHT0 1393 info=computeSpotLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDirection,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightDiffuse.a,glossiness); 1394	#endif 1395	#ifdef HEMILIGHT0 1396 info=computeHemisphericLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightGround,glossiness); 1397	#endif 1398	#if defined(POINTLIGHT0) || defined(DIRLIGHT0) 1399 info=computeLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightDiffuse.a,glossiness); 1400	#endif 1401	#endif 1402	#ifdef PROJECTEDLIGHTTEXTURE0 1403 info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler0,textureProjectionMatrix0); 1404	#endif 1405	#endif 1406	#ifdef SHADOW0 1407	#ifdef SHADOWCLOSEESM0 1408	#if defined(SHADOWCUBE0) 1409 shadow=computeShadowWithCloseESMCube(light0.vLightData.xyz,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.z,light0.depthValues); 1410	#else 1411 shadow=computeShadowWithCloseESM(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.z,light0.shadowsInfo.w); 1412	#endif 1413	#elif defined(SHADOWESM0) 1414	#if defined(SHADOWCUBE0) 1415 shadow=computeShadowWithESMCube(light0.vLightData.xyz,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.z,light0.depthValues); 1416	#else 1417 shadow=computeShadowWithESM(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.z,light0.shadowsInfo.w); 1418	#endif 1419	#elif defined(SHADOWPOISSON0) 1420	#if defined(SHADOWCUBE0) 1421 shadow=computeShadowWithPoissonSamplingCube(light0.vLightData.xyz,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.x,light0.depthValues); 1422	#else 1423 shadow=computeShadowWithPoissonSampling(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.x,light0.shadowsInfo.w); 1424	#endif 1425	#elif defined(SHADOWPCF0) 1426	#if defined(SHADOWLOWQUALITY0) 1427 shadow=computeShadowWithPCF1(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.w); 1428	#elif defined(SHADOWMEDIUMQUALITY0) 1429 shadow=computeShadowWithPCF3(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.yz,light0.shadowsInfo.x,light0.shadowsInfo.w); 1430	#else 1431 shadow=computeShadowWithPCF5(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.yz,light0.shadowsInfo.x,light0.shadowsInfo.w); 1432	#endif 1433	#elif defined(SHADOWPCSS0) 1434	#if defined(SHADOWLOWQUALITY0) 1435 shadow=computeShadowWithPCSS16(vPositionFromLight0,vDepthMetric0,depthSampler0,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.z,light0.shadowsInfo.x,light0.shadowsInfo.w); 1436	#elif defined(SHADOWMEDIUMQUALITY0) 1437 shadow=computeShadowWithPCSS32(vPositionFromLight0,vDepthMetric0,depthSampler0,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.z,light0.shadowsInfo.x,light0.shadowsInfo.w); 1438	#else 1439 shadow=computeShadowWithPCSS64(vPositionFromLight0,vDepthMetric0,depthSampler0,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.z,light0.shadowsInfo.x,light0.shadowsInfo.w); 1440	#endif 1441	#else 1442	#if defined(SHADOWCUBE0) 1443 shadow=computeShadowCube(light0.vLightData.xyz,shadowSampler0,light0.shadowsInfo.x,light0.depthValues); 1444	#else 1445 shadow=computeShadow(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.w); 1446	#endif 1447	#endif 1448	#ifdef SHADOWONLY 1449	#ifndef SHADOWINUSE 1450	#define SHADOWINUSE 1451	#endif 1452 globalShadow+=shadow; 1453	shadowLightCount+=1.0; 1454	#endif 1455 #else 1456	shadow=1.; 1457	#endif 1458	#ifndef SHADOWONLY 1459 #ifdef CUSTOMUSERLIGHTING 1460 diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); 1461	#ifdef SPECULARTERM 1462 specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); 1463	#endif 1464	#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED0) 1465	diffuseBase+=lightmapColor*shadow; 1466	#ifdef SPECULARTERM 1467	#ifndef LIGHTMAPNOSPECULAR0 1468 specularBase+=info.specular*shadow*lightmapColor; 1469	#endif 1470 #endif 1471	#else 1472	diffuseBase+=info.diffuse*shadow; 1473 #ifdef SPECULARTERM 1474	specularBase+=info.specular*shadow; 1475 #endif 1476	#endif 1477	#endif 1478	#endif 1479	#ifdef LIGHT1 1480 #if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED1) && defined(LIGHTMAPNOSPECULAR1)) 1481 1482	#else 1483	#ifdef PBR 1484	#ifdef SPOTLIGHT1 1485 info=computeSpotLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDirection,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1486	#endif 1487	#ifdef HEMILIGHT1 1488 info=computeHemisphericLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightGround,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1489	#endif 1490	#if defined(POINTLIGHT1) || defined(DIRLIGHT1) 1491 info=computeLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1492	#endif 1493	#else 1494	#ifdef SPOTLIGHT1 1495 info=computeSpotLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDirection,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightDiffuse.a,glossiness); 1496	#endif 1497	#ifdef HEMILIGHT1 1498 info=computeHemisphericLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightGround,glossiness); 1499	#endif 1500	#if defined(POINTLIGHT1) || defined(DIRLIGHT1) 1501 info=computeLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightDiffuse.a,glossiness); 1502	#endif 1503	#endif 1504	#ifdef PROJECTEDLIGHTTEXTURE1 1505 info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler1,textureProjectionMatrix1); 1506	#endif 1507	#endif 1508	#ifdef SHADOW1 1509	#ifdef SHADOWCLOSEESM1 1510	#if defined(SHADOWCUBE1) 1511 shadow=computeShadowWithCloseESMCube(light1.vLightData.xyz,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.z,light1.depthValues); 1512	#else 1513 shadow=computeShadowWithCloseESM(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.z,light1.shadowsInfo.w); 1514	#endif 1515	#elif defined(SHADOWESM1) 1516	#if defined(SHADOWCUBE1) 1517 shadow=computeShadowWithESMCube(light1.vLightData.xyz,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.z,light1.depthValues); 1518	#else 1519 shadow=computeShadowWithESM(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.z,light1.shadowsInfo.w); 1520	#endif 1521	#elif defined(SHADOWPOISSON1) 1522	#if defined(SHADOWCUBE1) 1523 shadow=computeShadowWithPoissonSamplingCube(light1.vLightData.xyz,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.x,light1.depthValues); 1524	#else 1525 shadow=computeShadowWithPoissonSampling(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.x,light1.shadowsInfo.w); 1526	#endif 1527	#elif defined(SHADOWPCF1) 1528	#if defined(SHADOWLOWQUALITY1) 1529 shadow=computeShadowWithPCF1(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.w); 1530	#elif defined(SHADOWMEDIUMQUALITY1) 1531 shadow=computeShadowWithPCF3(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.yz,light1.shadowsInfo.x,light1.shadowsInfo.w); 1532	#else 1533 shadow=computeShadowWithPCF5(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.yz,light1.shadowsInfo.x,light1.shadowsInfo.w); 1534	#endif 1535	#elif defined(SHADOWPCSS1) 1536	#if defined(SHADOWLOWQUALITY1) 1537 shadow=computeShadowWithPCSS16(vPositionFromLight1,vDepthMetric1,depthSampler1,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.z,light1.shadowsInfo.x,light1.shadowsInfo.w); 1538	#elif defined(SHADOWMEDIUMQUALITY1) 1539 shadow=computeShadowWithPCSS32(vPositionFromLight1,vDepthMetric1,depthSampler1,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.z,light1.shadowsInfo.x,light1.shadowsInfo.w); 1540	#else 1541 shadow=computeShadowWithPCSS64(vPositionFromLight1,vDepthMetric1,depthSampler1,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.z,light1.shadowsInfo.x,light1.shadowsInfo.w); 1542	#endif 1543	#else 1544	#if defined(SHADOWCUBE1) 1545 shadow=computeShadowCube(light1.vLightData.xyz,shadowSampler1,light1.shadowsInfo.x,light1.depthValues); 1546	#else 1547 shadow=computeShadow(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.w); 1548	#endif 1549	#endif 1550	#ifdef SHADOWONLY 1551	#ifndef SHADOWINUSE 1552	#define SHADOWINUSE 1553	#endif 1554 globalShadow+=shadow; 1555	shadowLightCount+=1.0; 1556	#endif 1557 #else 1558	shadow=1.; 1559	#endif 1560	#ifndef SHADOWONLY 1561 #ifdef CUSTOMUSERLIGHTING 1562 diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); 1563	#ifdef SPECULARTERM 1564 specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); 1565	#endif 1566	#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED1) 1567	diffuseBase+=lightmapColor*shadow; 1568	#ifdef SPECULARTERM 1569	#ifndef LIGHTMAPNOSPECULAR1 1570 specularBase+=info.specular*shadow*lightmapColor; 1571	#endif 1572 #endif 1573	#else 1574	diffuseBase+=info.diffuse*shadow; 1575 #ifdef SPECULARTERM 1576	specularBase+=info.specular*shadow; 1577 #endif 1578	#endif 1579	#endif 1580	#endif 1581	#ifdef LIGHT2 1582 #if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED2) && defined(LIGHTMAPNOSPECULAR2)) 1583 1584	#else 1585	#ifdef PBR 1586	#ifdef SPOTLIGHT2 1587 info=computeSpotLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDirection,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1588	#endif 1589	#ifdef HEMILIGHT2 1590 info=computeHemisphericLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightGround,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1591	#endif 1592	#if defined(POINTLIGHT2) || defined(DIRLIGHT2) 1593 info=computeLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1594	#endif 1595	#else 1596	#ifdef SPOTLIGHT2 1597 info=computeSpotLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDirection,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightDiffuse.a,glossiness); 1598	#endif 1599	#ifdef HEMILIGHT2 1600 info=computeHemisphericLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightGround,glossiness); 1601	#endif 1602	#if defined(POINTLIGHT2) || defined(DIRLIGHT2) 1603 info=computeLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightDiffuse.a,glossiness); 1604	#endif 1605	#endif 1606	#ifdef PROJECTEDLIGHTTEXTURE2 1607 info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler2,textureProjectionMatrix2); 1608	#endif 1609	#endif 1610	#ifdef SHADOW2 1611	#ifdef SHADOWCLOSEESM2 1612	#if defined(SHADOWCUBE2) 1613 shadow=computeShadowWithCloseESMCube(light2.vLightData.xyz,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.z,light2.depthValues); 1614	#else 1615 shadow=computeShadowWithCloseESM(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.z,light2.shadowsInfo.w); 1616	#endif 1617	#elif defined(SHADOWESM2) 1618	#if defined(SHADOWCUBE2) 1619 shadow=computeShadowWithESMCube(light2.vLightData.xyz,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.z,light2.depthValues); 1620	#else 1621 shadow=computeShadowWithESM(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.z,light2.shadowsInfo.w); 1622	#endif 1623	#elif defined(SHADOWPOISSON2) 1624	#if defined(SHADOWCUBE2) 1625 shadow=computeShadowWithPoissonSamplingCube(light2.vLightData.xyz,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.x,light2.depthValues); 1626	#else 1627 shadow=computeShadowWithPoissonSampling(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.x,light2.shadowsInfo.w); 1628	#endif 1629	#elif defined(SHADOWPCF2) 1630	#if defined(SHADOWLOWQUALITY2) 1631 shadow=computeShadowWithPCF1(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.w); 1632	#elif defined(SHADOWMEDIUMQUALITY2) 1633 shadow=computeShadowWithPCF3(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.yz,light2.shadowsInfo.x,light2.shadowsInfo.w); 1634	#else 1635 shadow=computeShadowWithPCF5(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.yz,light2.shadowsInfo.x,light2.shadowsInfo.w); 1636	#endif 1637	#elif defined(SHADOWPCSS2) 1638	#if defined(SHADOWLOWQUALITY2) 1639 shadow=computeShadowWithPCSS16(vPositionFromLight2,vDepthMetric2,depthSampler2,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.z,light2.shadowsInfo.x,light2.shadowsInfo.w); 1640	#elif defined(SHADOWMEDIUMQUALITY2) 1641 shadow=computeShadowWithPCSS32(vPositionFromLight2,vDepthMetric2,depthSampler2,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.z,light2.shadowsInfo.x,light2.shadowsInfo.w); 1642	#else 1643 shadow=computeShadowWithPCSS64(vPositionFromLight2,vDepthMetric2,depthSampler2,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.z,light2.shadowsInfo.x,light2.shadowsInfo.w); 1644	#endif 1645	#else 1646	#if defined(SHADOWCUBE2) 1647 shadow=computeShadowCube(light2.vLightData.xyz,shadowSampler2,light2.shadowsInfo.x,light2.depthValues); 1648	#else 1649 shadow=computeShadow(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.w); 1650	#endif 1651	#endif 1652	#ifdef SHADOWONLY 1653	#ifndef SHADOWINUSE 1654	#define SHADOWINUSE 1655	#endif 1656 globalShadow+=shadow; 1657	shadowLightCount+=1.0; 1658	#endif 1659 #else 1660	shadow=1.; 1661	#endif 1662	#ifndef SHADOWONLY 1663 #ifdef CUSTOMUSERLIGHTING 1664 diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); 1665	#ifdef SPECULARTERM 1666 specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); 1667	#endif 1668	#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED2) 1669	diffuseBase+=lightmapColor*shadow; 1670	#ifdef SPECULARTERM 1671	#ifndef LIGHTMAPNOSPECULAR2 1672 specularBase+=info.specular*shadow*lightmapColor; 1673	#endif 1674 #endif 1675	#else 1676	diffuseBase+=info.diffuse*shadow; 1677 #ifdef SPECULARTERM 1678	specularBase+=info.specular*shadow; 1679 #endif 1680	#endif 1681	#endif 1682	#endif 1683	#ifdef LIGHT3 1684 #if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED3) && defined(LIGHTMAPNOSPECULAR3)) 1685 1686	#else 1687	#ifdef PBR 1688	#ifdef SPOTLIGHT3 1689 info=computeSpotLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDirection,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1690	#endif 1691	#ifdef HEMILIGHT3 1692 info=computeHemisphericLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightGround,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1693	#endif 1694	#if defined(POINTLIGHT3) || defined(DIRLIGHT3) 1695 info=computeLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1696	#endif 1697	#else 1698	#ifdef SPOTLIGHT3 1699 info=computeSpotLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDirection,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightDiffuse.a,glossiness); 1700	#endif 1701	#ifdef HEMILIGHT3 1702 info=computeHemisphericLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightGround,glossiness); 1703	#endif 1704	#if defined(POINTLIGHT3) || defined(DIRLIGHT3) 1705 info=computeLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightDiffuse.a,glossiness); 1706	#endif 1707	#endif 1708	#ifdef PROJECTEDLIGHTTEXTURE3 1709 info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler3,textureProjectionMatrix3); 1710	#endif 1711	#endif 1712	#ifdef SHADOW3 1713	#ifdef SHADOWCLOSEESM3 1714	#if defined(SHADOWCUBE3) 1715 shadow=computeShadowWithCloseESMCube(light3.vLightData.xyz,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.z,light3.depthValues); 1716	#else 1717 shadow=computeShadowWithCloseESM(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.z,light3.shadowsInfo.w); 1718	#endif 1719	#elif defined(SHADOWESM3) 1720	#if defined(SHADOWCUBE3) 1721 shadow=computeShadowWithESMCube(light3.vLightData.xyz,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.z,light3.depthValues); 1722	#else 1723 shadow=computeShadowWithESM(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.z,light3.shadowsInfo.w); 1724	#endif 1725	#elif defined(SHADOWPOISSON3) 1726	#if defined(SHADOWCUBE3) 1727 shadow=computeShadowWithPoissonSamplingCube(light3.vLightData.xyz,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.x,light3.depthValues); 1728	#else 1729 shadow=computeShadowWithPoissonSampling(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.x,light3.shadowsInfo.w); 1730	#endif 1731	#elif defined(SHADOWPCF3) 1732	#if defined(SHADOWLOWQUALITY3) 1733 shadow=computeShadowWithPCF1(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.w); 1734	#elif defined(SHADOWMEDIUMQUALITY3) 1735 shadow=computeShadowWithPCF3(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.yz,light3.shadowsInfo.x,light3.shadowsInfo.w); 1736	#else 1737 shadow=computeShadowWithPCF5(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.yz,light3.shadowsInfo.x,light3.shadowsInfo.w); 1738	#endif 1739	#elif defined(SHADOWPCSS3) 1740	#if defined(SHADOWLOWQUALITY3) 1741 shadow=computeShadowWithPCSS16(vPositionFromLight3,vDepthMetric3,depthSampler3,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.z,light3.shadowsInfo.x,light3.shadowsInfo.w); 1742	#elif defined(SHADOWMEDIUMQUALITY3) 1743 shadow=computeShadowWithPCSS32(vPositionFromLight3,vDepthMetric3,depthSampler3,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.z,light3.shadowsInfo.x,light3.shadowsInfo.w); 1744	#else 1745 shadow=computeShadowWithPCSS64(vPositionFromLight3,vDepthMetric3,depthSampler3,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.z,light3.shadowsInfo.x,light3.shadowsInfo.w); 1746	#endif 1747	#else 1748	#if defined(SHADOWCUBE3) 1749 shadow=computeShadowCube(light3.vLightData.xyz,shadowSampler3,light3.shadowsInfo.x,light3.depthValues); 1750	#else 1751 shadow=computeShadow(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.w); 1752	#endif 1753	#endif 1754	#ifdef SHADOWONLY 1755	#ifndef SHADOWINUSE 1756	#define SHADOWINUSE 1757	#endif 1758 globalShadow+=shadow; 1759	shadowLightCount+=1.0; 1760	#endif 1761 #else 1762	shadow=1.; 1763	#endif 1764	#ifndef SHADOWONLY 1765 #ifdef CUSTOMUSERLIGHTING 1766 diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); 1767	#ifdef SPECULARTERM 1768 specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); 1769	#endif 1770	#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED3) 1771	diffuseBase+=lightmapColor*shadow; 1772	#ifdef SPECULARTERM 1773	#ifndef LIGHTMAPNOSPECULAR3 1774 specularBase+=info.specular*shadow*lightmapColor; 1775	#endif 1776 #endif 1777	#else 1778	diffuseBase+=info.diffuse*shadow; 1779 #ifdef SPECULARTERM 1780	specularBase+=info.specular*shadow; 1781 #endif 1782	#endif 1783	#endif 1784	#endif 1785	1786	1787	vec3 refractionColor=vec3(0.,0.,0.); 1788	#ifdef REFRACTION 1789	vec3 refractionVector=normalize(refract(-viewDirectionW,normalW,vRefractionInfos.y)); 1790	#ifdef REFRACTIONMAP_3D 1791 refractionVector.y=refractionVector.y*vRefractionInfos.w; 1792	if (dot(refractionVector,viewDirectionW)<1.0) { 1793 refractionColor=texture(refractionCubeSampler,refractionVector).rgb; 1794	} 1795	#else 1796	vec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0))); 1797	vec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z; 1798 refractionCoords.y=1.0-refractionCoords.y; 1799 refractionColor=texture(refraction2DSampler,refractionCoords).rgb; 1800	#endif 1801	#ifdef IS_REFRACTION_LINEAR 1802 refractionColor=toGammaSpace(refractionColor); 1803	#endif 1804 refractionColor*=vRefractionInfos.x; 1805	#endif 1806	1807	vec3 reflectionColor=vec3(0.,0.,0.); 1808	#ifdef REFLECTION 1809	vec3 vReflectionUVW=computeReflectionCoords(vec4(vPositionW,1.0),normalW); 1810	#ifdef REFLECTIONMAP_3D 1811	#ifdef ROUGHNESS 1812	float bias=vReflectionInfos.y; 1813	#ifdef SPECULARTERM 1814	#ifdef SPECULAR 1815	#ifdef GLOSSINESS 1816	bias*=(1.0-specularMapColor.a); 1817	#endif 1818	#endif 1819	#endif 1820 reflectionColor=texture(reflectionCubeSampler,vReflectionUVW,bias).rgb; 1821	#else 1822 reflectionColor=texture(reflectionCubeSampler,vReflectionUVW).rgb; 1823	#endif 1824	#else 1825	vec2 coords=vReflectionUVW.xy; 1826 #ifdef REFLECTIONMAP_PROJECTION 1827	coords/=vReflectionUVW.z; 1828 #endif 1829	coords.y=1.0-coords.y; 1830 reflectionColor=texture(reflection2DSampler,coords).rgb; 1831 #endif 1832	#ifdef IS_REFLECTION_LINEAR 1833 reflectionColor=toGammaSpace(reflectionColor); 1834	#endif 1835 reflectionColor*=vReflectionInfos.x; 1836	#ifdef REFLECTIONFRESNEL 1837	float reflectionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,reflectionRightColor.a,reflectionLeftColor.a); 1838	#ifdef REFLECTIONFRESNELFROMSPECULAR 1839	#ifdef SPECULARTERM 1840	reflectionColor*=specularColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; 1841	#else 1842	reflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; 1843	#endif 1844	#else 1845 reflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; 1846	#endif 1847	#endif 1848	#endif 1849	#ifdef REFRACTIONFRESNEL 1850	float refractionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,refractionRightColor.a,refractionLeftColor.a); 1851	refractionColor*=refractionLeftColor.rgb*(1.0-refractionFresnelTerm)+refractionFresnelTerm*refractionRightColor.rgb; 1852	#endif 1853	#ifdef OPACITY 1854	vec4 opacityMap=texture(opacitySampler,vOpacityUV+uvOffset); 1855	#ifdef OPACITYRGB 1856	opacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11); 1857	alpha*=(opacityMap.x+opacityMap.y+opacityMap.z)* vOpacityInfos.y; 1858	#else 1859 alpha*=opacityMap.a*vOpacityInfos.y; 1860	#endif 1861	#endif 1862 #ifdef VERTEXALPHA 1863	alpha*=vColor.a; 1864	#endif 1865	#ifdef OPACITYFRESNEL 1866	float opacityFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,opacityParts.z,opacityParts.w); 1867	alpha+=opacityParts.x*(1.0-opacityFresnelTerm)+opacityFresnelTerm*opacityParts.y; 1868	#endif 1869	1870	vec3 emissiveColor=vEmissiveColor; 1871	#ifdef EMISSIVE 1872 emissiveColor+=texture(emissiveSampler,vEmissiveUV+uvOffset).rgb*vEmissiveInfos.y; 1873	#endif 1874	#ifdef EMISSIVEFRESNEL 1875	float emissiveFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,emissiveRightColor.a,emissiveLeftColor.a); 1876	emissiveColor*=emissiveLeftColor.rgb*(1.0-emissiveFresnelTerm)+emissiveFresnelTerm*emissiveRightColor.rgb; 1877	#endif 1878	1879	#ifdef DIFFUSEFRESNEL 1880	float diffuseFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,diffuseRightColor.a,diffuseLeftColor.a); 1881	diffuseBase*=diffuseLeftColor.rgb*(1.0-diffuseFresnelTerm)+diffuseFresnelTerm*diffuseRightColor.rgb; 1882 #endif 1883	1884	#ifdef EMISSIVEASILLUMINATION 1885	vec3 finalDiffuse=clamp(diffuseBase*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb; 1886	#else 1887	#ifdef LINKEMISSIVEWITHDIFFUSE 1888	vec3 finalDiffuse=clamp((diffuseBase+emissiveColor)*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb; 1889	#else 1890	vec3 finalDiffuse=clamp(diffuseBase*diffuseColor+emissiveColor+vAmbientColor,0.0,1.0)*baseColor.rgb; 1891	#endif 1892	#endif 1893	#ifdef SPECULARTERM 1894	vec3 finalSpecular=specularBase*specularColor; 1895	#ifdef SPECULAROVERALPHA 1896 alpha=clamp(alpha+dot(finalSpecular,vec3(0.3,0.59,0.11)),0.,1.); 1897	#endif 1898	#else 1899	vec3 finalSpecular=vec3(0.0); 1900 #endif 1901	#ifdef REFLECTIONOVERALPHA 1902 alpha=clamp(alpha+dot(reflectionColor,vec3(0.3,0.59,0.11)),0.,1.); 1903	#endif 1904	1905	#ifdef EMISSIVEASILLUMINATION 1906	vec4 color=vec4(clamp(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+emissiveColor+refractionColor,0.0,1.0),alpha); 1907	#else 1908	vec4 color=vec4(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+refractionColor,alpha); 1909	#endif 1910	1911	#ifdef LIGHTMAP 1912	#ifndef LIGHTMAPEXCLUDED 1913	#ifdef USELIGHTMAPASSHADOWMAP 1914	color.rgb*=lightmapColor; 1915	#else 1916	color.rgb+=lightmapColor; 1917	#endif 1918	#endif 1919	#endif 1920	#define CUSTOM_FRAGMENT_BEFORE_FOG 1921 color.rgb=max(color.rgb,0.); 1922	#ifdef LOGARITHMICDEPTH 1923 gl_FragDepth=log2(vFragmentDepth)*logarithmicDepthConstant*0.5; 1924	#endif 1925	#ifdef FOG 1926	float fog=CalcFogFactor(); 1927 color.rgb=fog*color.rgb+(1.0-fog)*vFogColor; 1928	#endif 1929	1930 1931	#ifdef IMAGEPROCESSINGPOSTPROCESS 1932 color.rgb=toLinearSpace(color.rgb); 1933	#else 1934	#ifdef IMAGEPROCESSING 1935	color.rgb=toLinearSpace(color.rgb); 1936 color=applyImageProcessing(color); 1937	#endif 1938	#endif 1939 #ifdef PREMULTIPLYALPHA 1940	1941	color.rgb*=color.a; 1942	#endif 1943	#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR 1944 glFragColor=color; 1945	} 1946

[22:23:13]: Vertex shader: default 1	#version 300 es 2	#define WEBGL2 3	#define MAINUV1 4	#define DIFFUSE 5	#define DIFFUSEDIRECTUV 1 6	#define AMBIENTDIRECTUV 0 7	#define OPACITYDIRECTUV 0 8	#define EMISSIVEDIRECTUV 0 9	#define SPECULARDIRECTUV 0 10	#define BUMPDIRECTUV 0 11	12	#define NORMAL 13	#define UV1 14	#define NUM_BONE_INFLUENCERS 0 15	#define BonesPerMesh 0 16	#define LIGHTMAPDIRECTUV 0 17	#define SHADOWFLOAT 18	#define NUM_MORPH_INFLUENCERS 0 19	#define VIGNETTEBLENDMODEMULTIPLY 20	#define SAMPLER3DGREENDEPTH 21	#define SAMPLER3DBGRMAP 22	#define LIGHT0 23	#define SPOTLIGHT0 24	#define SHADOW0 25	#define SHADOWPCF0 26	#define SHADOWS 27	28	#define SHADER_NAME vertex:default 29	precision highp float; 30 layout(std140,column_major) uniform; 31	uniform Material 32	{ 33 vec4 diffuseLeftColor; 34	vec4 diffuseRightColor; 35	vec4 opacityParts; 36	vec4 reflectionLeftColor; 37	vec4 reflectionRightColor; 38	vec4 refractionLeftColor; 39	vec4 refractionRightColor; 40	vec4 emissiveLeftColor; 41	vec4 emissiveRightColor; 42	vec2 vDiffuseInfos; 43	vec2 vAmbientInfos; 44	vec2 vOpacityInfos; 45	vec2 vReflectionInfos; 46	vec3 vReflectionPosition; 47	vec3 vReflectionSize; 48	vec2 vEmissiveInfos; 49	vec2 vLightmapInfos; 50	vec2 vSpecularInfos; 51 vec3 vBumpInfos; 52	mat4 diffuseMatrix; 53	mat4 ambientMatrix; 54 mat4 opacityMatrix; 55	mat4 reflectionMatrix; 56	mat4 emissiveMatrix; 57	mat4 lightmapMatrix; 58	mat4 specularMatrix; 59 mat4 bumpMatrix; 60	vec4 vTangentSpaceParams; 61	mat4 refractionMatrix; 62	vec4 vRefractionInfos; 63	vec4 vSpecularColor; 64	vec3 vEmissiveColor; 65	vec4 vDiffuseColor; 66	float pointSize; 67	}; 68	uniform Scene { 69	mat4 viewProjection; 70	mat4 view; 71 }; 72	73	#define CUSTOM_VERTEX_BEGIN 74	in vec3 position; 75	#ifdef NORMAL 76	in vec3 normal; 77	#endif 78	#ifdef TANGENT 79	in vec4 tangent; 80	#endif 81	#ifdef UV1 82	in vec2 uv; 83	#endif 84	#ifdef UV2 85	in vec2 uv2; 86	#endif 87	#ifdef VERTEXCOLOR 88	in vec4 color; 89	#endif 90	const float PI=3.1415926535897932384626433832795; 91	const float LinearEncodePowerApprox=2.2; 92	const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox; 93	const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722); 94	mat3 transposeMat3(mat3 inMatrix) { 95	vec3 i0=inMatrix[0]; 96	vec3 i1=inMatrix[1]; 97	vec3 i2=inMatrix[2]; 98	mat3 outMatrix=mat3( 99 vec3(i0.x,i1.x,i2.x), 100	vec3(i0.y,i1.y,i2.y), 101 vec3(i0.z,i1.z,i2.z) 102	); 103	return outMatrix; 104	} 105	106 mat3 inverseMat3(mat3 inMatrix) { 107	float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2]; 108	float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2]; 109	float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2]; 110	float b01=a22*a11-a12*a21; 111	float b11=-a22*a10+a12*a20; 112	float b21=a21*a10-a11*a20; 113	float det=a00*b01+a01*b11+a02*b21; 114 return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11), 115	b11,(a22*a00-a02*a20),(-a12*a00+a02*a10), 116	b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det; 117	} 118	float computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff) 119	{ 120	float mask=smoothstep(1.0-frustumEdgeFalloff,1.0,clamp(dot(clipSpace,clipSpace),0.,1.)); 121 return mix(value,1.0,mask); 122	} 123	vec3 applyEaseInOut(vec3 x){ 124	return x*x*(3.0-2.0*x); 125	} 126	vec3 toLinearSpace(vec3 color) 127	{ 128	return pow(color,vec3(LinearEncodePowerApprox)); 129	} 130	vec3 toGammaSpace(vec3 color) 131	{ 132	return pow(color,vec3(GammaEncodePowerApprox)); 133	} 134	float square(float value) 135	{ 136	return value*value; 137	} 138	float getLuminance(vec3 color) 139	{ 140	return clamp(dot(color,LuminanceEncodeApprox),0.,1.); 141	} 142	143	float getRand(vec2 seed) { 144	return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453); 145	} 146	float dither(vec2 seed,float varianceAmount) { 147	float rand=getRand(seed); 148 float dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand); 149	return dither; 150	} 151	#if NUM_BONE_INFLUENCERS>0 152	uniform mat4 mBones[BonesPerMesh]; 153	in vec4 matricesIndices; 154	in vec4 matricesWeights; 155	#if NUM_BONE_INFLUENCERS>4 156	in vec4 matricesIndicesExtra; 157	in vec4 matricesWeightsExtra; 158	#endif 159	#endif 160	161	#ifdef INSTANCES 162	in vec4 world0; 163	in vec4 world1; 164	in vec4 world2; 165	in vec4 world3; 166	#else 167 uniform mat4 world; 168	#endif 169	#ifdef MAINUV1 170	out vec2 vMainUV1; 171	#endif 172	#ifdef MAINUV2 173	out vec2 vMainUV2; 174 #endif 175	#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 176	out vec2 vDiffuseUV; 177	#endif 178	#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 179	out vec2 vAmbientUV; 180	#endif 181	#if defined(OPACITY) && OPACITYDIRECTUV == 0 182	out vec2 vOpacityUV; 183	#endif 184	#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 185 out vec2 vEmissiveUV; 186	#endif 187	#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 188	out vec2 vLightmapUV; 189	#endif 190	#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 191	out vec2 vSpecularUV; 192	#endif 193	#if defined(BUMP) && BUMPDIRECTUV == 0 194	out vec2 vBumpUV; 195	#endif 196	197	out vec3 vPositionW; 198	#ifdef NORMAL 199	out vec3 vNormalW; 200	#endif 201 #ifdef VERTEXCOLOR 202	out vec4 vColor; 203	#endif 204	#if defined(BUMP) || defined(PARALLAX) 205	#if defined(TANGENT) && defined(NORMAL) 206	out mat3 vTBN; 207	#endif 208	#endif 209	210 #ifdef CLIPPLANE 211	uniform vec4 vClipPlane; 212	out float fClipDistance; 213	#endif 214	#ifdef FOG 215	out vec3 vFogDistance; 216	#endif 217	#ifdef LIGHT0 218	uniform Light0 219	{ 220	vec4 vLightData; 221	vec4 vLightDiffuse; 222	vec3 vLightSpecular; 223 #ifdef SPOTLIGHT0 224	vec4 vLightDirection; 225	#endif 226	#ifdef HEMILIGHT0 227	vec3 vLightGround; 228	#endif 229	vec4 shadowsInfo; 230	vec2 depthValues; 231	} light0; 232	#ifdef PROJECTEDLIGHTTEXTURE0 233	uniform mat4 textureProjectionMatrix0; 234	uniform sampler2D projectionLightSampler0; 235	#endif 236 #ifdef SHADOW0 237	#if defined(SHADOWCUBE0) 238	uniform samplerCube shadowSampler0; 239	#else 240	out vec4 vPositionFromLight0; 241	out float vDepthMetric0; 242	#if defined(SHADOWPCSS0) 243	uniform highp sampler2DShadow shadowSampler0; 244	uniform highp sampler2D depthSampler0; 245	#elif defined(SHADOWPCF0) 246	uniform highp sampler2DShadow shadowSampler0; 247	#else 248	uniform sampler2D shadowSampler0; 249	#endif 250	uniform mat4 lightMatrix0; 251 #endif 252	#endif 253	#endif 254	#ifdef LIGHT1 255	uniform Light1 256	{ 257	vec4 vLightData; 258	vec4 vLightDiffuse; 259	vec3 vLightSpecular; 260	#ifdef SPOTLIGHT1 261	vec4 vLightDirection; 262 #endif 263	#ifdef HEMILIGHT1 264	vec3 vLightGround; 265	#endif 266 vec4 shadowsInfo; 267	vec2 depthValues; 268	} light1; 269	#ifdef PROJECTEDLIGHTTEXTURE1 270	uniform mat4 textureProjectionMatrix1; 271	uniform sampler2D projectionLightSampler1; 272	#endif 273 #ifdef SHADOW1 274	#if defined(SHADOWCUBE1) 275	uniform samplerCube shadowSampler1; 276	#else 277	out vec4 vPositionFromLight1; 278	out float vDepthMetric1; 279	#if defined(SHADOWPCSS1) 280	uniform highp sampler2DShadow shadowSampler1; 281	uniform highp sampler2D depthSampler1; 282	#elif defined(SHADOWPCF1) 283	uniform highp sampler2DShadow shadowSampler1; 284	#else 285	uniform sampler2D shadowSampler1; 286	#endif 287	uniform mat4 lightMatrix1; 288 #endif 289	#endif 290	#endif 291	#ifdef LIGHT2 292	uniform Light2 293	{ 294	vec4 vLightData; 295	vec4 vLightDiffuse; 296	vec3 vLightSpecular; 297	#ifdef SPOTLIGHT2 298	vec4 vLightDirection; 299 #endif 300	#ifdef HEMILIGHT2 301	vec3 vLightGround; 302	#endif 303 vec4 shadowsInfo; 304	vec2 depthValues; 305	} light2; 306	#ifdef PROJECTEDLIGHTTEXTURE2 307	uniform mat4 textureProjectionMatrix2; 308	uniform sampler2D projectionLightSampler2; 309	#endif 310 #ifdef SHADOW2 311	#if defined(SHADOWCUBE2) 312	uniform samplerCube shadowSampler2; 313	#else 314	out vec4 vPositionFromLight2; 315	out float vDepthMetric2; 316	#if defined(SHADOWPCSS2) 317	uniform highp sampler2DShadow shadowSampler2; 318	uniform highp sampler2D depthSampler2; 319	#elif defined(SHADOWPCF2) 320	uniform highp sampler2DShadow shadowSampler2; 321	#else 322	uniform sampler2D shadowSampler2; 323	#endif 324	uniform mat4 lightMatrix2; 325 #endif 326	#endif 327	#endif 328	#ifdef LIGHT3 329	uniform Light3 330	{ 331	vec4 vLightData; 332	vec4 vLightDiffuse; 333	vec3 vLightSpecular; 334	#ifdef SPOTLIGHT3 335	vec4 vLightDirection; 336 #endif 337	#ifdef HEMILIGHT3 338	vec3 vLightGround; 339	#endif 340 vec4 shadowsInfo; 341	vec2 depthValues; 342	} light3; 343	#ifdef PROJECTEDLIGHTTEXTURE3 344	uniform mat4 textureProjectionMatrix3; 345	uniform sampler2D projectionLightSampler3; 346	#endif 347 #ifdef SHADOW3 348	#if defined(SHADOWCUBE3) 349	uniform samplerCube shadowSampler3; 350	#else 351	out vec4 vPositionFromLight3; 352	out float vDepthMetric3; 353	#if defined(SHADOWPCSS3) 354	uniform highp sampler2DShadow shadowSampler3; 355	uniform highp sampler2D depthSampler3; 356	#elif defined(SHADOWPCF3) 357	uniform highp sampler2DShadow shadowSampler3; 358	#else 359	uniform sampler2D shadowSampler3; 360	#endif 361	uniform mat4 lightMatrix3; 362 #endif 363	#endif 364	#endif 365	366	#ifdef MORPHTARGETS 367 uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS]; 368 #endif 369	370	#ifdef REFLECTIONMAP_SKYBOX 371	out vec3 vPositionUVW; 372	#endif 373	#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) 374	out vec3 vDirectionW; 375	#endif 376	#ifdef LOGARITHMICDEPTH 377	uniform float logarithmicDepthConstant; 378	out float vFragmentDepth; 379 #endif 380	#define CUSTOM_VERTEX_DEFINITIONS 381	void main(void) { 382	#define CUSTOM_VERTEX_MAIN_BEGIN 383	vec3 positionUpdated=position; 384	#ifdef NORMAL 385	vec3 normalUpdated=normal; 386	#endif 387	#ifdef TANGENT 388	vec4 tangentUpdated=tangent; 389	#endif 390	391	#ifdef REFLECTIONMAP_SKYBOX 392	vPositionUVW=positionUpdated; 393	#endif 394	#define CUSTOM_VERTEX_UPDATE_POSITION 395	#define CUSTOM_VERTEX_UPDATE_NORMAL 396	#ifdef INSTANCES 397	mat4 finalWorld=mat4(world0,world1,world2,world3); 398	#else 399	mat4 finalWorld=world; 400	#endif 401	#if NUM_BONE_INFLUENCERS>0 402 mat4 influence; 403 influence=mBones[int(matricesIndices[0])]*matricesWeights[0]; 404 #if NUM_BONE_INFLUENCERS>1 405 influence+=mBones[int(matricesIndices[1])]*matricesWeights[1]; 406 #endif 407	#if NUM_BONE_INFLUENCERS>2 408 influence+=mBones[int(matricesIndices[2])]*matricesWeights[2]; 409 #endif 410	#if NUM_BONE_INFLUENCERS>3 411 influence+=mBones[int(matricesIndices[3])]*matricesWeights[3]; 412 #endif 413	#if NUM_BONE_INFLUENCERS>4 414 influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; 415	#endif 416	#if NUM_BONE_INFLUENCERS>5 417 influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; 418	#endif 419	#if NUM_BONE_INFLUENCERS>6 420 influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; 421	#endif 422	#if NUM_BONE_INFLUENCERS>7 423 influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; 424	#endif 425	finalWorld=finalWorld*influence; 426	#endif 427 gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0); 428	vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); 429 vPositionW=vec3(worldPos); 430	#ifdef NORMAL 431	mat3 normalWorld=mat3(finalWorld); 432	#ifdef NONUNIFORMSCALING 433 normalWorld=transposeMat3(inverseMat3(normalWorld)); 434	#endif 435 vNormalW=normalize(normalWorld*normalUpdated); 436	#endif 437	#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) 438 vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0))); 439	#endif 440	441	#ifndef UV1 442	vec2 uv=vec2(0.,0.); 443	#endif 444	#ifndef UV2 445	vec2 uv2=vec2(0.,0.); 446	#endif 447	#ifdef MAINUV1 448	vMainUV1=uv; 449	#endif 450	#ifdef MAINUV2 451 vMainUV2=uv2; 452	#endif 453	#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 454	if (vDiffuseInfos.x == 0.) 455	{ 456 vDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0)); 457	} 458	else 459 { 460	vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); 461	} 462 #endif 463	#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 464	if (vAmbientInfos.x == 0.) 465	{ 466 vAmbientUV=vec2(ambientMatrix*vec4(uv,1.0,0.0)); 467	} 468	else 469 { 470	vAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0)); 471	} 472 #endif 473	#if defined(OPACITY) && OPACITYDIRECTUV == 0 474	if (vOpacityInfos.x == 0.) 475	{ 476 vOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0)); 477	} 478	else 479 { 480	vOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0)); 481	} 482 #endif 483	#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 484	if (vEmissiveInfos.x == 0.) 485	{ 486 vEmissiveUV=vec2(emissiveMatrix*vec4(uv,1.0,0.0)); 487	} 488	else 489	{ 490	vEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0)); 491	} 492	#endif 493	#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 494 if (vLightmapInfos.x == 0.) 495	{ 496 vLightmapUV=vec2(lightmapMatrix*vec4(uv,1.0,0.0)); 497	} 498	else 499	{ 500	vLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0)); 501	} 502	#endif 503	#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 504	if (vSpecularInfos.x == 0.) 505	{ 506 vSpecularUV=vec2(specularMatrix*vec4(uv,1.0,0.0)); 507	} 508	else 509	{ 510	vSpecularUV=vec2(specularMatrix*vec4(uv2,1.0,0.0)); 511	} 512	#endif 513	#if defined(BUMP) && BUMPDIRECTUV == 0 514	if (vBumpInfos.x == 0.) 515	{ 516 vBumpUV=vec2(bumpMatrix*vec4(uv,1.0,0.0)); 517	} 518	else 519	{ 520 vBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0)); 521	} 522	#endif 523 #if defined(BUMP) || defined(PARALLAX) 524	#if defined(TANGENT) && defined(NORMAL) 525	vec3 tbnNormal=normalize(normalUpdated); 526 vec3 tbnTangent=normalize(tangentUpdated.xyz); 527	vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w; 528 vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal); 529 #endif 530	#endif 531	#ifdef CLIPPLANE 532 fClipDistance=dot(worldPos,vClipPlane); 533	#endif 534	#ifdef FOG 535	vFogDistance=(view*worldPos).xyz; 536	#endif 537	#ifdef SHADOWS 538	#if defined(SHADOW0) && !defined(SHADOWCUBE0) 539 vPositionFromLight0=lightMatrix0*worldPos; 540	vDepthMetric0=((vPositionFromLight0.z+light0.depthValues.x)/(light0.depthValues.y)); 541	#endif 542	#endif 543	#ifdef SHADOWS 544	#if defined(SHADOW1) && !defined(SHADOWCUBE1) 545 vPositionFromLight1=lightMatrix1*worldPos; 546	vDepthMetric1=((vPositionFromLight1.z+light1.depthValues.x)/(light1.depthValues.y)); 547	#endif 548	#endif 549	#ifdef SHADOWS 550	#if defined(SHADOW2) && !defined(SHADOWCUBE2) 551 vPositionFromLight2=lightMatrix2*worldPos; 552	vDepthMetric2=((vPositionFromLight2.z+light2.depthValues.x)/(light2.depthValues.y)); 553	#endif 554	#endif 555	#ifdef SHADOWS 556	#if defined(SHADOW3) && !defined(SHADOWCUBE3) 557 vPositionFromLight3=lightMatrix3*worldPos; 558	vDepthMetric3=((vPositionFromLight3.z+light3.depthValues.x)/(light3.depthValues.y)); 559	#endif 560	#endif 561	562	#ifdef VERTEXCOLOR 563	564 vColor=color; 565	#endif 566	#ifdef POINTSIZE 567 gl_PointSize=pointSize; 568	#endif 569	#ifdef LOGARITHMICDEPTH 570 vFragmentDepth=1.0+gl_Position.w; 571 gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant; 572	#endif 573	#define CUSTOM_VERTEX_MAIN_END 574	} 575

[22:23:13]: Attributes: position, normal, uv

[22:23:13]: Uniforms: world, view, viewProjection, vEyePosition, vLightsType, vAmbientColor, vDiffuseColor, vSpecularColor, vEmissiveColor, vFogInfos, vFogColor, pointSize, vDiffuseInfos, vAmbientInfos, vOpacityInfos, vReflectionInfos, vEmissiveInfos, vSpecularInfos, vBumpInfos, vLightmapInfos, vRefractionInfos, mBones, vClipPlane, diffuseMatrix, ambientMatrix, opacityMatrix, reflectionMatrix, emissiveMatrix, specularMatrix, bumpMatrix, normalMatrix, lightmapMatrix, refractionMatrix, diffuseLeftColor, diffuseRightColor, opacityParts, reflectionLeftColor, reflectionRightColor, emissiveLeftColor, emissiveRightColor, refractionLeftColor, refractionRightColor, vReflectionPosition, vReflectionSize, logarithmicDepthConstant, vTangentSpaceParams, vLightData0, vLightDiffuse0, vLightSpecular0, vLightDirection0, vLightGround0, lightMatrix0, shadowsInfo0, depthValues0, diffuseSampler, ambientSampler, opacitySampler, reflectionCubeSampler, reflection2DSampler, emissiveSampler, specularSampler, bumpSampler, lightmapSampler, refractionCubeSampler, refraction2DSampler, shadowSampler0, depthSampler0

[22:23:13]: Unable to compile effect:

[22:23:13]: Trying next fallback.

[22:23:13]: Error: 0:89: S0032: no default precision defined for parameter 'webgl_4aeb46af4241331f'

[22:23:13]: Fragment shader: default 1	#version 300 es 2	#define WEBGL2 3	#define MAINUV1 4	#define DIFFUSE 5	#define DIFFUSEDIRECTUV 1 6	#define AMBIENTDIRECTUV 0 7	#define OPACITYDIRECTUV 0 8	#define EMISSIVEDIRECTUV 0 9	#define SPECULARDIRECTUV 0 10	#define BUMPDIRECTUV 0 11	#define SPECULARTERM 12	#define NORMAL 13	#define UV1 14	#define NUM_BONE_INFLUENCERS 0 15	#define BonesPerMesh 0 16	#define LIGHTMAPDIRECTUV 0 17	#define SHADOWFLOAT 18	#define NUM_MORPH_INFLUENCERS 0 19	#define VIGNETTEBLENDMODEMULTIPLY 20 #define SAMPLER3DGREENDEPTH 21	#define SAMPLER3DBGRMAP 22	#define LIGHT0 23	#define SPOTLIGHT0 24	#define SHADOW0 25	#define SHADOWPCF0 26	#define SHADOWS 27	28	#define SHADER_NAME fragment:default 29	precision highp float; 30 layout(std140,column_major) uniform; 31	uniform Material 32	{ 33 vec4 diffuseLeftColor; 34	vec4 diffuseRightColor; 35	vec4 opacityParts; 36	vec4 reflectionLeftColor; 37	vec4 reflectionRightColor; 38	vec4 refractionLeftColor; 39	vec4 refractionRightColor; 40	vec4 emissiveLeftColor; 41	vec4 emissiveRightColor; 42	vec2 vDiffuseInfos; 43	vec2 vAmbientInfos; 44	vec2 vOpacityInfos; 45	vec2 vReflectionInfos; 46	vec3 vReflectionPosition; 47	vec3 vReflectionSize; 48	vec2 vEmissiveInfos; 49	vec2 vLightmapInfos; 50	vec2 vSpecularInfos; 51 vec3 vBumpInfos; 52	mat4 diffuseMatrix; 53	mat4 ambientMatrix; 54 mat4 opacityMatrix; 55	mat4 reflectionMatrix; 56	mat4 emissiveMatrix; 57	mat4 lightmapMatrix; 58	mat4 specularMatrix; 59 mat4 bumpMatrix; 60	vec4 vTangentSpaceParams; 61	mat4 refractionMatrix; 62	vec4 vRefractionInfos; 63	vec4 vSpecularColor; 64	vec3 vEmissiveColor; 65	vec4 vDiffuseColor; 66	float pointSize; 67	}; 68	uniform Scene { 69	mat4 viewProjection; 70	mat4 view; 71 }; 72	#if defined(BUMP) || !defined(NORMAL) 73	74	#endif 75	#define CUSTOM_FRAGMENT_BEGIN 76	#ifdef LOGARITHMICDEPTH 77	78	#endif 79	80 #define RECIPROCAL_PI2 0.15915494 81	uniform vec3 vEyePosition; 82 uniform vec3 vAmbientColor; 83	84	in vec3 vPositionW; 85	#ifdef NORMAL 86	in vec3 vNormalW; 87	#endif 88	#ifdef VERTEXCOLOR 89	in vec4 vColor; 90	#endif 91	#ifdef MAINUV1 92	in vec2 vMainUV1; 93 #endif 94	#ifdef MAINUV2 95	in vec2 vMainUV2; 96	#endif 97	98	const float PI=3.1415926535897932384626433832795; 99	const float LinearEncodePowerApprox=2.2; 100	const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox; 101	const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722); 102	mat3 transposeMat3(mat3 inMatrix) { 103	vec3 i0=inMatrix[0]; 104	vec3 i1=inMatrix[1]; 105	vec3 i2=inMatrix[2]; 106	mat3 outMatrix=mat3( 107	vec3(i0.x,i1.x,i2.x), 108	vec3(i0.y,i1.y,i2.y), 109 vec3(i0.z,i1.z,i2.z) 110	); 111	return outMatrix; 112	} 113	114 mat3 inverseMat3(mat3 inMatrix) { 115	float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2]; 116	float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2]; 117	float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2]; 118	float b01=a22*a11-a12*a21; 119	float b11=-a22*a10+a12*a20; 120	float b21=a21*a10-a11*a20; 121	float det=a00*b01+a01*b11+a02*b21; 122 return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11), 123	b11,(a22*a00-a02*a20),(-a12*a00+a02*a10), 124	b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det; 125	} 126	float computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff) 127	{ 128	float mask=smoothstep(1.0-frustumEdgeFalloff,1.0,clamp(dot(clipSpace,clipSpace),0.,1.)); 129 return mix(value,1.0,mask); 130	} 131	vec3 applyEaseInOut(vec3 x){ 132	return x*x*(3.0-2.0*x); 133	} 134	vec3 toLinearSpace(vec3 color) 135	{ 136	return pow(color,vec3(LinearEncodePowerApprox)); 137	} 138	vec3 toGammaSpace(vec3 color) 139	{ 140	return pow(color,vec3(GammaEncodePowerApprox)); 141	} 142	float square(float value) 143	{ 144	return value*value; 145	} 146	float getLuminance(vec3 color) 147	{ 148	return clamp(dot(color,LuminanceEncodeApprox),0.,1.); 149	} 150	151	float getRand(vec2 seed) { 152	return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453); 153	} 154	float dither(vec2 seed,float varianceAmount) { 155	float rand=getRand(seed); 156 float dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand); 157	return dither; 158	} 159	160	#ifdef LIGHT0 161	uniform Light0 162	{ 163	vec4 vLightData; 164	vec4 vLightDiffuse; 165	vec3 vLightSpecular; 166	#ifdef SPOTLIGHT0 167	vec4 vLightDirection; 168 #endif 169	#ifdef HEMILIGHT0 170	vec3 vLightGround; 171	#endif 172 vec4 shadowsInfo; 173	vec2 depthValues; 174	} light0; 175	#ifdef PROJECTEDLIGHTTEXTURE0 176	uniform mat4 textureProjectionMatrix0; 177	uniform sampler2D projectionLightSampler0; 178	#endif 179 #ifdef SHADOW0 180	#if defined(SHADOWCUBE0) 181	uniform samplerCube shadowSampler0; 182	#else 183	in vec4 vPositionFromLight0; 184	in float vDepthMetric0; 185	#if defined(SHADOWPCSS0) 186	uniform highp sampler2DShadow shadowSampler0; 187	uniform highp sampler2D depthSampler0; 188	#elif defined(SHADOWPCF0) 189	uniform highp sampler2DShadow shadowSampler0; 190	#else 191	uniform sampler2D shadowSampler0; 192	#endif 193	uniform mat4 lightMatrix0; 194 #endif 195	#endif 196	#endif 197	#ifdef LIGHT1 198	uniform Light1 199	{ 200	vec4 vLightData; 201	vec4 vLightDiffuse; 202	vec3 vLightSpecular; 203	#ifdef SPOTLIGHT1 204	vec4 vLightDirection; 205 #endif 206	#ifdef HEMILIGHT1 207	vec3 vLightGround; 208	#endif 209 vec4 shadowsInfo; 210	vec2 depthValues; 211	} light1; 212	#ifdef PROJECTEDLIGHTTEXTURE1 213	uniform mat4 textureProjectionMatrix1; 214	uniform sampler2D projectionLightSampler1; 215	#endif 216 #ifdef SHADOW1 217	#if defined(SHADOWCUBE1) 218	uniform samplerCube shadowSampler1; 219	#else 220	in vec4 vPositionFromLight1; 221	in float vDepthMetric1; 222	#if defined(SHADOWPCSS1) 223	uniform highp sampler2DShadow shadowSampler1; 224	uniform highp sampler2D depthSampler1; 225	#elif defined(SHADOWPCF1) 226	uniform highp sampler2DShadow shadowSampler1; 227	#else 228	uniform sampler2D shadowSampler1; 229	#endif 230	uniform mat4 lightMatrix1; 231 #endif 232	#endif 233	#endif 234	#ifdef LIGHT2 235	uniform Light2 236	{ 237	vec4 vLightData; 238	vec4 vLightDiffuse; 239	vec3 vLightSpecular; 240	#ifdef SPOTLIGHT2 241	vec4 vLightDirection; 242 #endif 243	#ifdef HEMILIGHT2 244	vec3 vLightGround; 245	#endif 246 vec4 shadowsInfo; 247	vec2 depthValues; 248	} light2; 249	#ifdef PROJECTEDLIGHTTEXTURE2 250	uniform mat4 textureProjectionMatrix2; 251	uniform sampler2D projectionLightSampler2; 252	#endif 253 #ifdef SHADOW2 254	#if defined(SHADOWCUBE2) 255	uniform samplerCube shadowSampler2; 256	#else 257	in vec4 vPositionFromLight2; 258	in float vDepthMetric2; 259	#if defined(SHADOWPCSS2) 260	uniform highp sampler2DShadow shadowSampler2; 261	uniform highp sampler2D depthSampler2; 262	#elif defined(SHADOWPCF2) 263	uniform highp sampler2DShadow shadowSampler2; 264	#else 265	uniform sampler2D shadowSampler2; 266	#endif 267	uniform mat4 lightMatrix2; 268 #endif 269	#endif 270	#endif 271	#ifdef LIGHT3 272	uniform Light3 273	{ 274	vec4 vLightData; 275	vec4 vLightDiffuse; 276	vec3 vLightSpecular; 277	#ifdef SPOTLIGHT3 278	vec4 vLightDirection; 279 #endif 280	#ifdef HEMILIGHT3 281	vec3 vLightGround; 282	#endif 283 vec4 shadowsInfo; 284	vec2 depthValues; 285	} light3; 286	#ifdef PROJECTEDLIGHTTEXTURE3 287	uniform mat4 textureProjectionMatrix3; 288	uniform sampler2D projectionLightSampler3; 289	#endif 290 #ifdef SHADOW3 291	#if defined(SHADOWCUBE3) 292	uniform samplerCube shadowSampler3; 293	#else 294	in vec4 vPositionFromLight3; 295	in float vDepthMetric3; 296	#if defined(SHADOWPCSS3) 297	uniform highp sampler2DShadow shadowSampler3; 298	uniform highp sampler2D depthSampler3; 299	#elif defined(SHADOWPCF3) 300	uniform highp sampler2DShadow shadowSampler3; 301	#else 302	uniform sampler2D shadowSampler3; 303	#endif 304	uniform mat4 lightMatrix3; 305 #endif 306	#endif 307	#endif 308	309	310	struct lightingInfo 311	{ 312	vec3 diffuse; 313	#ifdef SPECULARTERM 314	vec3 specular; 315 #endif 316	#ifdef NDOTL 317	float ndl; 318	#endif 319	}; 320 lightingInfo computeLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) { 321	lightingInfo result; 322	vec3 lightVectorW; 323 float attenuation=1.0; 324	if (lightData.w == 0.) 325	{ 326	vec3 direction=lightData.xyz-vPositionW; 327	attenuation=max(0.,1.0-length(direction)/range); 328	lightVectorW=normalize(direction); 329	} 330	else 331	{ 332	lightVectorW=normalize(-lightData.xyz); 333	} 334	335	float ndl=max(0.,dot(vNormal,lightVectorW)); 336 #ifdef NDOTL 337	result.ndl=ndl; 338	#endif 339 result.diffuse=ndl*diffuseColor*attenuation; 340	#ifdef SPECULARTERM 341	342	vec3 angleW=normalize(viewDirectionW+lightVectorW); 343	float specComp=max(0.,dot(vNormal,angleW)); 344 specComp=pow(specComp,max(1.,glossiness)); 345 result.specular=specComp*specularColor*attenuation; 346	#endif 347 return result; 348	} 349	lightingInfo computeSpotLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec4 lightDirection,vec3 diffuseColor,vec3 specularColor,float range,float glossiness) { 350 lightingInfo result; 351	vec3 direction=lightData.xyz-vPositionW; 352	vec3 lightVectorW=normalize(direction); 353	float attenuation=max(0.,1.0-length(direction)/range); 354	355	float cosAngle=max(0.,dot(lightDirection.xyz,-lightVectorW)); 356	if (cosAngle>=lightDirection.w) 357	{ 358 cosAngle=max(0.,pow(cosAngle,lightData.w)); 359 attenuation*=cosAngle; 360	361	float ndl=max(0.,dot(vNormal,lightVectorW)); 362	#ifdef NDOTL 363 result.ndl=ndl; 364	#endif 365 result.diffuse=ndl*diffuseColor*attenuation; 366	#ifdef SPECULARTERM 367	368	vec3 angleW=normalize(viewDirectionW+lightVectorW); 369	float specComp=max(0.,dot(vNormal,angleW)); 370 specComp=pow(specComp,max(1.,glossiness)); 371 result.specular=specComp*specularColor*attenuation; 372	#endif 373 return result; 374	} 375	result.diffuse=vec3(0.); 376	#ifdef SPECULARTERM 377	result.specular=vec3(0.); 378	#endif 379	#ifdef NDOTL 380	result.ndl=0.; 381	#endif 382	return result; 383	} 384 lightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float glossiness) { 385	lightingInfo result; 386	387 float ndl=dot(vNormal,lightData.xyz)*0.5+0.5; 388	#ifdef NDOTL 389 result.ndl=ndl; 390	#endif 391 result.diffuse=mix(groundColor,diffuseColor,ndl); 392	#ifdef SPECULARTERM 393	394	vec3 angleW=normalize(viewDirectionW+lightData.xyz); 395	float specComp=max(0.,dot(vNormal,angleW)); 396 specComp=pow(specComp,max(1.,glossiness)); 397 result.specular=specComp*specularColor; 398	#endif 399	return result; 400	} 401	vec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){ 402	vec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0); 403 strq/=strq.w; 404	vec3 textureColor=texture(projectionLightSampler,strq.xy).rgb; 405 #ifdef PBR 406	textureColor=toLinearSpace(textureColor); 407	#endif 408	return textureColor; 409	} 410	#ifdef SHADOWS 411	#ifndef SHADOWFLOAT 412	float unpack(vec4 color) 413	{ 414	const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0); 415	return dot(color,bit_shift); 416	} 417	#endif 418	float computeShadowCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,vec2 depthValues) 419	{ 420	vec3 directionToLight=vPositionW-lightPosition; 421	float depth=length(directionToLight); 422	depth=(depth+depthValues.x)/(depthValues.y); 423 depth=clamp(depth,0.,1.0); 424 directionToLight=normalize(directionToLight); 425 directionToLight.y=-directionToLight.y; 426	#ifndef SHADOWFLOAT 427 float shadow=unpack(texture(shadowSampler,directionToLight)); 428 #else 429	float shadow=texture(shadowSampler,directionToLight).x; 430	#endif 431	if (depth>shadow) 432	{ 433	return darkness; 434	} 435	return 1.0; 436	} 437	float computeShadowWithPoissonSamplingCube(vec3 lightPosition,samplerCube shadowSampler,float mapSize,float darkness,vec2 depthValues) 438	{ 439	vec3 directionToLight=vPositionW-lightPosition; 440	float depth=length(directionToLight); 441	depth=(depth+depthValues.x)/(depthValues.y); 442 depth=clamp(depth,0.,1.0); 443 directionToLight=normalize(directionToLight); 444 directionToLight.y=-directionToLight.y; 445	float visibility=1.; 446	vec3 poissonDisk[4]; 447	poissonDisk[0]=vec3(-1.0,1.0,-1.0); 448	poissonDisk[1]=vec3(1.0,-1.0,-1.0); 449 poissonDisk[2]=vec3(-1.0,-1.0,-1.0); 450 poissonDisk[3]=vec3(1.0,-1.0,1.0); 451	452	#ifndef SHADOWFLOAT 453 if (unpack(texture(shadowSampler,directionToLight+poissonDisk[0]*mapSize))1.0 || uv.y<0. || uv.y>1.0) 502	{ 503	return 1.0; 504	} 505	float shadowPixelDepth=clamp(depthMetric,0.,1.0); 506	#ifndef SHADOWFLOAT 507	float shadow=unpack(texture(shadowSampler,uv)); 508	#else 509 float shadow=texture(shadowSampler,uv).x; 510	#endif 511	if (shadowPixelDepth>shadow) 512	{ 513	return computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff); 514	} 515 return 1.; 516	} 517	float computeShadowWithPoissonSampling(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float mapSize,float darkness,float frustumEdgeFalloff) 518	{ 519	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 520	vec2 uv=0.5*clipSpace.xy+vec2(0.5); 521	if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) 522	{ 523	return 1.0; 524	} 525	float shadowPixelDepth=clamp(depthMetric,0.,1.0); 526	float visibility=1.; 527	vec2 poissonDisk[4]; 528 poissonDisk[0]=vec2(-0.94201624,-0.39906216); 529 poissonDisk[1]=vec2(0.94558609,-0.76890725); 530 poissonDisk[2]=vec2(-0.094184101,-0.92938870); 531 poissonDisk[3]=vec2(0.34495938,0.29387760); 532	533	#ifndef SHADOWFLOAT 534	if (unpack(texture(shadowSampler,uv+poissonDisk[0]*mapSize))1.0 || uv.y<0. || uv.y>1.0) 551	{ 552	return 1.0; 553	} 554	float shadowPixelDepth=clamp(depthMetric,0.,1.0); 555	#ifndef SHADOWFLOAT 556	float shadowMapSample=unpack(texture(shadowSampler,uv)); 557 #else 558	float shadowMapSample=texture(shadowSampler,uv).x; 559 #endif 560	float esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness); 561	return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff); 562	} 563 float computeShadowWithCloseESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff) 564	{ 565	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 566	vec2 uv=0.5*clipSpace.xy+vec2(0.5); 567	if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) 568	{ 569	return 1.0; 570	} 571	float shadowPixelDepth=clamp(depthMetric,0.,1.0); 572	#ifndef SHADOWFLOAT 573	float shadowMapSample=unpack(texture(shadowSampler,uv)); 574 #else 575	float shadowMapSample=texture(shadowSampler,uv).x; 576 #endif 577	float esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.); 578	return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff); 579	} 580 #ifdef WEBGL2 581	582	float computeShadowWithPCF1(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,float darkness,float frustumEdgeFalloff) 583	{ 584	if (depthMetric>1.0 || depthMetric<0.0) { 585	return 1.0; 586	} 587 vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 588 vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); 589	float shadow=texture(shadowSampler,uvDepth); 590 shadow=mix(darkness,1.,shadow); 591	return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); 592	} 593 594	595	596	float computeShadowWithPCF3(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) 597	{ 598	if (depthMetric>1.0 || depthMetric<0.0) { 599	return 1.0; 600	} 601	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 602	vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); 603	vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; 604	uv+=0.5; 605	vec2 st=fract(uv); 606	vec2 base_uv=floor(uv)-0.5; 607 base_uv*=shadowMapSizeAndInverse.y; 608	609	610	611	612	vec2 uvw0=3.-2.*st; 613	vec2 uvw1=1.+2.*st; 614	vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y; 615	vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y; 616	float shadow=0.; 617 shadow+=uvw0.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z)); 618 shadow+=uvw1.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z)); 619 shadow+=uvw0.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z)); 620 shadow+=uvw1.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z)); 621	shadow=shadow/16.; 622	shadow=mix(darkness,1.,shadow); 623 return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); 624 } 625	626	627	628	float computeShadowWithPCF5(vec4 vPositionFromLight,float depthMetric,sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) 629	{ 630	if (depthMetric>1.0 || depthMetric<0.0) { 631	return 1.0; 632	} 633	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 634	vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); 635	vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; 636	uv+=0.5; 637	vec2 st=fract(uv); 638	vec2 base_uv=floor(uv)-0.5; 639 base_uv*=shadowMapSizeAndInverse.y; 640	641	642	vec2 uvw0=4.-3.*st; 643	vec2 uvw1=vec2(7.); 644	vec2 uvw2=1.+3.*st; 645	vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y; 646 vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y; 647 float shadow=0.; 648 shadow+=uvw0.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z)); 649 shadow+=uvw1.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z)); 650 shadow+=uvw2.x*uvw0.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[0]),uvDepth.z)); 651 shadow+=uvw0.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z)); 652 shadow+=uvw1.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z)); 653 shadow+=uvw2.x*uvw1.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[1]),uvDepth.z)); 654 shadow+=uvw0.x*uvw2.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[2]),uvDepth.z)); 655 shadow+=uvw1.x*uvw2.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[2]),uvDepth.z)); 656 shadow+=uvw2.x*uvw2.y*texture(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[2]),uvDepth.z)); 657	shadow=shadow/144.; 658	shadow=mix(darkness,1.,shadow); 659 return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); 660 } 661	const vec3 PoissonSamplers32[64]=vec3[64]( 662 vec3(0.06407013,0.05409927,0.), 663	vec3(0.7366577,0.5789394,0.), 664	vec3(-0.6270542,-0.5320278,0.), 665 vec3(-0.4096107,0.8411095,0.), 666	vec3(0.6849564,-0.4990818,0.), 667	vec3(-0.874181,-0.04579735,0.), 668 vec3(0.9989998,0.0009880066,0.), 669 vec3(-0.004920578,-0.9151649,0.), 670	vec3(0.1805763,0.9747483,0.), 671	vec3(-0.2138451,0.2635818,0.), 672	vec3(0.109845,0.3884785,0.), 673	vec3(0.06876755,-0.3581074,0.), 674 vec3(0.374073,-0.7661266,0.), 675	vec3(0.3079132,-0.1216763,0.), 676	vec3(-0.3794335,-0.8271583,0.), 677 vec3(-0.203878,-0.07715034,0.), 678	vec3(0.5912697,0.1469799,0.), 679	vec3(-0.88069,0.3031784,0.), 680	vec3(0.5040108,0.8283722,0.), 681	vec3(-0.5844124,0.5494877,0.), 682 vec3(0.6017799,-0.1726654,0.), 683	vec3(-0.5554981,0.1559997,0.), 684	vec3(-0.3016369,-0.3900928,0.), 685 vec3(-0.5550632,-0.1723762,0.), 686	vec3(0.925029,0.2995041,0.), 687	vec3(-0.2473137,0.5538505,0.), 688 vec3(0.9183037,-0.2862392,0.), 689	vec3(0.2469421,0.6718712,0.), 690	vec3(0.3916397,-0.4328209,0.), 691 vec3(-0.03576927,-0.6220032,0.), 692 vec3(-0.04661255,0.7995201,0.), 693	vec3(0.4402924,0.3640312,0.), 694	vec3(0.,0.,0.), 695	vec3(0.,0.,0.), 696	vec3(0.,0.,0.), 697 vec3(0.,0.,0.), 698	vec3(0.,0.,0.), 699	vec3(0.,0.,0.), 700 vec3(0.,0.,0.), 701	vec3(0.,0.,0.), 702	vec3(0.,0.,0.), 703 vec3(0.,0.,0.), 704	vec3(0.,0.,0.), 705	vec3(0.,0.,0.), 706 vec3(0.,0.,0.), 707	vec3(0.,0.,0.), 708	vec3(0.,0.,0.), 709 vec3(0.,0.,0.), 710	vec3(0.,0.,0.), 711	vec3(0.,0.,0.), 712 vec3(0.,0.,0.), 713	vec3(0.,0.,0.), 714	vec3(0.,0.,0.), 715 vec3(0.,0.,0.), 716	vec3(0.,0.,0.), 717	vec3(0.,0.,0.), 718 vec3(0.,0.,0.), 719	vec3(0.,0.,0.), 720	vec3(0.,0.,0.), 721 vec3(0.,0.,0.), 722	vec3(0.,0.,0.), 723	vec3(0.,0.,0.), 724 vec3(0.,0.,0.), 725	vec3(0.,0.,0.) 726	); 727	const vec3 PoissonSamplers64[64]=vec3[64]( 728	vec3(-0.613392,0.617481,0.), 729	vec3(0.170019,-0.040254,0.), 730	vec3(-0.299417,0.791925,0.), 731	vec3(0.645680,0.493210,0.), 732	vec3(-0.651784,0.717887,0.), 733	vec3(0.421003,0.027070,0.), 734	vec3(-0.817194,-0.271096,0.), 735	vec3(-0.705374,-0.668203,0.), 736	vec3(0.977050,-0.108615,0.), 737	vec3(0.063326,0.142369,0.), 738	vec3(0.203528,0.214331,0.), 739 vec3(-0.667531,0.326090,0.), 740	vec3(-0.098422,-0.295755,0.), 741 vec3(-0.885922,0.215369,0.), 742	vec3(0.566637,0.605213,0.), 743 vec3(0.039766,-0.396100,0.), 744	vec3(0.751946,0.453352,0.), 745 vec3(0.078707,-0.715323,0.), 746	vec3(-0.075838,-0.529344,0.), 747 vec3(0.724479,-0.580798,0.), 748	vec3(0.222999,-0.215125,0.), 749 vec3(-0.467574,-0.405438,0.), 750	vec3(-0.248268,-0.814753,0.), 751 vec3(0.354411,-0.887570,0.), 752	vec3(0.175817,0.382366,0.), 753 vec3(0.487472,-0.063082,0.), 754	vec3(-0.084078,0.898312,0.), 755 vec3(0.488876,-0.783441,0.), 756	vec3(0.470016,0.217933,0.), 757 vec3(-0.696890,-0.549791,0.), 758	vec3(-0.149693,0.605762,0.), 759 vec3(0.034211,0.979980,0.), 760	vec3(0.503098,-0.308878,0.), 761 vec3(-0.016205,-0.872921,0.), 762	vec3(0.385784,-0.393902,0.), 763 vec3(-0.146886,-0.859249,0.), 764	vec3(0.643361,0.164098,0.), 765 vec3(0.634388,-0.049471,0.), 766	vec3(-0.688894,0.007843,0.), 767 vec3(0.464034,-0.188818,0.), 768	vec3(-0.440840,0.137486,0.), 769 vec3(0.364483,0.511704,0.), 770	vec3(0.034028,0.325968,0.), 771 vec3(0.099094,-0.308023,0.), 772	vec3(0.693960,-0.366253,0.), 773 vec3(0.678884,-0.204688,0.), 774	vec3(0.001801,0.780328,0.), 775 vec3(0.145177,-0.898984,0.), 776	vec3(0.062655,-0.611866,0.), 777 vec3(0.315226,-0.604297,0.), 778	vec3(-0.780145,0.486251,0.), 779 vec3(-0.371868,0.882138,0.), 780	vec3(0.200476,0.494430,0.), 781 vec3(-0.494552,-0.711051,0.), 782	vec3(0.612476,0.705252,0.), 783 vec3(-0.578845,-0.768792,0.), 784	vec3(-0.772454,-0.090976,0.), 785 vec3(0.504440,0.372295,0.), 786	vec3(0.155736,0.065157,0.), 787 vec3(0.391522,0.849605,0.), 788	vec3(-0.620106,-0.328104,0.), 789 vec3(0.789239,-0.419965,0.), 790	vec3(-0.545396,0.538133,0.), 791 vec3(-0.178564,-0.596057,0.) 792	); 793	794	795	796	797	798	float computeShadowWithPCSS(vec4 vPositionFromLight,float depthMetric,sampler2D depthSampler,sampler2DShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers) 799	{ 800	if (depthMetric>1.0 || depthMetric<0.0) { 801	return 1.0; 802	} 803	vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; 804	vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); 805	float blockerDepth=0.0; 806	float sumBlockerDepth=0.0; 807	float numBlocker=0.0; 808	for (int i=0; icurrRayHeight) 1208	{ 1209	float delta1=currSampledHeight-currRayHeight; 1210	float delta2=(currRayHeight+stepSize)-lastSampledHeight; 1211	float ratio=delta1/(delta1+delta2); 1212	vCurrOffset=(ratio)* vLastOffset+(1.0-ratio)*vCurrOffset; 1213	1214	break; 1215	} 1216 else 1217	{ 1218	currRayHeight-=stepSize; 1219 vLastOffset=vCurrOffset; 1220	vCurrOffset+=stepSize*vMaxOffset; 1221	lastSampledHeight=currSampledHeight; 1222	} 1223	} 1224	return vCurrOffset; 1225	} 1226	vec2 parallaxOffset(vec3 viewDir,float heightScale) 1227	{ 1228	1229	float height=texture(bumpSampler,vBumpUV).w; 1230	vec2 texCoordOffset=heightScale*viewDir.xy*height; 1231	return -texCoordOffset; 1232	} 1233	#endif 1234	#endif 1235	#ifdef CLIPPLANE 1236	in float fClipDistance; 1237	#endif 1238	#ifdef LOGARITHMICDEPTH 1239	uniform float logarithmicDepthConstant; 1240 in float vFragmentDepth; 1241	#endif 1242	#ifdef FOG 1243	#define FOGMODE_NONE 0. 1244	#define FOGMODE_EXP 1. 1245	#define FOGMODE_EXP2 2. 1246	#define FOGMODE_LINEAR 3. 1247	#define E 2.71828 1248	uniform vec4 vFogInfos; 1249	uniform vec3 vFogColor; 1250	in vec3 vFogDistance; 1251	float CalcFogFactor() 1252	{ 1253 float fogCoeff=1.0; 1254	float fogStart=vFogInfos.y; 1255	float fogEnd=vFogInfos.z; 1256	float fogDensity=vFogInfos.w; 1257	float fogDistance=length(vFogDistance); 1258	if (FOGMODE_LINEAR == vFogInfos.x) 1259	{ 1260	fogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart); 1261	} 1262	else if (FOGMODE_EXP == vFogInfos.x) 1263	{ 1264	fogCoeff=1.0/pow(E,fogDistance*fogDensity); 1265	} 1266	else if (FOGMODE_EXP2 == vFogInfos.x) 1267	{ 1268 fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity); 1269	} 1270	return clamp(fogCoeff,0.0,1.0); 1271	} 1272	#endif 1273 #define CUSTOM_FRAGMENT_DEFINITIONS 1274	out vec4 glFragColor; 1275 void main(void) { 1276	#define CUSTOM_FRAGMENT_MAIN_BEGIN 1277 #ifdef CLIPPLANE 1278	if (fClipDistance>0.0) 1279	{ 1280	discard; 1281	} 1282	#endif 1283	vec3 viewDirectionW=normalize(vEyePosition-vPositionW); 1284	1285	vec4 baseColor=vec4(1.,1.,1.,1.); 1286	vec3 diffuseColor=vDiffuseColor.rgb; 1287	1288	float alpha=vDiffuseColor.a; 1289	1290	#ifdef NORMAL 1291	vec3 normalW=normalize(vNormalW); 1292	#else 1293	vec3 normalW=normalize(-cross(dFdx(vPositionW),dFdy(vPositionW))); 1294 #endif 1295	vec2 uvOffset=vec2(0.0,0.0); 1296	#if defined(BUMP) || defined(PARALLAX) 1297	#ifdef NORMALXYSCALE 1298	float normalScale=1.0; 1299	#else 1300	float normalScale=vBumpInfos.y; 1301	#endif 1302	#if defined(TANGENT) && defined(NORMAL) 1303	mat3 TBN=vTBN; 1304	#else 1305	mat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,vBumpUV); 1306 #endif 1307	#endif 1308	#ifdef PARALLAX 1309	mat3 invTBN=transposeMat3(TBN); 1310	#ifdef PARALLAXOCCLUSION 1311 uvOffset=parallaxOcclusion(invTBN*-viewDirectionW,invTBN*normalW,vBumpUV,vBumpInfos.z); 1312	#else 1313	uvOffset=parallaxOffset(invTBN*viewDirectionW,vBumpInfos.z); 1314	#endif 1315	#endif 1316	#ifdef BUMP 1317	#ifdef OBJECTSPACE_NORMALMAP 1318 normalW=normalize(texture(bumpSampler,vBumpUV).xyz*2.0-1.0); 1319 normalW=normalize(mat3(normalMatrix)*normalW); 1320	#else 1321 normalW=perturbNormal(TBN,vBumpUV+uvOffset); 1322	#endif 1323 #endif 1324	#ifdef TWOSIDEDLIGHTING 1325	normalW=gl_FrontFacing ? normalW : -normalW; 1326	#endif 1327	#ifdef DIFFUSE 1328 baseColor=texture(diffuseSampler,vDiffuseUV+uvOffset); 1329	#ifdef ALPHATEST 1330	if (baseColor.a<0.4) 1331	discard; 1332	#endif 1333 #ifdef ALPHAFROMDIFFUSE 1334	alpha*=baseColor.a; 1335	#endif 1336 #define CUSTOM_FRAGMENT_UPDATE_ALPHA 1337 baseColor.rgb*=vDiffuseInfos.y; 1338	#endif 1339	#ifdef DEPTHPREPASS 1340	glFragColor=vec4(0.,0.,0.,1.0); 1341	return; 1342 #endif 1343	#ifdef VERTEXCOLOR 1344	baseColor.rgb*=vColor.rgb; 1345 #endif 1346	#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE 1347	1348	vec3 baseAmbientColor=vec3(1.,1.,1.); 1349	#ifdef AMBIENT 1350 baseAmbientColor=texture(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y; 1351	#endif 1352	#define CUSTOM_FRAGMENT_BEFORE_LIGHTS 1353	1354 #ifdef SPECULARTERM 1355	float glossiness=vSpecularColor.a; 1356 vec3 specularColor=vSpecularColor.rgb; 1357	#ifdef SPECULAR 1358 vec4 specularMapColor=texture(specularSampler,vSpecularUV+uvOffset); 1359	specularColor=specularMapColor.rgb; 1360	#ifdef GLOSSINESS 1361	glossiness=glossiness*specularMapColor.a; 1362	#endif 1363 #endif 1364	#else 1365	float glossiness=0.; 1366	#endif 1367	1368 vec3 diffuseBase=vec3(0.,0.,0.); 1369	lightingInfo info; 1370 #ifdef SPECULARTERM 1371	vec3 specularBase=vec3(0.,0.,0.); 1372 #endif 1373	float shadow=1.; 1374	#ifdef LIGHTMAP 1375	vec3 lightmapColor=texture(lightmapSampler,vLightmapUV+uvOffset).rgb*vLightmapInfos.y; 1376	#endif 1377	#ifdef LIGHT0 1378	#if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED0) && defined(LIGHTMAPNOSPECULAR0)) 1379	1380	#else 1381	#ifdef PBR 1382 #ifdef SPOTLIGHT0 1383 info=computeSpotLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDirection,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1384	#endif 1385	#ifdef HEMILIGHT0 1386 info=computeHemisphericLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightGround,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1387	#endif 1388	#if defined(POINTLIGHT0) || defined(DIRLIGHT0) 1389 info=computeLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1390	#endif 1391	#else 1392	#ifdef SPOTLIGHT0 1393 info=computeSpotLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDirection,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightDiffuse.a,glossiness); 1394	#endif 1395	#ifdef HEMILIGHT0 1396 info=computeHemisphericLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightGround,glossiness); 1397	#endif 1398	#if defined(POINTLIGHT0) || defined(DIRLIGHT0) 1399 info=computeLighting(viewDirectionW,normalW,light0.vLightData,light0.vLightDiffuse.rgb,light0.vLightSpecular,light0.vLightDiffuse.a,glossiness); 1400	#endif 1401	#endif 1402	#ifdef PROJECTEDLIGHTTEXTURE0 1403 info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler0,textureProjectionMatrix0); 1404	#endif 1405	#endif 1406	#ifdef SHADOW0 1407	#ifdef SHADOWCLOSEESM0 1408	#if defined(SHADOWCUBE0) 1409 shadow=computeShadowWithCloseESMCube(light0.vLightData.xyz,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.z,light0.depthValues); 1410	#else 1411 shadow=computeShadowWithCloseESM(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.z,light0.shadowsInfo.w); 1412	#endif 1413	#elif defined(SHADOWESM0) 1414	#if defined(SHADOWCUBE0) 1415 shadow=computeShadowWithESMCube(light0.vLightData.xyz,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.z,light0.depthValues); 1416	#else 1417 shadow=computeShadowWithESM(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.z,light0.shadowsInfo.w); 1418	#endif 1419	#elif defined(SHADOWPOISSON0) 1420	#if defined(SHADOWCUBE0) 1421 shadow=computeShadowWithPoissonSamplingCube(light0.vLightData.xyz,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.x,light0.depthValues); 1422	#else 1423 shadow=computeShadowWithPoissonSampling(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.x,light0.shadowsInfo.w); 1424	#endif 1425	#elif defined(SHADOWPCF0) 1426	#if defined(SHADOWLOWQUALITY0) 1427 shadow=computeShadowWithPCF1(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.w); 1428	#elif defined(SHADOWMEDIUMQUALITY0) 1429 shadow=computeShadowWithPCF3(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.yz,light0.shadowsInfo.x,light0.shadowsInfo.w); 1430	#else 1431 shadow=computeShadowWithPCF5(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.yz,light0.shadowsInfo.x,light0.shadowsInfo.w); 1432	#endif 1433	#elif defined(SHADOWPCSS0) 1434	#if defined(SHADOWLOWQUALITY0) 1435 shadow=computeShadowWithPCSS16(vPositionFromLight0,vDepthMetric0,depthSampler0,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.z,light0.shadowsInfo.x,light0.shadowsInfo.w); 1436	#elif defined(SHADOWMEDIUMQUALITY0) 1437 shadow=computeShadowWithPCSS32(vPositionFromLight0,vDepthMetric0,depthSampler0,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.z,light0.shadowsInfo.x,light0.shadowsInfo.w); 1438	#else 1439 shadow=computeShadowWithPCSS64(vPositionFromLight0,vDepthMetric0,depthSampler0,shadowSampler0,light0.shadowsInfo.y,light0.shadowsInfo.z,light0.shadowsInfo.x,light0.shadowsInfo.w); 1440	#endif 1441	#else 1442	#if defined(SHADOWCUBE0) 1443 shadow=computeShadowCube(light0.vLightData.xyz,shadowSampler0,light0.shadowsInfo.x,light0.depthValues); 1444	#else 1445 shadow=computeShadow(vPositionFromLight0,vDepthMetric0,shadowSampler0,light0.shadowsInfo.x,light0.shadowsInfo.w); 1446	#endif 1447	#endif 1448	#ifdef SHADOWONLY 1449	#ifndef SHADOWINUSE 1450	#define SHADOWINUSE 1451	#endif 1452 globalShadow+=shadow; 1453	shadowLightCount+=1.0; 1454	#endif 1455 #else 1456	shadow=1.; 1457	#endif 1458	#ifndef SHADOWONLY 1459 #ifdef CUSTOMUSERLIGHTING 1460 diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); 1461	#ifdef SPECULARTERM 1462 specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); 1463	#endif 1464	#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED0) 1465	diffuseBase+=lightmapColor*shadow; 1466	#ifdef SPECULARTERM 1467	#ifndef LIGHTMAPNOSPECULAR0 1468 specularBase+=info.specular*shadow*lightmapColor; 1469	#endif 1470 #endif 1471	#else 1472	diffuseBase+=info.diffuse*shadow; 1473 #ifdef SPECULARTERM 1474	specularBase+=info.specular*shadow; 1475 #endif 1476	#endif 1477	#endif 1478	#endif 1479	#ifdef LIGHT1 1480 #if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED1) && defined(LIGHTMAPNOSPECULAR1)) 1481 1482	#else 1483	#ifdef PBR 1484	#ifdef SPOTLIGHT1 1485 info=computeSpotLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDirection,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1486	#endif 1487	#ifdef HEMILIGHT1 1488 info=computeHemisphericLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightGround,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1489	#endif 1490	#if defined(POINTLIGHT1) || defined(DIRLIGHT1) 1491 info=computeLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1492	#endif 1493	#else 1494	#ifdef SPOTLIGHT1 1495 info=computeSpotLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDirection,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightDiffuse.a,glossiness); 1496	#endif 1497	#ifdef HEMILIGHT1 1498 info=computeHemisphericLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightGround,glossiness); 1499	#endif 1500	#if defined(POINTLIGHT1) || defined(DIRLIGHT1) 1501 info=computeLighting(viewDirectionW,normalW,light1.vLightData,light1.vLightDiffuse.rgb,light1.vLightSpecular,light1.vLightDiffuse.a,glossiness); 1502	#endif 1503	#endif 1504	#ifdef PROJECTEDLIGHTTEXTURE1 1505 info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler1,textureProjectionMatrix1); 1506	#endif 1507	#endif 1508	#ifdef SHADOW1 1509	#ifdef SHADOWCLOSEESM1 1510	#if defined(SHADOWCUBE1) 1511 shadow=computeShadowWithCloseESMCube(light1.vLightData.xyz,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.z,light1.depthValues); 1512	#else 1513 shadow=computeShadowWithCloseESM(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.z,light1.shadowsInfo.w); 1514	#endif 1515	#elif defined(SHADOWESM1) 1516	#if defined(SHADOWCUBE1) 1517 shadow=computeShadowWithESMCube(light1.vLightData.xyz,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.z,light1.depthValues); 1518	#else 1519 shadow=computeShadowWithESM(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.z,light1.shadowsInfo.w); 1520	#endif 1521	#elif defined(SHADOWPOISSON1) 1522	#if defined(SHADOWCUBE1) 1523 shadow=computeShadowWithPoissonSamplingCube(light1.vLightData.xyz,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.x,light1.depthValues); 1524	#else 1525 shadow=computeShadowWithPoissonSampling(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.x,light1.shadowsInfo.w); 1526	#endif 1527	#elif defined(SHADOWPCF1) 1528	#if defined(SHADOWLOWQUALITY1) 1529 shadow=computeShadowWithPCF1(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.w); 1530	#elif defined(SHADOWMEDIUMQUALITY1) 1531 shadow=computeShadowWithPCF3(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.yz,light1.shadowsInfo.x,light1.shadowsInfo.w); 1532	#else 1533 shadow=computeShadowWithPCF5(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.yz,light1.shadowsInfo.x,light1.shadowsInfo.w); 1534	#endif 1535	#elif defined(SHADOWPCSS1) 1536	#if defined(SHADOWLOWQUALITY1) 1537 shadow=computeShadowWithPCSS16(vPositionFromLight1,vDepthMetric1,depthSampler1,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.z,light1.shadowsInfo.x,light1.shadowsInfo.w); 1538	#elif defined(SHADOWMEDIUMQUALITY1) 1539 shadow=computeShadowWithPCSS32(vPositionFromLight1,vDepthMetric1,depthSampler1,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.z,light1.shadowsInfo.x,light1.shadowsInfo.w); 1540	#else 1541 shadow=computeShadowWithPCSS64(vPositionFromLight1,vDepthMetric1,depthSampler1,shadowSampler1,light1.shadowsInfo.y,light1.shadowsInfo.z,light1.shadowsInfo.x,light1.shadowsInfo.w); 1542	#endif 1543	#else 1544	#if defined(SHADOWCUBE1) 1545 shadow=computeShadowCube(light1.vLightData.xyz,shadowSampler1,light1.shadowsInfo.x,light1.depthValues); 1546	#else 1547 shadow=computeShadow(vPositionFromLight1,vDepthMetric1,shadowSampler1,light1.shadowsInfo.x,light1.shadowsInfo.w); 1548	#endif 1549	#endif 1550	#ifdef SHADOWONLY 1551	#ifndef SHADOWINUSE 1552	#define SHADOWINUSE 1553	#endif 1554 globalShadow+=shadow; 1555	shadowLightCount+=1.0; 1556	#endif 1557 #else 1558	shadow=1.; 1559	#endif 1560	#ifndef SHADOWONLY 1561 #ifdef CUSTOMUSERLIGHTING 1562 diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); 1563	#ifdef SPECULARTERM 1564 specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); 1565	#endif 1566	#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED1) 1567	diffuseBase+=lightmapColor*shadow; 1568	#ifdef SPECULARTERM 1569	#ifndef LIGHTMAPNOSPECULAR1 1570 specularBase+=info.specular*shadow*lightmapColor; 1571	#endif 1572 #endif 1573	#else 1574	diffuseBase+=info.diffuse*shadow; 1575 #ifdef SPECULARTERM 1576	specularBase+=info.specular*shadow; 1577 #endif 1578	#endif 1579	#endif 1580	#endif 1581	#ifdef LIGHT2 1582 #if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED2) && defined(LIGHTMAPNOSPECULAR2)) 1583 1584	#else 1585	#ifdef PBR 1586	#ifdef SPOTLIGHT2 1587 info=computeSpotLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDirection,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1588	#endif 1589	#ifdef HEMILIGHT2 1590 info=computeHemisphericLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightGround,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1591	#endif 1592	#if defined(POINTLIGHT2) || defined(DIRLIGHT2) 1593 info=computeLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1594	#endif 1595	#else 1596	#ifdef SPOTLIGHT2 1597 info=computeSpotLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDirection,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightDiffuse.a,glossiness); 1598	#endif 1599	#ifdef HEMILIGHT2 1600 info=computeHemisphericLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightGround,glossiness); 1601	#endif 1602	#if defined(POINTLIGHT2) || defined(DIRLIGHT2) 1603 info=computeLighting(viewDirectionW,normalW,light2.vLightData,light2.vLightDiffuse.rgb,light2.vLightSpecular,light2.vLightDiffuse.a,glossiness); 1604	#endif 1605	#endif 1606	#ifdef PROJECTEDLIGHTTEXTURE2 1607 info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler2,textureProjectionMatrix2); 1608	#endif 1609	#endif 1610	#ifdef SHADOW2 1611	#ifdef SHADOWCLOSEESM2 1612	#if defined(SHADOWCUBE2) 1613 shadow=computeShadowWithCloseESMCube(light2.vLightData.xyz,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.z,light2.depthValues); 1614	#else 1615 shadow=computeShadowWithCloseESM(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.z,light2.shadowsInfo.w); 1616	#endif 1617	#elif defined(SHADOWESM2) 1618	#if defined(SHADOWCUBE2) 1619 shadow=computeShadowWithESMCube(light2.vLightData.xyz,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.z,light2.depthValues); 1620	#else 1621 shadow=computeShadowWithESM(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.z,light2.shadowsInfo.w); 1622	#endif 1623	#elif defined(SHADOWPOISSON2) 1624	#if defined(SHADOWCUBE2) 1625 shadow=computeShadowWithPoissonSamplingCube(light2.vLightData.xyz,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.x,light2.depthValues); 1626	#else 1627 shadow=computeShadowWithPoissonSampling(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.x,light2.shadowsInfo.w); 1628	#endif 1629	#elif defined(SHADOWPCF2) 1630	#if defined(SHADOWLOWQUALITY2) 1631 shadow=computeShadowWithPCF1(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.w); 1632	#elif defined(SHADOWMEDIUMQUALITY2) 1633 shadow=computeShadowWithPCF3(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.yz,light2.shadowsInfo.x,light2.shadowsInfo.w); 1634	#else 1635 shadow=computeShadowWithPCF5(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.yz,light2.shadowsInfo.x,light2.shadowsInfo.w); 1636	#endif 1637	#elif defined(SHADOWPCSS2) 1638	#if defined(SHADOWLOWQUALITY2) 1639 shadow=computeShadowWithPCSS16(vPositionFromLight2,vDepthMetric2,depthSampler2,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.z,light2.shadowsInfo.x,light2.shadowsInfo.w); 1640	#elif defined(SHADOWMEDIUMQUALITY2) 1641 shadow=computeShadowWithPCSS32(vPositionFromLight2,vDepthMetric2,depthSampler2,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.z,light2.shadowsInfo.x,light2.shadowsInfo.w); 1642	#else 1643 shadow=computeShadowWithPCSS64(vPositionFromLight2,vDepthMetric2,depthSampler2,shadowSampler2,light2.shadowsInfo.y,light2.shadowsInfo.z,light2.shadowsInfo.x,light2.shadowsInfo.w); 1644	#endif 1645	#else 1646	#if defined(SHADOWCUBE2) 1647 shadow=computeShadowCube(light2.vLightData.xyz,shadowSampler2,light2.shadowsInfo.x,light2.depthValues); 1648	#else 1649 shadow=computeShadow(vPositionFromLight2,vDepthMetric2,shadowSampler2,light2.shadowsInfo.x,light2.shadowsInfo.w); 1650	#endif 1651	#endif 1652	#ifdef SHADOWONLY 1653	#ifndef SHADOWINUSE 1654	#define SHADOWINUSE 1655	#endif 1656 globalShadow+=shadow; 1657	shadowLightCount+=1.0; 1658	#endif 1659 #else 1660	shadow=1.; 1661	#endif 1662	#ifndef SHADOWONLY 1663 #ifdef CUSTOMUSERLIGHTING 1664 diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); 1665	#ifdef SPECULARTERM 1666 specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); 1667	#endif 1668	#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED2) 1669	diffuseBase+=lightmapColor*shadow; 1670	#ifdef SPECULARTERM 1671	#ifndef LIGHTMAPNOSPECULAR2 1672 specularBase+=info.specular*shadow*lightmapColor; 1673	#endif 1674 #endif 1675	#else 1676	diffuseBase+=info.diffuse*shadow; 1677 #ifdef SPECULARTERM 1678	specularBase+=info.specular*shadow; 1679 #endif 1680	#endif 1681	#endif 1682	#endif 1683	#ifdef LIGHT3 1684 #if defined(SHADOWONLY) || (defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED3) && defined(LIGHTMAPNOSPECULAR3)) 1685 1686	#else 1687	#ifdef PBR 1688	#ifdef SPOTLIGHT3 1689 info=computeSpotLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDirection,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1690	#endif 1691	#ifdef HEMILIGHT3 1692 info=computeHemisphericLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightGround,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1693	#endif 1694	#if defined(POINTLIGHT3) || defined(DIRLIGHT3) 1695 info=computeLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightDiffuse.a,roughness,NdotV,specularEnvironmentR0,specularEnvironmentR90,geometricRoughnessFactor,NdotL); 1696	#endif 1697	#else 1698	#ifdef SPOTLIGHT3 1699 info=computeSpotLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDirection,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightDiffuse.a,glossiness); 1700	#endif 1701	#ifdef HEMILIGHT3 1702 info=computeHemisphericLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightGround,glossiness); 1703	#endif 1704	#if defined(POINTLIGHT3) || defined(DIRLIGHT3) 1705 info=computeLighting(viewDirectionW,normalW,light3.vLightData,light3.vLightDiffuse.rgb,light3.vLightSpecular,light3.vLightDiffuse.a,glossiness); 1706	#endif 1707	#endif 1708	#ifdef PROJECTEDLIGHTTEXTURE3 1709 info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler3,textureProjectionMatrix3); 1710	#endif 1711	#endif 1712	#ifdef SHADOW3 1713	#ifdef SHADOWCLOSEESM3 1714	#if defined(SHADOWCUBE3) 1715 shadow=computeShadowWithCloseESMCube(light3.vLightData.xyz,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.z,light3.depthValues); 1716	#else 1717 shadow=computeShadowWithCloseESM(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.z,light3.shadowsInfo.w); 1718	#endif 1719	#elif defined(SHADOWESM3) 1720	#if defined(SHADOWCUBE3) 1721 shadow=computeShadowWithESMCube(light3.vLightData.xyz,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.z,light3.depthValues); 1722	#else 1723 shadow=computeShadowWithESM(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.z,light3.shadowsInfo.w); 1724	#endif 1725	#elif defined(SHADOWPOISSON3) 1726	#if defined(SHADOWCUBE3) 1727 shadow=computeShadowWithPoissonSamplingCube(light3.vLightData.xyz,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.x,light3.depthValues); 1728	#else 1729 shadow=computeShadowWithPoissonSampling(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.x,light3.shadowsInfo.w); 1730	#endif 1731	#elif defined(SHADOWPCF3) 1732	#if defined(SHADOWLOWQUALITY3) 1733 shadow=computeShadowWithPCF1(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.w); 1734	#elif defined(SHADOWMEDIUMQUALITY3) 1735 shadow=computeShadowWithPCF3(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.yz,light3.shadowsInfo.x,light3.shadowsInfo.w); 1736	#else 1737 shadow=computeShadowWithPCF5(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.yz,light3.shadowsInfo.x,light3.shadowsInfo.w); 1738	#endif 1739	#elif defined(SHADOWPCSS3) 1740	#if defined(SHADOWLOWQUALITY3) 1741 shadow=computeShadowWithPCSS16(vPositionFromLight3,vDepthMetric3,depthSampler3,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.z,light3.shadowsInfo.x,light3.shadowsInfo.w); 1742	#elif defined(SHADOWMEDIUMQUALITY3) 1743 shadow=computeShadowWithPCSS32(vPositionFromLight3,vDepthMetric3,depthSampler3,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.z,light3.shadowsInfo.x,light3.shadowsInfo.w); 1744	#else 1745 shadow=computeShadowWithPCSS64(vPositionFromLight3,vDepthMetric3,depthSampler3,shadowSampler3,light3.shadowsInfo.y,light3.shadowsInfo.z,light3.shadowsInfo.x,light3.shadowsInfo.w); 1746	#endif 1747	#else 1748	#if defined(SHADOWCUBE3) 1749 shadow=computeShadowCube(light3.vLightData.xyz,shadowSampler3,light3.shadowsInfo.x,light3.depthValues); 1750	#else 1751 shadow=computeShadow(vPositionFromLight3,vDepthMetric3,shadowSampler3,light3.shadowsInfo.x,light3.shadowsInfo.w); 1752	#endif 1753	#endif 1754	#ifdef SHADOWONLY 1755	#ifndef SHADOWINUSE 1756	#define SHADOWINUSE 1757	#endif 1758 globalShadow+=shadow; 1759	shadowLightCount+=1.0; 1760	#endif 1761 #else 1762	shadow=1.; 1763	#endif 1764	#ifndef SHADOWONLY 1765 #ifdef CUSTOMUSERLIGHTING 1766 diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); 1767	#ifdef SPECULARTERM 1768 specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); 1769	#endif 1770	#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED3) 1771	diffuseBase+=lightmapColor*shadow; 1772	#ifdef SPECULARTERM 1773	#ifndef LIGHTMAPNOSPECULAR3 1774 specularBase+=info.specular*shadow*lightmapColor; 1775	#endif 1776 #endif 1777	#else 1778	diffuseBase+=info.diffuse*shadow; 1779 #ifdef SPECULARTERM 1780	specularBase+=info.specular*shadow; 1781 #endif 1782	#endif 1783	#endif 1784	#endif 1785	1786	1787	vec3 refractionColor=vec3(0.,0.,0.); 1788	#ifdef REFRACTION 1789	vec3 refractionVector=normalize(refract(-viewDirectionW,normalW,vRefractionInfos.y)); 1790	#ifdef REFRACTIONMAP_3D 1791 refractionVector.y=refractionVector.y*vRefractionInfos.w; 1792	if (dot(refractionVector,viewDirectionW)<1.0) { 1793 refractionColor=texture(refractionCubeSampler,refractionVector).rgb; 1794	} 1795	#else 1796	vec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0))); 1797	vec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z; 1798 refractionCoords.y=1.0-refractionCoords.y; 1799 refractionColor=texture(refraction2DSampler,refractionCoords).rgb; 1800	#endif 1801	#ifdef IS_REFRACTION_LINEAR 1802 refractionColor=toGammaSpace(refractionColor); 1803	#endif 1804 refractionColor*=vRefractionInfos.x; 1805	#endif 1806	1807	vec3 reflectionColor=vec3(0.,0.,0.); 1808	#ifdef REFLECTION 1809	vec3 vReflectionUVW=computeReflectionCoords(vec4(vPositionW,1.0),normalW); 1810	#ifdef REFLECTIONMAP_3D 1811	#ifdef ROUGHNESS 1812	float bias=vReflectionInfos.y; 1813	#ifdef SPECULARTERM 1814	#ifdef SPECULAR 1815	#ifdef GLOSSINESS 1816	bias*=(1.0-specularMapColor.a); 1817	#endif 1818	#endif 1819	#endif 1820 reflectionColor=texture(reflectionCubeSampler,vReflectionUVW,bias).rgb; 1821	#else 1822 reflectionColor=texture(reflectionCubeSampler,vReflectionUVW).rgb; 1823	#endif 1824	#else 1825	vec2 coords=vReflectionUVW.xy; 1826 #ifdef REFLECTIONMAP_PROJECTION 1827	coords/=vReflectionUVW.z; 1828 #endif 1829	coords.y=1.0-coords.y; 1830 reflectionColor=texture(reflection2DSampler,coords).rgb; 1831 #endif 1832	#ifdef IS_REFLECTION_LINEAR 1833 reflectionColor=toGammaSpace(reflectionColor); 1834	#endif 1835 reflectionColor*=vReflectionInfos.x; 1836	#ifdef REFLECTIONFRESNEL 1837	float reflectionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,reflectionRightColor.a,reflectionLeftColor.a); 1838	#ifdef REFLECTIONFRESNELFROMSPECULAR 1839	#ifdef SPECULARTERM 1840	reflectionColor*=specularColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; 1841	#else 1842	reflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; 1843	#endif 1844	#else 1845 reflectionColor*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; 1846	#endif 1847	#endif 1848	#endif 1849	#ifdef REFRACTIONFRESNEL 1850	float refractionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,refractionRightColor.a,refractionLeftColor.a); 1851	refractionColor*=refractionLeftColor.rgb*(1.0-refractionFresnelTerm)+refractionFresnelTerm*refractionRightColor.rgb; 1852	#endif 1853	#ifdef OPACITY 1854	vec4 opacityMap=texture(opacitySampler,vOpacityUV+uvOffset); 1855	#ifdef OPACITYRGB 1856	opacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11); 1857	alpha*=(opacityMap.x+opacityMap.y+opacityMap.z)* vOpacityInfos.y; 1858	#else 1859 alpha*=opacityMap.a*vOpacityInfos.y; 1860	#endif 1861	#endif 1862 #ifdef VERTEXALPHA 1863	alpha*=vColor.a; 1864	#endif 1865	#ifdef OPACITYFRESNEL 1866	float opacityFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,opacityParts.z,opacityParts.w); 1867	alpha+=opacityParts.x*(1.0-opacityFresnelTerm)+opacityFresnelTerm*opacityParts.y; 1868	#endif 1869	1870	vec3 emissiveColor=vEmissiveColor; 1871	#ifdef EMISSIVE 1872 emissiveColor+=texture(emissiveSampler,vEmissiveUV+uvOffset).rgb*vEmissiveInfos.y; 1873	#endif 1874	#ifdef EMISSIVEFRESNEL 1875	float emissiveFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,emissiveRightColor.a,emissiveLeftColor.a); 1876	emissiveColor*=emissiveLeftColor.rgb*(1.0-emissiveFresnelTerm)+emissiveFresnelTerm*emissiveRightColor.rgb; 1877	#endif 1878	1879	#ifdef DIFFUSEFRESNEL 1880	float diffuseFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,diffuseRightColor.a,diffuseLeftColor.a); 1881	diffuseBase*=diffuseLeftColor.rgb*(1.0-diffuseFresnelTerm)+diffuseFresnelTerm*diffuseRightColor.rgb; 1882 #endif 1883	1884	#ifdef EMISSIVEASILLUMINATION 1885	vec3 finalDiffuse=clamp(diffuseBase*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb; 1886	#else 1887	#ifdef LINKEMISSIVEWITHDIFFUSE 1888	vec3 finalDiffuse=clamp((diffuseBase+emissiveColor)*diffuseColor+vAmbientColor,0.0,1.0)*baseColor.rgb; 1889	#else 1890	vec3 finalDiffuse=clamp(diffuseBase*diffuseColor+emissiveColor+vAmbientColor,0.0,1.0)*baseColor.rgb; 1891	#endif 1892	#endif 1893	#ifdef SPECULARTERM 1894	vec3 finalSpecular=specularBase*specularColor; 1895	#ifdef SPECULAROVERALPHA 1896 alpha=clamp(alpha+dot(finalSpecular,vec3(0.3,0.59,0.11)),0.,1.); 1897	#endif 1898	#else 1899	vec3 finalSpecular=vec3(0.0); 1900 #endif 1901	#ifdef REFLECTIONOVERALPHA 1902 alpha=clamp(alpha+dot(reflectionColor,vec3(0.3,0.59,0.11)),0.,1.); 1903	#endif 1904	1905	#ifdef EMISSIVEASILLUMINATION 1906	vec4 color=vec4(clamp(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+emissiveColor+refractionColor,0.0,1.0),alpha); 1907	#else 1908	vec4 color=vec4(finalDiffuse*baseAmbientColor+finalSpecular+reflectionColor+refractionColor,alpha); 1909	#endif 1910	1911	#ifdef LIGHTMAP 1912	#ifndef LIGHTMAPEXCLUDED 1913	#ifdef USELIGHTMAPASSHADOWMAP 1914	color.rgb*=lightmapColor; 1915	#else 1916	color.rgb+=lightmapColor; 1917	#endif 1918	#endif 1919	#endif 1920	#define CUSTOM_FRAGMENT_BEFORE_FOG 1921 color.rgb=max(color.rgb,0.); 1922	#ifdef LOGARITHMICDEPTH 1923 gl_FragDepth=log2(vFragmentDepth)*logarithmicDepthConstant*0.5; 1924	#endif 1925	#ifdef FOG 1926	float fog=CalcFogFactor(); 1927 color.rgb=fog*color.rgb+(1.0-fog)*vFogColor; 1928	#endif 1929	1930 1931	#ifdef IMAGEPROCESSINGPOSTPROCESS 1932 color.rgb=toLinearSpace(color.rgb); 1933	#else 1934	#ifdef IMAGEPROCESSING 1935	color.rgb=toLinearSpace(color.rgb); 1936 color=applyImageProcessing(color); 1937	#endif 1938	#endif 1939 #ifdef PREMULTIPLYALPHA 1940	1941	color.rgb*=color.a; 1942	#endif 1943	#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR 1944 glFragColor=color; 1945	} 1946

[22:23:13]: Vertex shader: default 1	#version 300 es 2	#define WEBGL2 3	#define MAINUV1 4	#define DIFFUSE 5	#define DIFFUSEDIRECTUV 1 6	#define AMBIENTDIRECTUV 0 7	#define OPACITYDIRECTUV 0 8	#define EMISSIVEDIRECTUV 0 9	#define SPECULARDIRECTUV 0 10	#define BUMPDIRECTUV 0 11	#define SPECULARTERM 12	#define NORMAL 13	#define UV1 14	#define NUM_BONE_INFLUENCERS 0 15	#define BonesPerMesh 0 16	#define LIGHTMAPDIRECTUV 0 17	#define SHADOWFLOAT 18	#define NUM_MORPH_INFLUENCERS 0 19	#define VIGNETTEBLENDMODEMULTIPLY 20 #define SAMPLER3DGREENDEPTH 21	#define SAMPLER3DBGRMAP 22	#define LIGHT0 23	#define SPOTLIGHT0 24	#define SHADOW0 25	#define SHADOWPCF0 26	#define SHADOWS 27	28	#define SHADER_NAME vertex:default 29	precision highp float; 30 layout(std140,column_major) uniform; 31	uniform Material 32	{ 33 vec4 diffuseLeftColor; 34	vec4 diffuseRightColor; 35	vec4 opacityParts; 36	vec4 reflectionLeftColor; 37	vec4 reflectionRightColor; 38	vec4 refractionLeftColor; 39	vec4 refractionRightColor; 40	vec4 emissiveLeftColor; 41	vec4 emissiveRightColor; 42	vec2 vDiffuseInfos; 43	vec2 vAmbientInfos; 44	vec2 vOpacityInfos; 45	vec2 vReflectionInfos; 46	vec3 vReflectionPosition; 47	vec3 vReflectionSize; 48	vec2 vEmissiveInfos; 49	vec2 vLightmapInfos; 50	vec2 vSpecularInfos; 51 vec3 vBumpInfos; 52	mat4 diffuseMatrix; 53	mat4 ambientMatrix; 54 mat4 opacityMatrix; 55	mat4 reflectionMatrix; 56	mat4 emissiveMatrix; 57	mat4 lightmapMatrix; 58	mat4 specularMatrix; 59 mat4 bumpMatrix; 60	vec4 vTangentSpaceParams; 61	mat4 refractionMatrix; 62	vec4 vRefractionInfos; 63	vec4 vSpecularColor; 64	vec3 vEmissiveColor; 65	vec4 vDiffuseColor; 66	float pointSize; 67	}; 68	uniform Scene { 69	mat4 viewProjection; 70	mat4 view; 71 }; 72	73	#define CUSTOM_VERTEX_BEGIN 74	in vec3 position; 75	#ifdef NORMAL 76	in vec3 normal; 77	#endif 78	#ifdef TANGENT 79	in vec4 tangent; 80	#endif 81	#ifdef UV1 82	in vec2 uv; 83	#endif 84	#ifdef UV2 85	in vec2 uv2; 86	#endif 87	#ifdef VERTEXCOLOR 88	in vec4 color; 89	#endif 90	const float PI=3.1415926535897932384626433832795; 91	const float LinearEncodePowerApprox=2.2; 92	const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox; 93	const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722); 94	mat3 transposeMat3(mat3 inMatrix) { 95	vec3 i0=inMatrix[0]; 96	vec3 i1=inMatrix[1]; 97	vec3 i2=inMatrix[2]; 98	mat3 outMatrix=mat3( 99 vec3(i0.x,i1.x,i2.x), 100	vec3(i0.y,i1.y,i2.y), 101 vec3(i0.z,i1.z,i2.z) 102	); 103	return outMatrix; 104	} 105	106 mat3 inverseMat3(mat3 inMatrix) { 107	float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2]; 108	float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2]; 109	float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2]; 110	float b01=a22*a11-a12*a21; 111	float b11=-a22*a10+a12*a20; 112	float b21=a21*a10-a11*a20; 113	float det=a00*b01+a01*b11+a02*b21; 114 return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11), 115	b11,(a22*a00-a02*a20),(-a12*a00+a02*a10), 116	b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det; 117	} 118	float computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff) 119	{ 120	float mask=smoothstep(1.0-frustumEdgeFalloff,1.0,clamp(dot(clipSpace,clipSpace),0.,1.)); 121 return mix(value,1.0,mask); 122	} 123	vec3 applyEaseInOut(vec3 x){ 124	return x*x*(3.0-2.0*x); 125	} 126	vec3 toLinearSpace(vec3 color) 127	{ 128	return pow(color,vec3(LinearEncodePowerApprox)); 129	} 130	vec3 toGammaSpace(vec3 color) 131	{ 132	return pow(color,vec3(GammaEncodePowerApprox)); 133	} 134	float square(float value) 135	{ 136	return value*value; 137	} 138	float getLuminance(vec3 color) 139	{ 140	return clamp(dot(color,LuminanceEncodeApprox),0.,1.); 141	} 142	143	float getRand(vec2 seed) { 144	return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453); 145	} 146	float dither(vec2 seed,float varianceAmount) { 147	float rand=getRand(seed); 148 float dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand); 149	return dither; 150	} 151	#if NUM_BONE_INFLUENCERS>0 152	uniform mat4 mBones[BonesPerMesh]; 153	in vec4 matricesIndices; 154	in vec4 matricesWeights; 155	#if NUM_BONE_INFLUENCERS>4 156	in vec4 matricesIndicesExtra; 157	in vec4 matricesWeightsExtra; 158	#endif 159	#endif 160	161	#ifdef INSTANCES 162	in vec4 world0; 163	in vec4 world1; 164	in vec4 world2; 165	in vec4 world3; 166	#else 167 uniform mat4 world; 168	#endif 169	#ifdef MAINUV1 170	out vec2 vMainUV1; 171	#endif 172	#ifdef MAINUV2 173	out vec2 vMainUV2; 174 #endif 175	#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 176	out vec2 vDiffuseUV; 177	#endif 178	#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 179	out vec2 vAmbientUV; 180	#endif 181	#if defined(OPACITY) && OPACITYDIRECTUV == 0 182	out vec2 vOpacityUV; 183	#endif 184	#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 185 out vec2 vEmissiveUV; 186	#endif 187	#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 188	out vec2 vLightmapUV; 189	#endif 190	#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 191	out vec2 vSpecularUV; 192	#endif 193	#if defined(BUMP) && BUMPDIRECTUV == 0 194	out vec2 vBumpUV; 195	#endif 196	197	out vec3 vPositionW; 198	#ifdef NORMAL 199	out vec3 vNormalW; 200	#endif 201 #ifdef VERTEXCOLOR 202	out vec4 vColor; 203	#endif 204	#if defined(BUMP) || defined(PARALLAX) 205	#if defined(TANGENT) && defined(NORMAL) 206	out mat3 vTBN; 207	#endif 208	#endif 209	210 #ifdef CLIPPLANE 211	uniform vec4 vClipPlane; 212	out float fClipDistance; 213	#endif 214	#ifdef FOG 215	out vec3 vFogDistance; 216	#endif 217	#ifdef LIGHT0 218	uniform Light0 219	{ 220	vec4 vLightData; 221	vec4 vLightDiffuse; 222	vec3 vLightSpecular; 223 #ifdef SPOTLIGHT0 224	vec4 vLightDirection; 225	#endif 226	#ifdef HEMILIGHT0 227	vec3 vLightGround; 228	#endif 229	vec4 shadowsInfo; 230	vec2 depthValues; 231	} light0; 232	#ifdef PROJECTEDLIGHTTEXTURE0 233	uniform mat4 textureProjectionMatrix0; 234	uniform sampler2D projectionLightSampler0; 235	#endif 236 #ifdef SHADOW0 237	#if defined(SHADOWCUBE0) 238	uniform samplerCube shadowSampler0; 239	#else 240	out vec4 vPositionFromLight0; 241	out float vDepthMetric0; 242	#if defined(SHADOWPCSS0) 243	uniform highp sampler2DShadow shadowSampler0; 244	uniform highp sampler2D depthSampler0; 245	#elif defined(SHADOWPCF0) 246	uniform highp sampler2DShadow shadowSampler0; 247	#else 248	uniform sampler2D shadowSampler0; 249	#endif 250	uniform mat4 lightMatrix0; 251 #endif 252	#endif 253	#endif 254	#ifdef LIGHT1 255	uniform Light1 256	{ 257	vec4 vLightData; 258	vec4 vLightDiffuse; 259	vec3 vLightSpecular; 260	#ifdef SPOTLIGHT1 261	vec4 vLightDirection; 262 #endif 263	#ifdef HEMILIGHT1 264	vec3 vLightGround; 265	#endif 266 vec4 shadowsInfo; 267	vec2 depthValues; 268	} light1; 269	#ifdef PROJECTEDLIGHTTEXTURE1 270	uniform mat4 textureProjectionMatrix1; 271	uniform sampler2D projectionLightSampler1; 272	#endif 273 #ifdef SHADOW1 274	#if defined(SHADOWCUBE1) 275	uniform samplerCube shadowSampler1; 276	#else 277	out vec4 vPositionFromLight1; 278	out float vDepthMetric1; 279	#if defined(SHADOWPCSS1) 280	uniform highp sampler2DShadow shadowSampler1; 281	uniform highp sampler2D depthSampler1; 282	#elif defined(SHADOWPCF1) 283	uniform highp sampler2DShadow shadowSampler1; 284	#else 285	uniform sampler2D shadowSampler1; 286	#endif 287	uniform mat4 lightMatrix1; 288 #endif 289	#endif 290	#endif 291	#ifdef LIGHT2 292	uniform Light2 293	{ 294	vec4 vLightData; 295	vec4 vLightDiffuse; 296	vec3 vLightSpecular; 297	#ifdef SPOTLIGHT2 298	vec4 vLightDirection; 299 #endif 300	#ifdef HEMILIGHT2 301	vec3 vLightGround; 302	#endif 303 vec4 shadowsInfo; 304	vec2 depthValues; 305	} light2; 306	#ifdef PROJECTEDLIGHTTEXTURE2 307	uniform mat4 textureProjectionMatrix2; 308	uniform sampler2D projectionLightSampler2; 309	#endif 310 #ifdef SHADOW2 311	#if defined(SHADOWCUBE2) 312	uniform samplerCube shadowSampler2; 313	#else 314	out vec4 vPositionFromLight2; 315	out float vDepthMetric2; 316	#if defined(SHADOWPCSS2) 317	uniform highp sampler2DShadow shadowSampler2; 318	uniform highp sampler2D depthSampler2; 319	#elif defined(SHADOWPCF2) 320	uniform highp sampler2DShadow shadowSampler2; 321	#else 322	uniform sampler2D shadowSampler2; 323	#endif 324	uniform mat4 lightMatrix2; 325 #endif 326	#endif 327	#endif 328	#ifdef LIGHT3 329	uniform Light3 330	{ 331	vec4 vLightData; 332	vec4 vLightDiffuse; 333	vec3 vLightSpecular; 334	#ifdef SPOTLIGHT3 335	vec4 vLightDirection; 336 #endif 337	#ifdef HEMILIGHT3 338	vec3 vLightGround; 339	#endif 340 vec4 shadowsInfo; 341	vec2 depthValues; 342	} light3; 343	#ifdef PROJECTEDLIGHTTEXTURE3 344	uniform mat4 textureProjectionMatrix3; 345	uniform sampler2D projectionLightSampler3; 346	#endif 347 #ifdef SHADOW3 348	#if defined(SHADOWCUBE3) 349	uniform samplerCube shadowSampler3; 350	#else 351	out vec4 vPositionFromLight3; 352	out float vDepthMetric3; 353	#if defined(SHADOWPCSS3) 354	uniform highp sampler2DShadow shadowSampler3; 355	uniform highp sampler2D depthSampler3; 356	#elif defined(SHADOWPCF3) 357	uniform highp sampler2DShadow shadowSampler3; 358	#else 359	uniform sampler2D shadowSampler3; 360	#endif 361	uniform mat4 lightMatrix3; 362 #endif 363	#endif 364	#endif 365	366	#ifdef MORPHTARGETS 367 uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS]; 368 #endif 369	370	#ifdef REFLECTIONMAP_SKYBOX 371	out vec3 vPositionUVW; 372	#endif 373	#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) 374	out vec3 vDirectionW; 375	#endif 376	#ifdef LOGARITHMICDEPTH 377	uniform float logarithmicDepthConstant; 378	out float vFragmentDepth; 379 #endif 380	#define CUSTOM_VERTEX_DEFINITIONS 381	void main(void) { 382	#define CUSTOM_VERTEX_MAIN_BEGIN 383	vec3 positionUpdated=position; 384	#ifdef NORMAL 385	vec3 normalUpdated=normal; 386	#endif 387	#ifdef TANGENT 388	vec4 tangentUpdated=tangent; 389	#endif 390	391	#ifdef REFLECTIONMAP_SKYBOX 392	vPositionUVW=positionUpdated; 393	#endif 394	#define CUSTOM_VERTEX_UPDATE_POSITION 395	#define CUSTOM_VERTEX_UPDATE_NORMAL 396	#ifdef INSTANCES 397	mat4 finalWorld=mat4(world0,world1,world2,world3); 398	#else 399	mat4 finalWorld=world; 400	#endif 401	#if NUM_BONE_INFLUENCERS>0 402 mat4 influence; 403 influence=mBones[int(matricesIndices[0])]*matricesWeights[0]; 404 #if NUM_BONE_INFLUENCERS>1 405 influence+=mBones[int(matricesIndices[1])]*matricesWeights[1]; 406 #endif 407	#if NUM_BONE_INFLUENCERS>2 408 influence+=mBones[int(matricesIndices[2])]*matricesWeights[2]; 409 #endif 410	#if NUM_BONE_INFLUENCERS>3 411 influence+=mBones[int(matricesIndices[3])]*matricesWeights[3]; 412 #endif 413	#if NUM_BONE_INFLUENCERS>4 414 influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; 415	#endif 416	#if NUM_BONE_INFLUENCERS>5 417 influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; 418	#endif 419	#if NUM_BONE_INFLUENCERS>6 420 influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; 421	#endif 422	#if NUM_BONE_INFLUENCERS>7 423 influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; 424	#endif 425	finalWorld=finalWorld*influence; 426	#endif 427 gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0); 428	vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); 429 vPositionW=vec3(worldPos); 430	#ifdef NORMAL 431	mat3 normalWorld=mat3(finalWorld); 432	#ifdef NONUNIFORMSCALING 433 normalWorld=transposeMat3(inverseMat3(normalWorld)); 434	#endif 435 vNormalW=normalize(normalWorld*normalUpdated); 436	#endif 437	#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) 438 vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0))); 439	#endif 440	441	#ifndef UV1 442	vec2 uv=vec2(0.,0.); 443	#endif 444	#ifndef UV2 445	vec2 uv2=vec2(0.,0.); 446	#endif 447	#ifdef MAINUV1 448	vMainUV1=uv; 449	#endif 450	#ifdef MAINUV2 451 vMainUV2=uv2; 452	#endif 453	#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 454	if (vDiffuseInfos.x == 0.) 455	{ 456 vDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0)); 457	} 458	else 459 { 460	vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); 461	} 462 #endif 463	#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 464	if (vAmbientInfos.x == 0.) 465	{ 466 vAmbientUV=vec2(ambientMatrix*vec4(uv,1.0,0.0)); 467	} 468	else 469 { 470	vAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0)); 471	} 472 #endif 473	#if defined(OPACITY) && OPACITYDIRECTUV == 0 474	if (vOpacityInfos.x == 0.) 475	{ 476 vOpacityUV=vec2(opacityMatrix*vec4(uv,1.0,0.0)); 477	} 478	else 479 { 480	vOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0)); 481	} 482 #endif 483	#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 484	if (vEmissiveInfos.x == 0.) 485	{ 486 vEmissiveUV=vec2(emissiveMatrix*vec4(uv,1.0,0.0)); 487	} 488	else 489	{ 490	vEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0)); 491	} 492	#endif 493	#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 494 if (vLightmapInfos.x == 0.) 495	{ 496 vLightmapUV=vec2(lightmapMatrix*vec4(uv,1.0,0.0)); 497	} 498	else 499	{ 500	vLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0)); 501	} 502	#endif 503	#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 504	if (vSpecularInfos.x == 0.) 505	{ 506 vSpecularUV=vec2(specularMatrix*vec4(uv,1.0,0.0)); 507	} 508	else 509	{ 510	vSpecularUV=vec2(specularMatrix*vec4(uv2,1.0,0.0)); 511	} 512	#endif 513	#if defined(BUMP) && BUMPDIRECTUV == 0 514	if (vBumpInfos.x == 0.) 515	{ 516 vBumpUV=vec2(bumpMatrix*vec4(uv,1.0,0.0)); 517	} 518	else 519	{ 520 vBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0)); 521	} 522	#endif 523 #if defined(BUMP) || defined(PARALLAX) 524	#if defined(TANGENT) && defined(NORMAL) 525	vec3 tbnNormal=normalize(normalUpdated); 526 vec3 tbnTangent=normalize(tangentUpdated.xyz); 527	vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w; 528 vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal); 529 #endif 530	#endif 531	#ifdef CLIPPLANE 532 fClipDistance=dot(worldPos,vClipPlane); 533	#endif 534	#ifdef FOG 535	vFogDistance=(view*worldPos).xyz; 536	#endif 537	#ifdef SHADOWS 538	#if defined(SHADOW0) && !defined(SHADOWCUBE0) 539 vPositionFromLight0=lightMatrix0*worldPos; 540	vDepthMetric0=((vPositionFromLight0.z+light0.depthValues.x)/(light0.depthValues.y)); 541	#endif 542	#endif 543	#ifdef SHADOWS 544	#if defined(SHADOW1) && !defined(SHADOWCUBE1) 545 vPositionFromLight1=lightMatrix1*worldPos; 546	vDepthMetric1=((vPositionFromLight1.z+light1.depthValues.x)/(light1.depthValues.y)); 547	#endif 548	#endif 549	#ifdef SHADOWS 550	#if defined(SHADOW2) && !defined(SHADOWCUBE2) 551 vPositionFromLight2=lightMatrix2*worldPos; 552	vDepthMetric2=((vPositionFromLight2.z+light2.depthValues.x)/(light2.depthValues.y)); 553	#endif 554	#endif 555	#ifdef SHADOWS 556	#if defined(SHADOW3) && !defined(SHADOWCUBE3) 557 vPositionFromLight3=lightMatrix3*worldPos; 558	vDepthMetric3=((vPositionFromLight3.z+light3.depthValues.x)/(light3.depthValues.y)); 559	#endif 560	#endif 561	562	#ifdef VERTEXCOLOR 563	564 vColor=color; 565	#endif 566	#ifdef POINTSIZE 567 gl_PointSize=pointSize; 568	#endif 569	#ifdef LOGARITHMICDEPTH 570 vFragmentDepth=1.0+gl_Position.w; 571 gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant; 572	#endif 573	#define CUSTOM_VERTEX_MAIN_END 574	} 575

[22:23:13]: Attributes: position, normal, uv

[22:23:13]: Uniforms: world, view, viewProjection, vEyePosition, vLightsType, vAmbientColor, vDiffuseColor, vSpecularColor, vEmissiveColor, vFogInfos, vFogColor, pointSize, vDiffuseInfos, vAmbientInfos, vOpacityInfos, vReflectionInfos, vEmissiveInfos, vSpecularInfos, vBumpInfos, vLightmapInfos, vRefractionInfos, mBones, vClipPlane, diffuseMatrix, ambientMatrix, opacityMatrix, reflectionMatrix, emissiveMatrix, specularMatrix, bumpMatrix, normalMatrix, lightmapMatrix, refractionMatrix, diffuseLeftColor, diffuseRightColor, opacityParts, reflectionLeftColor, reflectionRightColor, emissiveLeftColor, emissiveRightColor, refractionLeftColor, refractionRightColor, vReflectionPosition, vReflectionSize, logarithmicDepthConstant, vTangentSpaceParams, vLightData0, vLightDiffuse0, vLightSpecular0, vLightDirection0, vLightGround0, lightMatrix0, shadowsInfo0, depthValues0, diffuseSampler, ambientSampler, opacitySampler, reflectionCubeSampler, reflection2DSampler, emissiveSampler, specularSampler, bumpSampler, lightmapSampler, refractionCubeSampler, refraction2DSampler, shadowSampler0, depthSampler0

[22:23:13]: Unable to compile effect:

 

Screenshot_20180409-223659.png

Link to comment
Share on other sites

w00t, You are actually using webgl 2 but it looks like the browser does not support it correctly.

Could you try: https://www.babylonjs-playground.com/frame.html#PSR2ZX#10

and this: https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html?version=2.0.1

First test will ensure webgl 2 works ok and the second should help catching a conformance issue. The name of the parameter webgl_4aeb46af4241331f would normally let me know it fails on the internal representation of the webgl2 converted shader.

Link to comment
Share on other sites

Hi @Sebavan

https://www.babylonjs-playground.com/frame.html#PSR2ZX#10 works fine:

5acc9e11d45dd_2018-04-1007_51_23.thumb.png.1e2eb907245678a4b83852a8fa225f03.png

partial results of https://www.khronos.org/registry/webgl/sdk/tests/webgl-conformance-tests.html?version=2.0.1 - hope this gives you something to work on, I will run it overnight if it's missing anything you need.: 

runall (Passed: 76344/94543 Timeout: 446/94543 in 15756.35 seconds)
runall/conformance (Passed: 71551/71728 Failed: 152/71728 Timeout: 25/71728 in 2732.85 seconds)
runall/conformance/attribs (Passed: 5772/5772 in 18.99 seconds)
runall/conformance/buffers (Passed: 323/323 in 10.87 seconds)
runall/conformance/canvas (Passed: 827/827 in 21.92 seconds)
runall/conformance/context (Passed: 816/816 in 56.85 seconds)
runall/conformance/extensions (Passed: 659/659 in 17.76 seconds)
runall/conformance/glsl (Passed: 7506/7507 Failed: 1/7507 in 435.06 seconds)
runall/conformance/glsl/bugs (Passed: 556/557 Failed: 1/557 in 95.53 seconds)
runconformance/glsl/bugs/constant-precision-qualifier.html (Passed: 3/4 Failed: 1/4 in 1074.0 ms)
failed: should be green at (0, 0) expected: 0,255,0,255 was 0,0,0,255
runall/conformance/glsl/constructors (Passed: 870/870 in 37.32 seconds)
runall/conformance/glsl/functions (Passed: 807/807 in 57.64 seconds)
runall/conformance/glsl/implicit (Passed: 130/130 in 34.82 seconds)
runall/conformance/glsl/literals (Passed: 6/6 in 1.60 seconds)
runall/conformance/glsl/matrices (Passed: 18/18 in 3.88 seconds)
runall/conformance/glsl/misc (Passed: 4640/4640 in 185.78 seconds)
runall/conformance/glsl/preprocessor (Passed: 2/2 in 0.46 seconds)
runall/conformance/glsl/reserved (Passed: 16/16 in 4.07 seconds)
runall/conformance/glsl/samplers (Passed: 251/251 in 6.28 seconds)
runall/conformance/glsl/variables (Passed: 210/210 in 7.67 seconds)
runall/conformance/limits (Passed: 31/31 in 5.06 seconds)
runall/conformance/misc (Passed: 2031/2181 Failed: 150/2181 in 22.61 seconds)
runconformance/misc/webgl-specific-stencil-settings.html (Passed: 474/624 Failed: 150/624 in 2781.0 ms)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
failed: getError expected: NO_ERROR. Was INVALID_OPERATION : after evaluating: wtu.dummySetProgramAndDrawNothing(gl)
runall/conformance/ogles (Passed: 1900/1900 in 631.79 seconds)
runall/conformance/ogles/GL (Passed: 1900/1900 in 631.79 seconds)
runall/conformance/ogles/GL/abs (Passed: 13/13 in 6.22 seconds)
runall/conformance/ogles/GL/acos (Passed: 13/13 in 5.51 seconds)
runall/conformance/ogles/GL/all (Passed: 9/9 in 3.30 seconds)
runall/conformance/ogles/GL/any (Passed: 9/9 in 3.72 seconds)
runall/conformance/ogles/GL/array (Passed: 13/13 in 3.64 seconds)
runall/conformance/ogles/GL/asin (Passed: 13/13 in 5.74 seconds)
runall/conformance/ogles/GL/atan (Passed: 26/26 in 12.17 seconds)
runall/conformance/ogles/GL/biConstants (Passed: 34/34 in 9.91 seconds)
runall/conformance/ogles/GL/biuDepthRange (Passed: 5/5 in 2.04 seconds)
runall/conformance/ogles/GL/build (Passed: 231/231 in 83.24 seconds)
runall/conformance/ogles/GL/built_in_varying_array_out_of_bounds (Passed: 2/2 in 1.41 seconds)
runall/conformance/ogles/GL/ceil (Passed: 13/13 in 4.57 seconds)
runall/conformance/ogles/GL/clamp (Passed: 13/13 in 4.27 seconds)
runall/conformance/ogles/GL/control_flow (Passed: 22/22 in 6.31 seconds)
runall/conformance/ogles/GL/cos (Passed: 13/13 in 5.00 seconds)
runall/conformance/ogles/GL/cross (Passed: 5/5 in 2.39 seconds)
runall/conformance/ogles/GL/default (Passed: 3/3 in 1.41 seconds)
runall/conformance/ogles/GL/degrees (Passed: 13/13 in 4.24 seconds)
runall/conformance/ogles/GL/discard (Passed: 5/5 in 2.04 seconds)
runall/conformance/ogles/GL/distance (Passed: 13/13 in 4.86 seconds)
runall/conformance/ogles/GL/dot (Passed: 13/13 in 4.06 seconds)
runall/conformance/ogles/GL/equal (Passed: 26/26 in 8.79 seconds)
runall/conformance/ogles/GL/exp (Passed: 26/26 in 9.84 seconds)
runall/conformance/ogles/GL/exp2 (Passed: 26/26 in 10.55 seconds)
runall/conformance/ogles/GL/faceforward (Passed: 13/13 in 4.73 seconds)
runall/conformance/ogles/GL/floor (Passed: 13/13 in 4.85 seconds)
runall/conformance/ogles/GL/fract (Passed: 13/13 in 6.35 seconds)
runall/conformance/ogles/GL/functions (Passed: 268/268 in 78.08 seconds)
runall/conformance/ogles/GL/gl_FragCoord (Passed: 7/7 in 2.35 seconds)
runall/conformance/ogles/GL/gl_FrontFacing (Passed: 3/3 in 1.41 seconds)
runall/conformance/ogles/GL/greaterThan (Passed: 17/17 in 5.09 seconds)
runall/conformance/ogles/GL/greaterThanEqual (Passed: 17/17 in 5.75 seconds)
runall/conformance/ogles/GL/inversesqrt (Passed: 13/13 in 4.20 seconds)
runall/conformance/ogles/GL/length (Passed: 13/13 in 4.75 seconds)
runall/conformance/ogles/GL/lessThan (Passed: 17/17 in 5.99 seconds)
runall/conformance/ogles/GL/lessThanEqual (Passed: 17/17 in 5.91 seconds)
runall/conformance/ogles/GL/log (Passed: 26/26 in 10.19 seconds)
runall/conformance/ogles/GL/log2 (Passed: 26/26 in 9.98 seconds)
runall/conformance/ogles/GL/mat (Passed: 98/98 in 28.84 seconds)
runall/conformance/ogles/GL/mat3 (Passed: 13/13 in 3.95 seconds)
runall/conformance/ogles/GL/matrixCompMult (Passed: 9/9 in 3.06 seconds)
runall/conformance/ogles/GL/max (Passed: 13/13 in 5.07 seconds)
runall/conformance/ogles/GL/min (Passed: 13/13 in 4.95 seconds)
runall/conformance/ogles/GL/mix (Passed: 13/13 in 4.89 seconds)
runall/conformance/ogles/GL/mod (Passed: 17/17 in 6.47 seconds)
runall/conformance/ogles/GL/normalize (Passed: 13/13 in 5.39 seconds)
runall/conformance/ogles/GL/not (Passed: 9/9 in 3.53 seconds)
runall/conformance/ogles/GL/notEqual (Passed: 26/26 in 8.59 seconds)
runall/conformance/ogles/GL/operators (Passed: 56/56 in 14.93 seconds)
runall/conformance/ogles/GL/pow (Passed: 51/51 in 18.57 seconds)
runall/conformance/ogles/GL/radians (Passed: 13/13 in 5.52 seconds)
runall/conformance/ogles/GL/reflect (Passed: 13/13 in 5.51 seconds)
runall/conformance/ogles/GL/refract (Passed: 13/13 in 4.66 seconds)
runall/conformance/ogles/GL/sign (Passed: 13/13 in 4.86 seconds)
runall/conformance/ogles/GL/sin (Passed: 13/13 in 5.78 seconds)
runall/conformance/ogles/GL/smoothstep (Passed: 13/13 in 5.02 seconds)
runall/conformance/ogles/GL/sqrt (Passed: 13/13 in 4.81 seconds)
runall/conformance/ogles/GL/step (Passed: 13/13 in 5.09 seconds)
runall/conformance/ogles/GL/struct (Passed: 119/119 in 35.09 seconds)
runall/conformance/ogles/GL/swizzlers (Passed: 255/255 in 72.17 seconds)
runall/conformance/ogles/GL/tan (Passed: 13/13 in 4.55 seconds)
runall/conformance/ogles/GL/vec (Passed: 39/39 in 10.71 seconds)
runall/conformance/ogles/GL/vec3 (Passed: 17/17 in 4.93 seconds)
runall/conformance/offscreencanvas (Passed: 22/22 in 11.11 seconds)
runall/conformance/programs (Passed: 247/247 in 15.65 seconds)
runall/conformance/reading (Passed: 136/136 in 4.49 seconds)
runall/conformance/renderbuffers (Passed: 129/129 in 8.08 seconds)
runall/conformance/rendering (Passed: 905/905 in 74.19 seconds)
runall/conformance/state (Passed: 638/638 in 8.02 seconds)
runall/conformance/textures (Passed: 47149/47175 Failed: 1/47175 Timeout: 25/47175 in 1051.74 seconds)
runall/conformance/textures/misc (Passed: 10915/10919 Failed: 1/10919 Timeout: 3/10919 in 145.50 seconds)
runconformance/textures/misc/tex-sub-image-2d-bad-args.html (Passed: 32/33 Failed: 1/33 in 1003.0 ms)
failed: getError expected: INVALID_OPERATION. Was NO_ERROR : format not same as original
runconformance/textures/misc/tex-video-using-tex-unit-non-zero.html(*timeout*)
runconformance/textures/misc/texture-corner-case-videos.html(*timeout*)
runconformance/textures/misc/texture-upload-size.html(*timeout*)
runall/conformance/textures/canvas (Passed: 1498/1504 Timeout: 6/1504 in 171.22 seconds)
runconformance/textures/canvas/tex-2d-rgba-rgba-unsigned_byte.html(*timeout*)
runconformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html(*timeout*)
runconformance/textures/canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html(*timeout*)
runconformance/textures/canvas/tex-2d-luminance-luminance-unsigned_byte.html(*timeout*)
runconformance/textures/canvas/tex-2d-alpha-alpha-unsigned_byte.html(*timeout*)
runconformance/textures/canvas/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html(*timeout*)
runall/conformance/textures/canvas_sub_rectangle (Passed: 14360/14360 in 72.48 seconds)
runall/conformance/textures/image (Passed: 1360/1360 in 12.36 seconds)
runall/conformance/textures/image_data (Passed: 5392/5392 in 34.15 seconds)
runall/conformance/textures/svg_image (Passed: 464/464 in 7.04 seconds)
runall/conformance/textures/video (Passed: 0/8 Timeout: 8/8 in 287.25 seconds)
runconformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html(*timeout*)
runconformance/textures/video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html(*timeout*)
runconformance/textures/video/tex-2d-rgba-rgba-unsigned_byte.html(*timeout*)
runconformance/textures/video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html(*timeout*)
runconformance/textures/video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html(*timeout*)
runconformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html(*timeout*)
runconformance/textures/video/tex-2d-alpha-alpha-unsigned_byte.html(*timeout*)
runconformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html(*timeout*)
runall/conformance/textures/webgl_canvas (Passed: 2368/2368 in 63.06 seconds)
runall/conformance/textures/image_bitmap_from_image_data (Passed: 1800/1800 in 21.37 seconds)
runall/conformance/textures/image_bitmap_from_image (Passed: 1800/1800 in 17.14 seconds)
runall/conformance/textures/image_bitmap_from_video (Passed: 0/8 Timeout: 8/8 in 160.03 seconds)
runconformance/textures/image_bitmap_from_video/tex-2d-rgb-rgb-unsigned_byte.html(*timeout*)
runconformance/textures/image_bitmap_from_video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html(*timeout*)
runconformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_byte.html(*timeout*)
runconformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html(*timeout*)
runconformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html(*timeout*)
runconformance/textures/image_bitmap_from_video/tex-2d-luminance-luminance-unsigned_byte.html(*timeout*)
runconformance/textures/image_bitmap_from_video/tex-2d-alpha-alpha-unsigned_byte.html(*timeout*)
runconformance/textures/image_bitmap_from_video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html(*timeout*)
runall/conformance/textures/image_bitmap_from_canvas (Passed: 3592/3592 in 26.90 seconds)
runall/conformance/textures/image_bitmap_from_blob (Passed: 1800/1800 in 14.61 seconds)
runall/conformance/textures/image_bitmap_from_image_bitmap (Passed: 1800/1800 in 18.64 seconds)
runall/conformance/typedarrays (Passed: 1414/1414 in 9.33 seconds)
runall/conformance/uniforms (Passed: 909/909 in 253.42 seconds)
runall/conformance/more (Passed: 137/137 in 75.91 seconds)
runall/conformance/more/conformance (Passed: 18/18 in 22.15 seconds)
runall/conformance/more/functions (Passed: 102/102 in 50.94 seconds)
runall/conformance/more/glsl (Passed: 17/17 in 2.82 seconds)
runall/deqp (Passed: 4666/21324 Failed: 16623/21324 Timeout: 35/21324 in 2508.37 seconds)
runall/deqp/data (Passed: 3884/3901 Failed: 17/3901 in 700.37 seconds)
runall/deqp/data/gles3 (Passed: 3884/3901 Failed: 17/3901 in 700.37 seconds)
runall/deqp/data/gles3/shaders (Passed: 3884/3901 Failed: 17/3901 in 700.37 seconds)
rundeqp/data/gles3/shaders/arrays.html (Passed: 108/125 Failed: 17/125 in 21890.0 ms)
failed: arrays.constructor.float3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.constructor.float4_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.constructor.float_vec3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.constructor.float_mat3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.constructor.int_mat3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.constructor.bool_mat3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.return.float_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.return.float_vec3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.unnamed_parameter.float_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.unnamed_parameter.float_vec3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.declaration.implicit_size_float_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.declaration.implicit_size_float_vec3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.declaration.implicit_size_float_mat3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.declaration.implicit_size_int_mat3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.declaration.implicit_size_bool_mat3_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.declaration.dynamic_expression_array_access_fragment: expected shaders to compile and link properly, but failed to compile.
failed: arrays.declaration.multiple_declarations_single_statement_explicit_fragment: expected shaders to compile and link properly, but failed to compile.
runall/deqp/framework (Passed: 10/10 in 4.67 seconds)
runall/deqp/framework/opengl (Passed: 10/10 in 4.67 seconds)
runall/deqp/framework/opengl/simplereference (Passed: 10/10 in 4.67 seconds)
runall/deqp/functional (Passed: 772/17413 Failed: 16606/17413 Timeout: 35/17413 in 1803.33 seconds)
runall/deqp/functional/gles3 (Passed: 772/17413 Failed: 16606/17413 Timeout: 35/17413 in 1803.33 seconds)
runall/deqp/functional/gles3/builtinprecision (Passed: 57/1448 Failed: 1391/1448 in 72.00 seconds)
rundeqp/functional/gles3/builtinprecision/add.html (Passed: 3/26 Failed: 23/26 in 12356.0 ms)
failed: precision.add.lowp_vertex.vec3: Shader compilation failed
failed: precision.add.lowp_vertex.vec3: bindBuffer
failed: precision.add.lowp_vertex.vec4: gl.createProgram()
failed: precision.add.lowp_fragment.scalar: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.lowp_fragment.vec2: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.lowp_fragment.vec3: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.lowp_fragment.vec4: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.mediump_vertex.scalar: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.mediump_vertex.vec2: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.mediump_vertex.vec3: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.mediump_vertex.vec4: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.mediump_fragment.scalar: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.mediump_fragment.vec2: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.mediump_fragment.vec3: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.mediump_fragment.vec4: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.highp_vertex.scalar: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.highp_vertex.vec2: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.highp_vertex.vec3: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.highp_vertex.vec4: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.highp_fragment.scalar: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.highp_fragment.vec2: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.highp_fragment.vec3: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
failed: precision.add.highp_fragment.vec4: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
rundeqp/functional/gles3/builtinprecision/sub.html (Passed: 1/26 Failed: 25/26 in 1456.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.sub.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sub.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/mul.html (Passed: 1/26 Failed: 25/26 in 511.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.mul.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.mul.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/div.html (Passed: 1/26 Failed: 25/26 in 1033.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.div.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.div.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/radians.html (Passed: 1/26 Failed: 25/26 in 1139.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.radians.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.radians.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/degrees.html (Passed: 1/26 Failed: 25/26 in 1636.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.degrees.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.degrees.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/sin.html (Passed: 1/26 Failed: 25/26 in 604.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.sin.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sin.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/cos.html (Passed: 1/26 Failed: 25/26 in 927.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.cos.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cos.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/tan.html (Passed: 1/26 Failed: 25/26 in 1030.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.tan.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tan.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/asin.html (Passed: 1/26 Failed: 25/26 in 1633.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.asin.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asin.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/acos.html (Passed: 1/26 Failed: 25/26 in 969.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.acos.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acos.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/atan.html (Passed: 1/26 Failed: 25/26 in 1197.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.atan.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/atan2.html (Passed: 1/26 Failed: 25/26 in 1547.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.atan2.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atan2.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/sinh.html (Passed: 1/26 Failed: 25/26 in 484.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.sinh.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sinh.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/cosh.html (Passed: 1/26 Failed: 25/26 in 1154.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.cosh.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.cosh.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/tanh.html (Passed: 1/26 Failed: 25/26 in 1623.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.tanh.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.tanh.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/asinh.html (Passed: 1/26 Failed: 25/26 in 613.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.asinh.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.asinh.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/acosh.html (Passed: 1/26 Failed: 25/26 in 1048.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.acosh.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.acosh.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/atanh.html (Passed: 1/26 Failed: 25/26 in 949.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.atanh.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.atanh.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/pow.html (Passed: 1/26 Failed: 25/26 in 1039.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.pow.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.pow.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/exp.html (Passed: 1/26 Failed: 25/26 in 1043.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.exp.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/exp2.html (Passed: 1/26 Failed: 25/26 in 1753.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.exp2.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.exp2.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/log.html (Passed: 1/26 Failed: 25/26 in 509.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.log.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/log2.html (Passed: 1/26 Failed: 25/26 in 1041.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.log2.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.log2.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/sqrt.html (Passed: 1/26 Failed: 25/26 in 1127.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.sqrt.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.sqrt.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/inversesqrt.html (Passed: 1/26 Failed: 25/26 in 935.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.inversesqrt.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.inversesqrt.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/abs.html (Passed: 1/26 Failed: 25/26 in 1137.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.abs.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.lowp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.lowp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.lowp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.lowp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.lowp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.lowp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.mediump_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.mediump_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.mediump_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.mediump_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.mediump_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.mediump_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.mediump_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.mediump_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.highp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.highp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.highp_vertex.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.highp_vertex.vec4: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.highp_fragment.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.highp_fragment.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.highp_fragment.vec3: Cannot read property 'getSupportedExtensions' of null
failed: precision.abs.highp_fragment.vec4: Cannot read property 'getSupportedExtensions' of null
rundeqp/functional/gles3/builtinprecision/sign.html (Passed: 1/26 Failed: 25/26 in 1062.0 ms)
failed: Unable to fetch WebGL rendering context for Canvas
failed: precision.sign.lowp_vertex.scalar: Cannot read property 'getSupportedExtensions' of null
failed: precision.sign.lowp_vertex.vec2: Cannot read property 'getSupportedExtensions' of null
failed: precision.sign.lowp_vertex.vec3: Cannot read property 'getSupported…

 

Link to comment
Share on other sites

yup, as kind of expected from the previous bug, webgl2 on your device seems to not be supported correctly. In our case, the precision part in shader looks like the impactfull one. i will check the best to handle it and at the same time you should open a bug for chrome on android.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...