godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.57k stars 20.42k forks source link

Model disappearing on GLES2 web build (only on Linux/Mesa running Firefox) #33055

Closed jesperkondrup closed 4 years ago

jesperkondrup commented 4 years ago

When we export the project to html5 and run it on linux in Firefox we have a model that disappears. This does not happen in Chrome and it also works as expected on Windows using Firefox, Chrome or Edge

So it's only Linux + Firefox that seems to be the problem. We have tried building to web using the 3.1.1 stable and the newest 3.2 Alpha 3 build.

SphereDisappearLinuxWebIssue

Project files (15 mb): MissingSphereIssue.zip

akien-mga commented 4 years ago

Confirmed on Mageia 7 x86_64 running Mesa 19.2.1 on Intel HD 630.

The debugger shows:

The script from “http://localhost:8060/tmp_js_export.js” was loaded even though its MIME type (“”) is not a valid JavaScript MIME type. tmp_js_export.html
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. tmp_js_export.js:7:17440
Error: WebGL warning: framebufferRenderbuffer: bindRenderbuffer must be called before attachment. 2 tmp_js_export.js:7:267592
Error: WebGL warning: compressedTexImage2D: Bad `internalFormat`: <enum 0x8dbd> tmp_js_export.js:7:262574
Error: WebGL warning: compressedTexImage2D: For level > 0, width and height must be powers of two. 7 tmp_js_export.js:7:262574
Error: WebGL warning: compressedTexImage2D: Bad `internalFormat`: <enum 0x8dbd> 2 tmp_js_export.js:7:262574
Error: WebGL warning: generateMipmap: Tex image TEXTURE_CUBE_MAP_POSITIVE_X level 0 is incurring lazy initialization. tmp_js_export.js:7:268559
Error: WebGL warning: generateMipmap: Tex image TEXTURE_CUBE_MAP_NEGATIVE_X level 0 is incurring lazy initialization. tmp_js_export.js:7:268559
Error: WebGL warning: generateMipmap: Tex image TEXTURE_CUBE_MAP_POSITIVE_Y level 0 is incurring lazy initialization. tmp_js_export.js:7:268559
Error: WebGL warning: generateMipmap: Tex image TEXTURE_CUBE_MAP_NEGATIVE_Y level 0 is incurring lazy initialization. tmp_js_export.js:7:268559
Error: WebGL warning: generateMipmap: Tex image TEXTURE_CUBE_MAP_POSITIVE_Z level 0 is incurring lazy initialization. tmp_js_export.js:7:268559
Error: WebGL warning: generateMipmap: Tex image TEXTURE_CUBE_MAP_NEGATIVE_Z level 0 is incurring lazy initialization. tmp_js_export.js:7:268559
Error: WebGL warning: linkProgram: Programs with more than 16 samplers are disallowed on Mesa drivers to avoid crashing. tmp_js_export.js:7:273482
1061: tmp_js_export.js:7:39416
1062:       vec3 R = normalize(-reflect(L, N)); tmp_js_export.js:7:39416
1063:       float cRdotV = max(0.0, dot(R, V)); tmp_js_export.js:7:39416
1064:       float shininess = exp2(15.0 * (1.0 - roughness) + 1.0) * 0.25; tmp_js_export.js:7:39416
1065:       float phong = pow(cRdotV, shininess); tmp_js_export.js:7:39416
1066:       phong *= (shininess + 8.0) * (1.0 / (8.0 * M_PI)); tmp_js_export.js:7:39416
1067:       specular_brdf_NL = (phong) / max(4.0 * cNdotV * cNdotL, 0.75); tmp_js_export.js:7:39416
1068: tmp_js_export.js:7:39416
1069: #elif defined(SPECULAR_TOON) tmp_js_export.js:7:39416
1070: tmp_js_export.js:7:39416
1071:       vec3 R = normalize(-reflect(L, N)); tmp_js_export.js:7:39416
1072:       float RdotV = dot(R, V); tmp_js_export.js:7:39416
1073:       float mid = 1.0 - roughness; tmp_js_export.js:7:39416
1074:       mid *= mid; tmp_js_export.js:7:39416
1075:       specular_brdf_NL = smoothstep(mid - roughness * 0.5, mid + roughness * 0.5, RdotV) * mid; tmp_js_export.js:7:39416
1076: tmp_js_export.js:7:39416
1077: #elif defined(SPECULAR_DISABLED) tmp_js_export.js:7:39416
1078:       // none.. tmp_js_export.js:7:39416
1079: #elif defined(SPECULAR_SCHLICK_GGX) tmp_js_export.js:7:39416
1080:       // shlick+ggx as default tmp_js_export.js:7:39416
1081: tmp_js_export.js:7:39416
1082: #if defined(LIGHT_USE_ANISOTROPY) tmp_js_export.js:7:39416
1083:       float alpha_ggx = roughness * roughness; tmp_js_export.js:7:39416
1084:       float aspect = sqrt(1.0 - anisotropy * 0.9); tmp_js_export.js:7:39416
1085:       float ax = alpha_ggx / aspect; tmp_js_export.js:7:39416
1086:       float ay = alpha_ggx * aspect; tmp_js_export.js:7:39416
1087:       float XdotH = dot(T, H); tmp_js_export.js:7:39416
1088:       float YdotH = dot(B, H); tmp_js_export.js:7:39416
1089:       float D = D_GGX_anisotropic(cNdotH, ax, ay, XdotH, YdotH, cNdotH); tmp_js_export.js:7:39416
1090:       //float G = G_GGX_anisotropic_2cos(cNdotL, ax, ay, XdotH, YdotH) * G_GGX_anisotropic_2cos(cNdotV, ax, ay, XdotH, YdotH); tmp_js_export.js:7:39416
1091:       float G = V_GGX_anisotropic(ax, ay, dot(T, V), dot(T, L), dot(B, V), dot(B, L), cNdotV, cNdotL); tmp_js_export.js:7:39416
1092: tmp_js_export.js:7:39416
1093: #else tmp_js_export.js:7:39416
1094:       float alpha_ggx = roughness * roughness; tmp_js_export.js:7:39416
1095:       float D = D_GGX(cNdotH, alpha_ggx); tmp_js_export.js:7:39416
1096:       //float G = G_GGX_2cos(cNdotL, alpha_ggx) * G_GGX_2cos(cNdotV, alpha_ggx); tmp_js_export.js:7:39416
1097:       float G = V_GGX(cNdotL, cNdotV, alpha_ggx); tmp_js_export.js:7:39416
1098: #endif tmp_js_export.js:7:39416
1099:       // F tmp_js_export.js:7:39416
1100:       vec3 f0 = F0(metallic, specular, diffuse_color); tmp_js_export.js:7:39416
1101:       float cLdotH5 = SchlickFresnel(cLdotH); tmp_js_export.js:7:39416
1102:       vec3 F = mix(vec3(cLdotH5), vec3(1.0), f0); tmp_js_export.js:7:39416
1103: tmp_js_export.js:7:39416
1104:       specular_brdf_NL = cNdotL * D * F * G; tmp_js_export.js:7:39416
1105: tmp_js_export.js:7:39416
1106: #endif tmp_js_export.js:7:39416
1107: tmp_js_export.js:7:39416
1108:       SRGB_APPROX(specular_brdf_NL) tmp_js_export.js:7:39416
1109:       specular_light += specular_brdf_NL * light_color * specular_blob_intensity * attenuation; tmp_js_export.js:7:39416
1110: tmp_js_export.js:7:39416
1111: #if defined(LIGHT_USE_CLEARCOAT) tmp_js_export.js:7:39416
1112: tmp_js_export.js:7:39416
1113: #if !defined(SPECULAR_SCHLICK_GGX) tmp_js_export.js:7:39416
1114:       float cLdotH5 = SchlickFresnel(cLdotH); tmp_js_export.js:7:39416
1115: #endif tmp_js_export.js:7:39416
1116:       float Dr = GTR1(cNdotH, mix(.1, .001, clearcoat_gloss)); tmp_js_export.js:7:39416
1117:       float Fr = mix(.04, 1.0, cLdotH5); tmp_js_export.js:7:39416
1118:       //float Gr = G_GGX_2cos(cNdotL, .25) * G_GGX_2cos(cNdotV, .25); tmp_js_export.js:7:39416
1119:       float Gr = V_GGX(cNdotL, cNdotV, 0.25); tmp_js_export.js:7:39416
1120: tmp_js_export.js:7:39416
1121:       float clearcoat_specular_brdf_NL = 0.25 * clearcoat * Gr * Fr * Dr * cNdotL; tmp_js_export.js:7:39416
1122: tmp_js_export.js:7:39416
1123:       specular_light += clearcoat_specular_brdf_NL * light_color * specular_blob_intensity * attenuation; tmp_js_export.js:7:39416
1124: #endif tmp_js_export.js:7:39416
1125:   } tmp_js_export.js:7:39416
1126: tmp_js_export.js:7:39416
1127: #ifdef USE_SHADOW_TO_OPACITY tmp_js_export.js:7:39416
1128:   alpha = min(alpha, clamp(1.0 - length(attenuation), 0.0, 1.0)); tmp_js_export.js:7:39416
1129: #endif tmp_js_export.js:7:39416
1130: tmp_js_export.js:7:39416
1131: #endif //defined(USE_LIGHT_SHADER_CODE) tmp_js_export.js:7:39416
1132: } tmp_js_export.js:7:39416
1133: tmp_js_export.js:7:39416
1134: #endif tmp_js_export.js:7:39416
1135: // shadows tmp_js_export.js:7:39416
1136: tmp_js_export.js:7:39416
1137: #ifdef USE_SHADOW tmp_js_export.js:7:39416
1138: tmp_js_export.js:7:39416
1139: #ifdef USE_RGBA_SHADOWS tmp_js_export.js:7:39416
1140: tmp_js_export.js:7:39416
1141: #define SHADOW_DEPTH(m_val) dot(m_val, vec4(1.0 / (255.0 * 255.0 * 255.0), 1.0 / (255.0 * 255.0), 1.0 / 255.0, 1.0)) tmp_js_export.js:7:39416
1142: tmp_js_export.js:7:39416
1143: #else tmp_js_export.js:7:39416
1144: tmp_js_export.js:7:39416
1145: #define SHADOW_DEPTH(m_val) (m_val).r tmp_js_export.js:7:39416
1146: tmp_js_export.js:7:39416
1147: #endif tmp_js_export.js:7:39416
1148: tmp_js_export.js:7:39416
1149: #define SAMPLE_SHADOW_TEXEL(p_shadow, p_pos, p_depth) step(p_depth, SHADOW_DEPTH(texture2D(p_shadow, p_pos))) tmp_js_export.js:7:39416
1150: #define SAMPLE_SHADOW_TEXEL_PROJ(p_shadow, p_pos) step(p_pos.z, SHADOW_DEPTH(texture2DProj(p_shadow, p_pos))) tmp_js_export.js:7:39416
1151: tmp_js_export.js:7:39416
1152: float sample_shadow(highp sampler2D shadow, highp vec4 spos) { tmp_js_export.js:7:39416
1153: tmp_js_export.js:7:39416
1154: #ifdef SHADOW_MODE_PCF_13 tmp_js_export.js:7:39416
1155: tmp_js_export.js:7:39416
1156:   spos.xyz /= spos.w; tmp_js_export.js:7:39416
1157:   vec2 pos = spos.xy; tmp_js_export.js:7:39416
1158:   float depth = spos.z; tmp_js_export.js:7:39416
1159: tmp_js_export.js:7:39416
1160:   float avg = SAMPLE_SHADOW_TEXEL(shadow, pos, depth); tmp_js_export.js:7:39416
1161:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x, 0.0), depth); tmp_js_export.js:7:39416
1162:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x, 0.0), depth); tmp_js_export.js:7:39416
1163:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, shadow_pixel_size.y), depth); tmp_js_export.js:7:39416
1164:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, -shadow_pixel_size.y), depth); tmp_js_export.js:7:39416
1165:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x, shadow_pixel_size.y), depth); tmp_js_export.js:7:39416
1166:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x, shadow_pixel_size.y), depth); tmp_js_export.js:7:39416
1167:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x, -shadow_pixel_size.y), depth); tmp_js_export.js:7:39416
1168:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x, -shadow_pixel_size.y), depth); tmp_js_export.js:7:39416
1169:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x * 2.0, 0.0), depth); tmp_js_export.js:7:39416
1170:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x * 2.0, 0.0), depth); tmp_js_export.js:7:39416
1171:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, shadow_pixel_size.y * 2.0), depth); tmp_js_export.js:7:39416
1172:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, -shadow_pixel_size.y * 2.0), depth); tmp_js_export.js:7:39416
1173:   return avg * (1.0 / 13.0); tmp_js_export.js:7:39416
1174: #endif tmp_js_export.js:7:39416
1175: tmp_js_export.js:7:39416
1176: #ifdef SHADOW_MODE_PCF_5 tmp_js_export.js:7:39416
1177: tmp_js_export.js:7:39416
1178:   spos.xyz /= spos.w; tmp_js_export.js:7:39416
1179:   vec2 pos = spos.xy; tmp_js_export.js:7:39416
1180:   float depth = spos.z; tmp_js_export.js:7:39416
1181: tmp_js_export.js:7:39416
1182:   float avg = SAMPLE_SHADOW_TEXEL(shadow, pos, depth); tmp_js_export.js:7:39416
1183:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(shadow_pixel_size.x, 0.0), depth); tmp_js_export.js:7:39416
1184:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(-shadow_pixel_size.x, 0.0), depth); tmp_js_export.js:7:39416
1185:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, shadow_pixel_size.y), depth); tmp_js_export.js:7:39416
1186:   avg += SAMPLE_SHADOW_TEXEL(shadow, pos + vec2(0.0, -shadow_pixel_size.y), depth); tmp_js_export.js:7:39416
1187:   return avg * (1.0 / 5.0); tmp_js_export.js:7:39416
1188: tmp_js_export.js:7:39416
1189: #endif tmp_js_export.js:7:39416
1190: tmp_js_export.js:7:39416
1191: #if !defined(SHADOW_MODE_PCF_5) || !defined(SHADOW_MODE_PCF_13) tmp_js_export.js:7:39416
1192: tmp_js_export.js:7:39416
1193:   return SAMPLE_SHADOW_TEXEL_PROJ(shadow, spos); tmp_js_export.js:7:39416
1194: #endif tmp_js_export.js:7:39416
1195: } tmp_js_export.js:7:39416
1196: tmp_js_export.js:7:39416
1197: #endif tmp_js_export.js:7:39416
1198: tmp_js_export.js:7:39416
1199: #if defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED) tmp_js_export.js:7:39416
1200: tmp_js_export.js:7:39416
1201: #if defined(USE_VERTEX_LIGHTING) tmp_js_export.js:7:39416
1202: tmp_js_export.js:7:39416
1203: varying vec4 fog_interp; tmp_js_export.js:7:39416
1204: tmp_js_export.js:7:39416
1205: #else tmp_js_export.js:7:39416
1206: uniform mediump vec4 fog_color_base; tmp_js_export.js:7:39416
1207: #ifdef LIGHT_MODE_DIRECTIONAL tmp_js_export.js:7:39416
1208: uniform mediump vec4 fog_sun_color_amount; tmp_js_export.js:7:39416
1209: #endif tmp_js_export.js:7:39416
1210: tmp_js_export.js:7:39416
1211: uniform bool fog_transmit_enabled; tmp_js_export.js:7:39416
1212: uniform mediump float fog_transmit_curve; tmp_js_export.js:7:39416
1213: tmp_js_export.js:7:39416
1214: #ifdef FOG_DEPTH_ENABLED tmp_js_export.js:7:39416
1215: uniform highp float fog_depth_begin; tmp_js_export.js:7:39416
1216: uniform mediump float fog_depth_curve; tmp_js_export.js:7:39416
1217: uniform mediump float fog_max_distance; tmp_js_export.js:7:39416
1218: #endif tmp_js_export.js:7:39416
1219: tmp_js_export.js:7:39416
1220: #ifdef FOG_HEIGHT_ENABLED tmp_js_export.js:7:39416
1221: uniform highp float fog_height_min; tmp_js_export.js:7:39416
1222: uniform highp float fog_height_max; tmp_js_export.js:7:39416
1223: uniform mediump float fog_height_curve; tmp_js_export.js:7:39416
1224: #endif tmp_js_export.js:7:39416
1225: tmp_js_export.js:7:39416
1226: #endif //vertex lit tmp_js_export.js:7:39416
1227: #endif //fog tmp_js_export.js:7:39416
1228: tmp_js_export.js:7:39416
1229: void main() { tmp_js_export.js:7:39416
1230: tmp_js_export.js:7:39416
1231: #ifdef RENDER_DEPTH_DUAL_PARABOLOID tmp_js_export.js:7:39416
1232: tmp_js_export.js:7:39416
1233:   if (dp_clip > 0.0) tmp_js_export.js:7:39416
1234:       discard; tmp_js_export.js:7:39416
1235: #endif tmp_js_export.js:7:39416
1236:   highp vec3 vertex = vertex_interp; tmp_js_export.js:7:39416
1237:   vec3 view = -normalize(vertex_interp); tmp_js_export.js:7:39416
1238:   vec3 albedo = vec3(1.0); tmp_js_export.js:7:39416
1239:   vec3 transmission = vec3(0.0); tmp_js_export.js:7:39416
1240:   float metallic = 0.0; tmp_js_export.js:7:39416
1241:   float specular = 0.5; tmp_js_export.js:7:39416
1242:   vec3 emission = vec3(0.0); tmp_js_export.js:7:39416
1243:   float roughness = 1.0; tmp_js_export.js:7:39416
1244:   float rim = 0.0; tmp_js_export.js:7:39416
1245:   float rim_tint = 0.0; tmp_js_export.js:7:39416
1246:   float clearcoat = 0.0; tmp_js_export.js:7:39416
1247:   float clearcoat_gloss = 0.0; tmp_js_export.js:7:39416
1248:   float anisotropy = 0.0; tmp_js_export.js:7:39416
1249:   vec2 anisotropy_flow = vec2(1.0, 0.0); tmp_js_export.js:7:39416
1250:   float sss_strength = 0.0; //unused tmp_js_export.js:7:39416
1251:   // gl_FragDepth is not available in GLES2, so writing to DEPTH is not converted to gl_FragDepth by Godot compiler resulting in a tmp_js_export.js:7:39416
1252:   // compile error because DEPTH is not a variable. tmp_js_export.js:7:39416
1253:   float m_DEPTH = 0.0; tmp_js_export.js:7:39416
1254: tmp_js_export.js:7:39416
1255:   float alpha = 1.0; tmp_js_export.js:7:39416
1256:   float side = 1.0; tmp_js_export.js:7:39416
1257: tmp_js_export.js:7:39416
1258:   float specular_blob_intensity = 1.0; tmp_js_export.js:7:39416
1259: #if defined(SPECULAR_TOON) tmp_js_export.js:7:39416
1260:   specular_blob_intensity *= specular * 2.0; tmp_js_export.js:7:39416
1261: #endif tmp_js_export.js:7:39416
1262: tmp_js_export.js:7:39416
1263: #if defined(ENABLE_AO) tmp_js_export.js:7:39416
1264:   float ao = 1.0; tmp_js_export.js:7:39416
1265:   float ao_light_affect = 0.0; tmp_js_export.js:7:39416
1266: #endif tmp_js_export.js:7:39416
1267: tmp_js_export.js:7:39416
1268: #if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) tmp_js_export.js:7:39416
1269:   vec3 binormal = normalize(binormal_interp) * side; tmp_js_export.js:7:39416
1270:   vec3 tangent = normalize(tangent_interp) * side; tmp_js_export.js:7:39416
1271: #else tmp_js_export.js:7:39416
1272:   vec3 binormal = vec3(0.0); tmp_js_export.js:7:39416
1273:   vec3 tangent = vec3(0.0); tmp_js_export.js:7:39416
1274: #endif tmp_js_export.js:7:39416
1275:   vec3 normal = normalize(normal_interp) * side; tmp_js_export.js:7:39416
1276: tmp_js_export.js:7:39416
1277: #if defined(ENABLE_NORMALMAP) tmp_js_export.js:7:39416
1278:   vec3 normalmap = vec3(0.5); tmp_js_export.js:7:39416
1279: #endif tmp_js_export.js:7:39416
1280:   float normaldepth = 1.0; tmp_js_export.js:7:39416
1281: tmp_js_export.js:7:39416
1282: #if defined(ALPHA_SCISSOR_USED) tmp_js_export.js:7:39416
1283:   float alpha_scissor = 0.5; tmp_js_export.js:7:39416
1284: #endif tmp_js_export.js:7:39416
1285: tmp_js_export.js:7:39416
1286: #if defined(SCREEN_UV_USED) tmp_js_export.js:7:39416
1287:   vec2 screen_uv = gl_FragCoord.xy * screen_pixel_size; tmp_js_export.js:7:39416
1288: #endif tmp_js_export.js:7:39416
1289: tmp_js_export.js:7:39416
1290:   { tmp_js_export.js:7:39416
1291:       /* clang-format off */ tmp_js_export.js:7:39416
1292: { tmp_js_export.js:7:39416
1293:   vec2 m_base_uv = uv_interp; tmp_js_export.js:7:39416
1294:   vec4 m_albedo_tex = texture2D(m_texture_albedo, m_base_uv); tmp_js_export.js:7:39416
1295:   albedo = (m_albedo.rgb * m_albedo_tex.rgb); tmp_js_export.js:7:39416
1296:   float m_metallic_tex = dot(texture2D(m_texture_metallic, m_base_uv), m_metallic_texture_channel); tmp_js_export.js:7:39416
1297:   metallic = (m_metallic_tex * m_metallic); tmp_js_export.js:7:39416
1298:   float m_roughness_tex = dot(texture2D(m_texture_roughness, m_base_uv), m_roughness_texture_channel); tmp_js_export.js:7:39416
1299:   roughness = (m_roughness_tex * m_roughness); tmp_js_export.js:7:39416
1300:   specular = m_specular; tmp_js_export.js:7:39416
1301:   normalmap = texture2D(m_texture_normal, m_base_uv).rgb; tmp_js_export.js:7:39416
1302:   normaldepth = m_normal_scale; tmp_js_export.js:7:39416
1303:   vec3 m_transmission_tex = texture2D(m_texture_transmission, m_base_uv).rgb; tmp_js_export.js:7:39416
1304:   transmission = (m_transmission.rgb + m_transmission_tex); tmp_js_export.js:7:39416
1305:   vec4 m_detail_tex = texture2D(m_texture_detail_albedo, m_base_uv); tmp_js_export.js:7:39416
1306:   vec4 m_detail_norm_tex = texture2D(m_texture_detail_normal, m_base_uv); tmp_js_export.js:7:39416
1307:   vec4 m_detail_mask_tex = texture2D(m_texture_detail_mask, m_base_uv); tmp_js_export.js:7:39416
1308:   vec3 m_detail = mix(albedo.rgb, (albedo.rgb * m_detail_tex.rgb), m_detail_tex.a); tmp_js_export.js:7:39416
1309:   vec3 m_detail_norm = mix(normalmap, m_detail_norm_tex.rgb, m_detail_tex.a); tmp_js_export.js:7:39416
1310:   normalmap = mix(normalmap, m_detail_norm, m_detail_mask_tex.r); tmp_js_export.js:7:39416
1311:   albedo.rgb = mix(albedo.rgb, m_detail, m_detail_mask_tex.r); tmp_js_export.js:7:39416
1312: } tmp_js_export.js:7:39416
1313: tmp_js_export.js:7:39416
1314: tmp_js_export.js:7:39416
1315:       /* clang-format on */ tmp_js_export.js:7:39416
1316:   } tmp_js_export.js:7:39416
1317: tmp_js_export.js:7:39416
1318: #if defined(ENABLE_NORMALMAP) tmp_js_export.js:7:39416
1319:   normalmap.xy = normalmap.xy * 2.0 - 1.0; tmp_js_export.js:7:39416
1320:   normalmap.z = sqrt(max(0.0, 1.0 - dot(normalmap.xy, normalmap.xy))); tmp_js_export.js:7:39416
1321: tmp_js_export.js:7:39416
1322:   normal = normalize(mix(normal_interp, tangent * normalmap.x + binormal * normalmap.y + normal * normalmap.z, normaldepth)) * side; tmp_js_export.js:7:39416
1323:   //normal = normalmap; tmp_js_export.js:7:39416
1324: #endif tmp_js_export.js:7:39416
1325: tmp_js_export.js:7:39416
1326:   normal = normalize(normal); tmp_js_export.js:7:39416
1327: tmp_js_export.js:7:39416
1328:   vec3 N = normal; tmp_js_export.js:7:39416
1329: tmp_js_export.js:7:39416
1330:   vec3 specular_light = vec3(0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1331:   vec3 diffuse_light = vec3(0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1332:   vec3 ambient_light = vec3(0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1333: tmp_js_export.js:7:39416
1334:   vec3 eye_position = view; tmp_js_export.js:7:39416
1335: tmp_js_export.js:7:39416
1336: #if !defined(USE_SHADOW_TO_OPACITY) tmp_js_export.js:7:39416
1337: tmp_js_export.js:7:39416
1338: #if defined(ALPHA_SCISSOR_USED) tmp_js_export.js:7:39416
1339:   if (alpha < alpha_scissor) { tmp_js_export.js:7:39416
1340:       discard; tmp_js_export.js:7:39416
1341:   } tmp_js_export.js:7:39416
1342: #endif // ALPHA_SCISSOR_USED tmp_js_export.js:7:39416
1343: tmp_js_export.js:7:39416
1344: #ifdef USE_DEPTH_PREPASS tmp_js_export.js:7:39416
1345:   if (alpha < 0.1) { tmp_js_export.js:7:39416
1346:       discard; tmp_js_export.js:7:39416
1347:   } tmp_js_export.js:7:39416
1348: #endif // USE_DEPTH_PREPASS tmp_js_export.js:7:39416
1349: tmp_js_export.js:7:39416
1350: #endif // !USE_SHADOW_TO_OPACITY tmp_js_export.js:7:39416
1351: tmp_js_export.js:7:39416
1352: #ifdef BASE_PASS tmp_js_export.js:7:39416
1353:   //none tmp_js_export.js:7:39416
1354: tmp_js_export.js:7:39416
1355: #ifdef AMBIENT_LIGHT_DISABLED tmp_js_export.js:7:39416
1356:   ambient_light = vec3(0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1357: #else tmp_js_export.js:7:39416
1358: tmp_js_export.js:7:39416
1359: #ifdef USE_RADIANCE_MAP tmp_js_export.js:7:39416
1360: tmp_js_export.js:7:39416
1361:   vec3 ref_vec = reflect(-eye_position, N); tmp_js_export.js:7:39416
1362:   ref_vec = normalize((radiance_inverse_xform * vec4(ref_vec, 0.0)).xyz); tmp_js_export.js:7:39416
1363: tmp_js_export.js:7:39416
1364:   ref_vec.z *= -1.0; tmp_js_export.js:7:39416
1365: tmp_js_export.js:7:39416
1366:   specular_light = textureCubeLod(radiance_map, ref_vec, roughness * RADIANCE_MAX_LOD).xyz * bg_energy; tmp_js_export.js:7:39416
1367:   { tmp_js_export.js:7:39416
1368:       vec3 ambient_dir = normalize((radiance_inverse_xform * vec4(normal, 0.0)).xyz); tmp_js_export.js:7:39416
1369:       vec3 env_ambient = textureCubeLod(radiance_map, ambient_dir, RADIANCE_MAX_LOD).xyz * bg_energy; tmp_js_export.js:7:39416
1370: tmp_js_export.js:7:39416
1371:       ambient_light = mix(ambient_color.rgb, env_ambient, ambient_sky_contribution); tmp_js_export.js:7:39416
1372:   } tmp_js_export.js:7:39416
1373: tmp_js_export.js:7:39416
1374: #else tmp_js_export.js:7:39416
1375: tmp_js_export.js:7:39416
1376:   ambient_light = ambient_color.rgb; tmp_js_export.js:7:39416
1377:   specular_light = bg_color.rgb * bg_energy; tmp_js_export.js:7:39416
1378: tmp_js_export.js:7:39416
1379: #endif tmp_js_export.js:7:39416
1380: tmp_js_export.js:7:39416
1381: #endif // AMBIENT_LIGHT_DISABLED tmp_js_export.js:7:39416
1382:   ambient_light *= ambient_energy; tmp_js_export.js:7:39416
1383: tmp_js_export.js:7:39416
1384: #if defined(USE_REFLECTION_PROBE1) || defined(USE_REFLECTION_PROBE2) tmp_js_export.js:7:39416
1385: tmp_js_export.js:7:39416
1386:   vec4 ambient_accum = vec4(0.0); tmp_js_export.js:7:39416
1387:   vec4 reflection_accum = vec4(0.0); tmp_js_export.js:7:39416
1388: tmp_js_export.js:7:39416
1389: #ifdef USE_REFLECTION_PROBE1 tmp_js_export.js:7:39416
1390: tmp_js_export.js:7:39416
1391:   reflection_process(reflection_probe1, tmp_js_export.js:7:39416
1392: #ifdef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1393:           refprobe1_reflection_normal_blend.rgb, tmp_js_export.js:7:39416
1394: #ifndef USE_LIGHTMAP tmp_js_export.js:7:39416
1395:           refprobe1_ambient_normal, tmp_js_export.js:7:39416
1396: #endif tmp_js_export.js:7:39416
1397:           refprobe1_reflection_normal_blend.a, tmp_js_export.js:7:39416
1398: #else tmp_js_export.js:7:39416
1399:           normal_interp, vertex_interp, refprobe1_local_matrix, tmp_js_export.js:7:39416
1400:           refprobe1_use_box_project, refprobe1_box_extents, refprobe1_box_offset, tmp_js_export.js:7:39416
1401: #endif tmp_js_export.js:7:39416
1402:           refprobe1_exterior, refprobe1_intensity, refprobe1_ambient, roughness, tmp_js_export.js:7:39416
1403:           ambient_light, specular_light, reflection_accum, ambient_accum); tmp_js_export.js:7:39416
1404: tmp_js_export.js:7:39416
1405: #endif // USE_REFLECTION_PROBE1 tmp_js_export.js:7:39416
1406: tmp_js_export.js:7:39416
1407: #ifdef USE_REFLECTION_PROBE2 tmp_js_export.js:7:39416
1408: tmp_js_export.js:7:39416
1409:   reflection_process(reflection_probe2, tmp_js_export.js:7:39416
1410: #ifdef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1411:           refprobe2_reflection_normal_blend.rgb, tmp_js_export.js:7:39416
1412: #ifndef USE_LIGHTMAP tmp_js_export.js:7:39416
1413:           refprobe2_ambient_normal, tmp_js_export.js:7:39416
1414: #endif tmp_js_export.js:7:39416
1415:           refprobe2_reflection_normal_blend.a, tmp_js_export.js:7:39416
1416: #else tmp_js_export.js:7:39416
1417:           normal_interp, vertex_interp, refprobe2_local_matrix, tmp_js_export.js:7:39416
1418:           refprobe2_use_box_project, refprobe2_box_extents, refprobe2_box_offset, tmp_js_export.js:7:39416
1419: #endif tmp_js_export.js:7:39416
1420:           refprobe2_exterior, refprobe2_intensity, refprobe2_ambient, roughness, tmp_js_export.js:7:39416
1421:           ambient_light, specular_light, reflection_accum, ambient_accum); tmp_js_export.js:7:39416
1422: tmp_js_export.js:7:39416
1423: #endif // USE_REFLECTION_PROBE2 tmp_js_export.js:7:39416
1424: tmp_js_export.js:7:39416
1425:   if (reflection_accum.a > 0.0) { tmp_js_export.js:7:39416
1426:       specular_light = reflection_accum.rgb / reflection_accum.a; tmp_js_export.js:7:39416
1427:   } tmp_js_export.js:7:39416
1428: tmp_js_export.js:7:39416
1429: #ifndef USE_LIGHTMAP tmp_js_export.js:7:39416
1430:   if (ambient_accum.a > 0.0) { tmp_js_export.js:7:39416
1431:       ambient_light = ambient_accum.rgb / ambient_accum.a; tmp_js_export.js:7:39416
1432:   } tmp_js_export.js:7:39416
1433: #endif tmp_js_export.js:7:39416
1434: tmp_js_export.js:7:39416
1435: #endif // defined(USE_REFLECTION_PROBE1) || defined(USE_REFLECTION_PROBE2) tmp_js_export.js:7:39416
1436: tmp_js_export.js:7:39416
1437:   // environment BRDF approximation tmp_js_export.js:7:39416
1438: tmp_js_export.js:7:39416
1439:   { tmp_js_export.js:7:39416
1440: tmp_js_export.js:7:39416
1441: #if defined(DIFFUSE_TOON) tmp_js_export.js:7:39416
1442:       //simplify for toon, as tmp_js_export.js:7:39416
1443:       specular_light *= specular * metallic * albedo * 2.0; tmp_js_export.js:7:39416
1444: #else tmp_js_export.js:7:39416
1445: tmp_js_export.js:7:39416
1446:       // scales the specular reflections, needs to be be computed before lighting happens, tmp_js_export.js:7:39416
1447:       // but after environment and reflection probes are added tmp_js_export.js:7:39416
1448:       //TODO: this curve is not really designed for gammaspace, should be adjusted tmp_js_export.js:7:39416
1449:       const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022); tmp_js_export.js:7:39416
1450:       const vec4 c1 = vec4(1.0, 0.0425, 1.04, -0.04); tmp_js_export.js:7:39416
1451:       vec4 r = roughness * c0 + c1; tmp_js_export.js:7:39416
1452:       float ndotv = clamp(dot(normal, eye_position), 0.0, 1.0); tmp_js_export.js:7:39416
1453:       float a004 = min(r.x * r.x, exp2(-9.28 * ndotv)) * r.x + r.y; tmp_js_export.js:7:39416
1454:       vec2 env = vec2(-1.04, 1.04) * a004 + r.zw; tmp_js_export.js:7:39416
1455: tmp_js_export.js:7:39416
1456:       vec3 f0 = F0(metallic, specular, albedo); tmp_js_export.js:7:39416
1457:       specular_light *= env.x * f0 + env.y; tmp_js_export.js:7:39416
1458: tmp_js_export.js:7:39416
1459: #endif tmp_js_export.js:7:39416
1460:   } tmp_js_export.js:7:39416
1461: tmp_js_export.js:7:39416
1462: #ifdef USE_LIGHTMAP tmp_js_export.js:7:39416
1463:   //ambient light will come entirely from lightmap is lightmap is used tmp_js_export.js:7:39416
1464:   ambient_light = texture2D(lightmap, uv2_interp).rgb * lightmap_energy; tmp_js_export.js:7:39416
1465: #endif tmp_js_export.js:7:39416
1466: tmp_js_export.js:7:39416
1467: #ifdef USE_LIGHTMAP_CAPTURE tmp_js_export.js:7:39416
1468:   { tmp_js_export.js:7:39416
1469:       vec3 cone_dirs[12] = vec3[]( tmp_js_export.js:7:39416
1470:               vec3(0.0, 0.0, 1.0), tmp_js_export.js:7:39416
1471:               vec3(0.866025, 0.0, 0.5), tmp_js_export.js:7:39416
1472:               vec3(0.267617, 0.823639, 0.5), tmp_js_export.js:7:39416
1473:               vec3(-0.700629, 0.509037, 0.5), tmp_js_export.js:7:39416
1474:               vec3(-0.700629, -0.509037, 0.5), tmp_js_export.js:7:39416
1475:               vec3(0.267617, -0.823639, 0.5), tmp_js_export.js:7:39416
1476:               vec3(0.0, 0.0, -1.0), tmp_js_export.js:7:39416
1477:               vec3(0.866025, 0.0, -0.5), tmp_js_export.js:7:39416
1478:               vec3(0.267617, 0.823639, -0.5), tmp_js_export.js:7:39416
1479:               vec3(-0.700629, 0.509037, -0.5), tmp_js_export.js:7:39416
1480:               vec3(-0.700629, -0.509037, -0.5), tmp_js_export.js:7:39416
1481:               vec3(0.267617, -0.823639, -0.5)); tmp_js_export.js:7:39416
1482: tmp_js_export.js:7:39416
1483:       vec3 local_normal = normalize(camera_matrix * vec4(normal, 0.0)).xyz; tmp_js_export.js:7:39416
1484:       vec4 captured = vec4(0.0); tmp_js_export.js:7:39416
1485:       float sum = 0.0; tmp_js_export.js:7:39416
1486:       for (int i = 0; i < 12; i++) { tmp_js_export.js:7:39416
1487:           float amount = max(0.0, dot(local_normal, cone_dirs[i])); //not correct, but creates a nice wrap around effect tmp_js_export.js:7:39416
1488:           captured += lightmap_captures[i] * amount; tmp_js_export.js:7:39416
1489:           sum += amount; tmp_js_export.js:7:39416
1490:       } tmp_js_export.js:7:39416
1491: tmp_js_export.js:7:39416
1492:       captured /= sum; tmp_js_export.js:7:39416
1493: tmp_js_export.js:7:39416
1494:       if (lightmap_capture_sky) { tmp_js_export.js:7:39416
1495:           ambient_light = mix(ambient_light, captured.rgb, captured.a); tmp_js_export.js:7:39416
1496:       } else { tmp_js_export.js:7:39416
1497:           ambient_light = captured.rgb; tmp_js_export.js:7:39416
1498:       } tmp_js_export.js:7:39416
1499:   } tmp_js_export.js:7:39416
1500: #endif tmp_js_export.js:7:39416
1501: tmp_js_export.js:7:39416
1502: #endif //BASE PASS tmp_js_export.js:7:39416
1503: tmp_js_export.js:7:39416
1504: // tmp_js_export.js:7:39416
1505: // Lighting tmp_js_export.js:7:39416
1506: // tmp_js_export.js:7:39416
1507: #ifdef USE_LIGHTING tmp_js_export.js:7:39416
1508: tmp_js_export.js:7:39416
1509: #ifndef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1510:   vec3 L; tmp_js_export.js:7:39416
1511: #endif tmp_js_export.js:7:39416
1512:   vec3 light_att = vec3(1.0); tmp_js_export.js:7:39416
1513: tmp_js_export.js:7:39416
1514: #ifdef LIGHT_MODE_OMNI tmp_js_export.js:7:39416
1515: tmp_js_export.js:7:39416
1516: #ifndef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1517:   vec3 light_vec = light_position - vertex; tmp_js_export.js:7:39416
1518:   float light_length = length(light_vec); tmp_js_export.js:7:39416
1519: tmp_js_export.js:7:39416
1520:   float normalized_distance = light_length / light_range; tmp_js_export.js:7:39416
1521:   if (normalized_distance < 1.0) { tmp_js_export.js:7:39416
1522: tmp_js_export.js:7:39416
1523:       float omni_attenuation = pow(1.0 - normalized_distance, light_attenuation); tmp_js_export.js:7:39416
1524: tmp_js_export.js:7:39416
1525:       light_att = vec3(omni_attenuation); tmp_js_export.js:7:39416
1526:   } else { tmp_js_export.js:7:39416
1527:       light_att = vec3(0.0); tmp_js_export.js:7:39416
1528:   } tmp_js_export.js:7:39416
1529:   L = normalize(light_vec); tmp_js_export.js:7:39416
1530: tmp_js_export.js:7:39416
1531: #endif tmp_js_export.js:7:39416
1532: tmp_js_export.js:7:39416
1533: #if !defined(SHADOWS_DISABLED) tmp_js_export.js:7:39416
1534: tmp_js_export.js:7:39416
1535: #ifdef USE_SHADOW tmp_js_export.js:7:39416
1536:   { tmp_js_export.js:7:39416
1537:       highp vec4 splane = shadow_coord; tmp_js_export.js:7:39416
1538:       float shadow_len = length(splane.xyz); tmp_js_export.js:7:39416
1539: tmp_js_export.js:7:39416
1540:       splane.xyz = normalize(splane.xyz); tmp_js_export.js:7:39416
1541: tmp_js_export.js:7:39416
1542:       vec4 clamp_rect = light_clamp; tmp_js_export.js:7:39416
1543: tmp_js_export.js:7:39416
1544:       if (splane.z >= 0.0) { tmp_js_export.js:7:39416
1545:           splane.z += 1.0; tmp_js_export.js:7:39416
1546: tmp_js_export.js:7:39416
1547:           clamp_rect.y += clamp_rect.w; tmp_js_export.js:7:39416
1548:       } else { tmp_js_export.js:7:39416
1549:           splane.z = 1.0 - splane.z; tmp_js_export.js:7:39416
1550:       } tmp_js_export.js:7:39416
1551: tmp_js_export.js:7:39416
1552:       splane.xy /= splane.z; tmp_js_export.js:7:39416
1553:       splane.xy = splane.xy * 0.5 + 0.5; tmp_js_export.js:7:39416
1554:       splane.z = shadow_len / light_range; tmp_js_export.js:7:39416
1555: tmp_js_export.js:7:39416
1556:       splane.xy = clamp_rect.xy + splane.xy * clamp_rect.zw; tmp_js_export.js:7:39416
1557:       splane.w = 1.0; tmp_js_export.js:7:39416
1558: tmp_js_export.js:7:39416
1559:       float shadow = sample_shadow(light_shadow_atlas, splane); tmp_js_export.js:7:39416
1560: tmp_js_export.js:7:39416
1561:       light_att *= mix(shadow_color.rgb, vec3(1.0), shadow); tmp_js_export.js:7:39416
1562:   } tmp_js_export.js:7:39416
1563: #endif tmp_js_export.js:7:39416
1564: tmp_js_export.js:7:39416
1565: #endif //SHADOWS_DISABLED tmp_js_export.js:7:39416
1566: tmp_js_export.js:7:39416
1567: #endif //type omni tmp_js_export.js:7:39416
1568: tmp_js_export.js:7:39416
1569: #ifdef LIGHT_MODE_DIRECTIONAL tmp_js_export.js:7:39416
1570: tmp_js_export.js:7:39416
1571: #ifndef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1572:   vec3 light_vec = -light_direction; tmp_js_export.js:7:39416
1573:   L = normalize(light_vec); tmp_js_export.js:7:39416
1574: #endif tmp_js_export.js:7:39416
1575:   float depth_z = -vertex.z; tmp_js_export.js:7:39416
1576: tmp_js_export.js:7:39416
1577: #if !defined(SHADOWS_DISABLED) tmp_js_export.js:7:39416
1578: tmp_js_export.js:7:39416
1579: #ifdef USE_SHADOW tmp_js_export.js:7:39416
1580: tmp_js_export.js:7:39416
1581: #ifdef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1582:   //compute shadows in a mobile friendly way tmp_js_export.js:7:39416
1583: tmp_js_export.js:7:39416
1584: #ifdef LIGHT_USE_PSSM4 tmp_js_export.js:7:39416
1585:   //take advantage of prefetch tmp_js_export.js:7:39416
1586:   float shadow1 = sample_shadow(light_directional_shadow, shadow_coord); tmp_js_export.js:7:39416
1587:   float shadow2 = sample_shadow(light_directional_shadow, shadow_coord2); tmp_js_export.js:7:39416
1588:   float shadow3 = sample_shadow(light_directional_shadow, shadow_coord3); tmp_js_export.js:7:39416
1589:   float shadow4 = sample_shadow(light_directional_shadow, shadow_coord4); tmp_js_export.js:7:39416
1590: tmp_js_export.js:7:39416
1591:   if (depth_z < light_split_offsets.w) { tmp_js_export.js:7:39416
1592:       float pssm_fade = 0.0; tmp_js_export.js:7:39416
1593:       float shadow_att = 1.0; tmp_js_export.js:7:39416
1594: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1595:       float shadow_att2 = 1.0; tmp_js_export.js:7:39416
1596:       float pssm_blend = 0.0; tmp_js_export.js:7:39416
1597:       bool use_blend = true; tmp_js_export.js:7:39416
1598: #endif tmp_js_export.js:7:39416
1599:       if (depth_z < light_split_offsets.y) { tmp_js_export.js:7:39416
1600:           if (depth_z < light_split_offsets.x) { tmp_js_export.js:7:39416
1601:               shadow_att = shadow1; tmp_js_export.js:7:39416
1602: tmp_js_export.js:7:39416
1603: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1604:               shadow_att2 = shadow2; tmp_js_export.js:7:39416
1605: tmp_js_export.js:7:39416
1606:               pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); tmp_js_export.js:7:39416
1607: #endif tmp_js_export.js:7:39416
1608:           } else { tmp_js_export.js:7:39416
1609:               shadow_att = shadow2; tmp_js_export.js:7:39416
1610: tmp_js_export.js:7:39416
1611: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1612:               shadow_att2 = shadow3; tmp_js_export.js:7:39416
1613: tmp_js_export.js:7:39416
1614:               pssm_blend = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); tmp_js_export.js:7:39416
1615: #endif tmp_js_export.js:7:39416
1616:           } tmp_js_export.js:7:39416
1617:       } else { tmp_js_export.js:7:39416
1618:           if (depth_z < light_split_offsets.z) { tmp_js_export.js:7:39416
1619: tmp_js_export.js:7:39416
1620:               shadow_att = shadow3; tmp_js_export.js:7:39416
1621: tmp_js_export.js:7:39416
1622: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1623:               shadow_att2 = shadow4; tmp_js_export.js:7:39416
1624:               pssm_blend = smoothstep(light_split_offsets.y, light_split_offsets.z, depth_z); tmp_js_export.js:7:39416
1625: #endif tmp_js_export.js:7:39416
1626: tmp_js_export.js:7:39416
1627:           } else { tmp_js_export.js:7:39416
1628: tmp_js_export.js:7:39416
1629:               shadow_att = shadow4; tmp_js_export.js:7:39416
1630:               pssm_fade = smoothstep(light_split_offsets.z, light_split_offsets.w, depth_z); tmp_js_export.js:7:39416
1631: tmp_js_export.js:7:39416
1632: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1633:               use_blend = false; tmp_js_export.js:7:39416
1634: #endif tmp_js_export.js:7:39416
1635:           } tmp_js_export.js:7:39416
1636:       } tmp_js_export.js:7:39416
1637: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1638:       if (use_blend) { tmp_js_export.js:7:39416
1639:           shadow_att = mix(shadow_att, shadow_att2, pssm_blend); tmp_js_export.js:7:39416
1640:       } tmp_js_export.js:7:39416
1641: #endif tmp_js_export.js:7:39416
1642:       light_att *= mix(shadow_color.rgb, vec3(1.0), shadow_att); tmp_js_export.js:7:39416
1643:   } tmp_js_export.js:7:39416
1644: tmp_js_export.js:7:39416
1645: #endif //LIGHT_USE_PSSM4 tmp_js_export.js:7:39416
1646: tmp_js_export.js:7:39416
1647: #ifdef LIGHT_USE_PSSM2 tmp_js_export.js:7:39416
1648: tmp_js_export.js:7:39416
1649:   //take advantage of prefetch tmp_js_export.js:7:39416
1650:   float shadow1 = sample_shadow(light_directional_shadow, shadow_coord); tmp_js_export.js:7:39416
1651:   float shadow2 = sample_shadow(light_directional_shadow, shadow_coord2); tmp_js_export.js:7:39416
1652: tmp_js_export.js:7:39416
1653:   if (depth_z < light_split_offsets.y) { tmp_js_export.js:7:39416
1654:       float shadow_att = 1.0; tmp_js_export.js:7:39416
1655:       float pssm_fade = 0.0; tmp_js_export.js:7:39416
1656: tmp_js_export.js:7:39416
1657: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1658:       float shadow_att2 = 1.0; tmp_js_export.js:7:39416
1659:       float pssm_blend = 0.0; tmp_js_export.js:7:39416
1660:       bool use_blend = true; tmp_js_export.js:7:39416
1661: #endif tmp_js_export.js:7:39416
1662:       if (depth_z < light_split_offsets.x) { tmp_js_export.js:7:39416
1663:           float pssm_fade = 0.0; tmp_js_export.js:7:39416
1664:           shadow_att = shadow1; tmp_js_export.js:7:39416
1665: tmp_js_export.js:7:39416
1666: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1667:           shadow_att2 = shadow2; tmp_js_export.js:7:39416
1668:           pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); tmp_js_export.js:7:39416
1669: #endif tmp_js_export.js:7:39416
1670:       } else { tmp_js_export.js:7:39416
1671: tmp_js_export.js:7:39416
1672:           shadow_att = shadow2; tmp_js_export.js:7:39416
1673:           pssm_fade = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); tmp_js_export.js:7:39416
1674: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1675:           use_blend = false; tmp_js_export.js:7:39416
1676: #endif tmp_js_export.js:7:39416
1677:       } tmp_js_export.js:7:39416
1678: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1679:       if (use_blend) { tmp_js_export.js:7:39416
1680:           shadow_att = mix(shadow_att, shadow_att2, pssm_blend); tmp_js_export.js:7:39416
1681:       } tmp_js_export.js:7:39416
1682: #endif tmp_js_export.js:7:39416
1683:       light_att *= mix(shadow_color.rgb, vec3(1.0), shadow_att); tmp_js_export.js:7:39416
1684:   } tmp_js_export.js:7:39416
1685: tmp_js_export.js:7:39416
1686: #endif //LIGHT_USE_PSSM2 tmp_js_export.js:7:39416
1687: tmp_js_export.js:7:39416
1688: #if !defined(LIGHT_USE_PSSM4) && !defined(LIGHT_USE_PSSM2) tmp_js_export.js:7:39416
1689: tmp_js_export.js:7:39416
1690:   light_att *= mix(shadow_color.rgb, vec3(1.0), sample_shadow(light_directional_shadow, shadow_coord)); tmp_js_export.js:7:39416
1691: #endif //orthogonal tmp_js_export.js:7:39416
1692: tmp_js_export.js:7:39416
1693: #else //fragment version of pssm tmp_js_export.js:7:39416
1694: tmp_js_export.js:7:39416
1695:   { tmp_js_export.js:7:39416
1696: #ifdef LIGHT_USE_PSSM4 tmp_js_export.js:7:39416
1697:       if (depth_z < light_split_offsets.w) { tmp_js_export.js:7:39416
1698: #elif defined(LIGHT_USE_PSSM2) tmp_js_export.js:7:39416
1699:       if (depth_z < light_split_offsets.y) { tmp_js_export.js:7:39416
1700: #else tmp_js_export.js:7:39416
1701:       if (depth_z < light_split_offsets.x) { tmp_js_export.js:7:39416
1702: #endif //pssm2 tmp_js_export.js:7:39416
1703: tmp_js_export.js:7:39416
1704:           highp vec4 pssm_coord; tmp_js_export.js:7:39416
1705:           float pssm_fade = 0.0; tmp_js_export.js:7:39416
1706: tmp_js_export.js:7:39416
1707: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1708:           float pssm_blend; tmp_js_export.js:7:39416
1709:           highp vec4 pssm_coord2; tmp_js_export.js:7:39416
1710:           bool use_blend = true; tmp_js_export.js:7:39416
1711: #endif tmp_js_export.js:7:39416
1712: tmp_js_export.js:7:39416
1713: #ifdef LIGHT_USE_PSSM4 tmp_js_export.js:7:39416
1714: tmp_js_export.js:7:39416
1715:           if (depth_z < light_split_offsets.y) { tmp_js_export.js:7:39416
1716:               if (depth_z < light_split_offsets.x) { tmp_js_export.js:7:39416
1717:                   pssm_coord = shadow_coord; tmp_js_export.js:7:39416
1718: tmp_js_export.js:7:39416
1719: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1720:                   pssm_coord2 = shadow_coord2; tmp_js_export.js:7:39416
1721: tmp_js_export.js:7:39416
1722:                   pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); tmp_js_export.js:7:39416
1723: #endif tmp_js_export.js:7:39416
1724:               } else { tmp_js_export.js:7:39416
1725:                   pssm_coord = shadow_coord2; tmp_js_export.js:7:39416
1726: tmp_js_export.js:7:39416
1727: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1728:                   pssm_coord2 = shadow_coord3; tmp_js_export.js:7:39416
1729: tmp_js_export.js:7:39416
1730:                   pssm_blend = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); tmp_js_export.js:7:39416
1731: #endif tmp_js_export.js:7:39416
1732:               } tmp_js_export.js:7:39416
1733:           } else { tmp_js_export.js:7:39416
1734:               if (depth_z < light_split_offsets.z) { tmp_js_export.js:7:39416
1735: tmp_js_export.js:7:39416
1736:                   pssm_coord = shadow_coord3; tmp_js_export.js:7:39416
1737: tmp_js_export.js:7:39416
1738: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1739:                   pssm_coord2 = shadow_coord4; tmp_js_export.js:7:39416
1740:                   pssm_blend = smoothstep(light_split_offsets.y, light_split_offsets.z, depth_z); tmp_js_export.js:7:39416
1741: #endif tmp_js_export.js:7:39416
1742: tmp_js_export.js:7:39416
1743:               } else { tmp_js_export.js:7:39416
1744: tmp_js_export.js:7:39416
1745:                   pssm_coord = shadow_coord4; tmp_js_export.js:7:39416
1746:                   pssm_fade = smoothstep(light_split_offsets.z, light_split_offsets.w, depth_z); tmp_js_export.js:7:39416
1747: tmp_js_export.js:7:39416
1748: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1749:                   use_blend = false; tmp_js_export.js:7:39416
1750: #endif tmp_js_export.js:7:39416
1751:               } tmp_js_export.js:7:39416
1752:           } tmp_js_export.js:7:39416
1753: tmp_js_export.js:7:39416
1754: #endif // LIGHT_USE_PSSM4 tmp_js_export.js:7:39416
1755: tmp_js_export.js:7:39416
1756: #ifdef LIGHT_USE_PSSM2 tmp_js_export.js:7:39416
1757:           if (depth_z < light_split_offsets.x) { tmp_js_export.js:7:39416
1758: tmp_js_export.js:7:39416
1759:               pssm_coord = shadow_coord; tmp_js_export.js:7:39416
1760: tmp_js_export.js:7:39416
1761: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1762:               pssm_coord2 = shadow_coord2; tmp_js_export.js:7:39416
1763:               pssm_blend = smoothstep(0.0, light_split_offsets.x, depth_z); tmp_js_export.js:7:39416
1764: #endif tmp_js_export.js:7:39416
1765:           } else { tmp_js_export.js:7:39416
1766: tmp_js_export.js:7:39416
1767:               pssm_coord = shadow_coord2; tmp_js_export.js:7:39416
1768:               pssm_fade = smoothstep(light_split_offsets.x, light_split_offsets.y, depth_z); tmp_js_export.js:7:39416
1769: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1770:               use_blend = false; tmp_js_export.js:7:39416
1771: #endif tmp_js_export.js:7:39416
1772:           } tmp_js_export.js:7:39416
1773: tmp_js_export.js:7:39416
1774: #endif // LIGHT_USE_PSSM2 tmp_js_export.js:7:39416
1775: tmp_js_export.js:7:39416
1776: #if !defined(LIGHT_USE_PSSM4) && !defined(LIGHT_USE_PSSM2) tmp_js_export.js:7:39416
1777:           { tmp_js_export.js:7:39416
1778:               pssm_coord = shadow_coord; tmp_js_export.js:7:39416
1779:           } tmp_js_export.js:7:39416
1780: #endif tmp_js_export.js:7:39416
1781: tmp_js_export.js:7:39416
1782:           float shadow = sample_shadow(light_directional_shadow, pssm_coord); tmp_js_export.js:7:39416
1783: tmp_js_export.js:7:39416
1784: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1785:           if (use_blend) { tmp_js_export.js:7:39416
1786:               shadow = mix(shadow, sample_shadow(light_directional_shadow, pssm_coord2), pssm_blend); tmp_js_export.js:7:39416
1787:           } tmp_js_export.js:7:39416
1788: #endif tmp_js_export.js:7:39416
1789: tmp_js_export.js:7:39416
1790:           light_att *= mix(shadow_color.rgb, vec3(1.0), shadow); tmp_js_export.js:7:39416
1791:       } tmp_js_export.js:7:39416
1792:   } tmp_js_export.js:7:39416
1793: #endif //use vertex lighting tmp_js_export.js:7:39416
1794: tmp_js_export.js:7:39416
1795: #endif //use shadow tmp_js_export.js:7:39416
1796: tmp_js_export.js:7:39416
1797: #endif // SHADOWS_DISABLED tmp_js_export.js:7:39416
1798: tmp_js_export.js:7:39416
1799: #endif tmp_js_export.js:7:39416
1800: tmp_js_export.js:7:39416
1801: #ifdef LIGHT_MODE_SPOT tmp_js_export.js:7:39416
1802: tmp_js_export.js:7:39416
1803:   light_att = vec3(1.0); tmp_js_export.js:7:39416
1804: tmp_js_export.js:7:39416
1805: #ifndef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1806: tmp_js_export.js:7:39416
1807:   vec3 light_rel_vec = light_position - vertex; tmp_js_export.js:7:39416
1808:   float light_length = length(light_rel_vec); tmp_js_export.js:7:39416
1809:   float normalized_distance = light_length / light_range; tmp_js_export.js:7:39416
1810: tmp_js_export.js:7:39416
1811:   if (normalized_distance < 1.0) { tmp_js_export.js:7:39416
1812:       float spot_attenuation = pow(1.0 - normalized_distance, light_attenuation); tmp_js_export.js:7:39416
1813:       vec3 spot_dir = light_direction; tmp_js_export.js:7:39416
1814: tmp_js_export.js:7:39416
1815:       float spot_cutoff = light_spot_angle; tmp_js_export.js:7:39416
1816:       float angle = dot(-normalize(light_rel_vec), spot_dir); tmp_js_export.js:7:39416
1817: tmp_js_export.js:7:39416
1818:       if (angle > spot_cutoff) { tmp_js_export.js:7:39416
1819:           float scos = max(angle, spot_cutoff); tmp_js_export.js:7:39416
1820:           float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - spot_cutoff)); tmp_js_export.js:7:39416
1821:           spot_attenuation *= 1.0 - pow(spot_rim, light_spot_attenuation); tmp_js_export.js:7:39416
1822: tmp_js_export.js:7:39416
1823:           light_att = vec3(spot_attenuation); tmp_js_export.js:7:39416
1824:       } else { tmp_js_export.js:7:39416
1825:           light_att = vec3(0.0); tmp_js_export.js:7:39416
1826:       } tmp_js_export.js:7:39416
1827:   } else { tmp_js_export.js:7:39416
1828:       light_att = vec3(0.0); tmp_js_export.js:7:39416
1829:   } tmp_js_export.js:7:39416
1830: tmp_js_export.js:7:39416
1831:   L = normalize(light_rel_vec); tmp_js_export.js:7:39416
1832: tmp_js_export.js:7:39416
1833: #endif tmp_js_export.js:7:39416
1834: tmp_js_export.js:7:39416
1835: #if !defined(SHADOWS_DISABLED) tmp_js_export.js:7:39416
1836: tmp_js_export.js:7:39416
1837: #ifdef USE_SHADOW tmp_js_export.js:7:39416
1838:   { tmp_js_export.js:7:39416
1839:       highp vec4 splane = shadow_coord; tmp_js_export.js:7:39416
1840: tmp_js_export.js:7:39416
1841:       float shadow = sample_shadow(light_shadow_atlas, splane); tmp_js_export.js:7:39416
1842:       light_att *= mix(shadow_color.rgb, vec3(1.0), shadow); tmp_js_export.js:7:39416
1843:   } tmp_js_export.js:7:39416
1844: #endif tmp_js_export.js:7:39416
1845: tmp_js_export.js:7:39416
1846: #endif // SHADOWS_DISABLED tmp_js_export.js:7:39416
1847: tmp_js_export.js:7:39416
1848: #endif // LIGHT_MODE_SPOT tmp_js_export.js:7:39416
1849: tmp_js_export.js:7:39416
1850: #ifdef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1851:   //vertex lighting tmp_js_export.js:7:39416
1852: tmp_js_export.js:7:39416
1853:   specular_light += specular_interp * specular_blob_intensity * light_att; tmp_js_export.js:7:39416
1854:   diffuse_light += diffuse_interp * albedo * light_att; tmp_js_export.js:7:39416
1855: tmp_js_export.js:7:39416
1856:   // Same as above, needed for VERTEX_LIGHTING or else lights are too bright tmp_js_export.js:7:39416
1857:   const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022); tmp_js_export.js:7:39416
1858:   const vec4 c1 = vec4(1.0, 0.0425, 1.04, -0.04); tmp_js_export.js:7:39416
1859:   vec4 r = roughness * c0 + c1; tmp_js_export.js:7:39416
1860:   float ndotv = clamp(dot(normal, eye_position), 0.0, 1.0); tmp_js_export.js:7:39416
1861:   float a004 = min(r.x * r.x, exp2(-9.28 * ndotv)) * r.x + r.y; tmp_js_export.js:7:39416
1862:   vec2 env = vec2(-1.04, 1.04) * a004 + r.zw; tmp_js_export.js:7:39416
1863: tmp_js_export.js:7:39416
1864:   vec3 f0 = F0(metallic, specular, albedo); tmp_js_export.js:7:39416
1865:   specular_light *= env.x * f0 + env.y; tmp_js_export.js:7:39416
1866: tmp_js_export.js:7:39416
1867: #else tmp_js_export.js:7:39416
1868:   //fragment lighting tmp_js_export.js:7:39416
1869:   light_compute( tmp_js_export.js:7:39416
1870:           normal, tmp_js_export.js:7:39416
1871:           L, tmp_js_export.js:7:39416
1872:           eye_position, tmp_js_export.js:7:39416
1873:           binormal, tmp_js_export.js:7:39416
1874:           tangent, tmp_js_export.js:7:39416
1875:           light_color.xyz, tmp_js_export.js:7:39416
1876:           light_att, tmp_js_export.js:7:39416
1877:           albedo, tmp_js_export.js:7:39416
1878:           transmission, tmp_js_export.js:7:39416
1879:           specular_blob_intensity * light_specular, tmp_js_export.js:7:39416
1880:           roughness, tmp_js_export.js:7:39416
1881:           metallic, tmp_js_export.js:7:39416
1882:           specular, tmp_js_export.js:7:39416
1883:           rim, tmp_js_export.js:7:39416
1884:           rim_tint, tmp_js_export.js:7:39416
1885:           clearcoat, tmp_js_export.js:7:39416
1886:           clearcoat_gloss, tmp_js_export.js:7:39416
1887:           anisotropy, tmp_js_export.js:7:39416
1888:           diffuse_light, tmp_js_export.js:7:39416
1889:           specular_light, tmp_js_export.js:7:39416
1890:           alpha); tmp_js_export.js:7:39416
1891: tmp_js_export.js:7:39416
1892: #endif //vertex lighting tmp_js_export.js:7:39416
1893: tmp_js_export.js:7:39416
1894: #endif //USE_LIGHTING tmp_js_export.js:7:39416
1895:   //compute and merge tmp_js_export.js:7:39416
1896: tmp_js_export.js:7:39416
1897: #ifdef USE_SHADOW_TO_OPACITY tmp_js_export.js:7:39416
1898: tmp_js_export.js:7:39416
1899:   alpha = min(alpha, clamp(length(ambient_light), 0.0, 1.0)); tmp_js_export.js:7:39416
1900: tmp_js_export.js:7:39416
1901: #if defined(ALPHA_SCISSOR_USED) tmp_js_export.js:7:39416
1902:   if (alpha < alpha_scissor) { tmp_js_export.js:7:39416
1903:       discard; tmp_js_export.js:7:39416
1904:   } tmp_js_export.js:7:39416
1905: #endif // ALPHA_SCISSOR_USED tmp_js_export.js:7:39416
1906: tmp_js_export.js:7:39416
1907: #ifdef USE_DEPTH_PREPASS tmp_js_export.js:7:39416
1908:   if (alpha < 0.1) { tmp_js_export.js:7:39416
1909:       discard; tmp_js_export.js:7:39416
1910:   } tmp_js_export.js:7:39416
1911: #endif // USE_DEPTH_PREPASS tmp_js_export.js:7:39416
1912: tmp_js_export.js:7:39416
1913: #endif // !USE_SHADOW_TO_OPACITY tmp_js_export.js:7:39416
1914: tmp_js_export.js:7:39416
1915: #ifndef RENDER_DEPTH tmp_js_export.js:7:39416
1916: tmp_js_export.js:7:39416
1917: #ifdef SHADELESS tmp_js_export.js:7:39416
1918: tmp_js_export.js:7:39416
1919:   gl_FragColor = vec4(albedo, alpha); tmp_js_export.js:7:39416
1920: #else tmp_js_export.js:7:39416
1921: tmp_js_export.js:7:39416
1922:   ambient_light *= albedo; tmp_js_export.js:7:39416
1923: tmp_js_export.js:7:39416
1924: #if defined(ENABLE_AO) tmp_js_export.js:7:39416
1925:   ambient_light *= ao; tmp_js_export.js:7:39416
1926:   ao_light_affect = mix(1.0, ao, ao_light_affect); tmp_js_export.js:7:39416
1927:   specular_light *= ao_light_affect; tmp_js_export.js:7:39416
1928:   diffuse_light *= ao_light_affect; tmp_js_export.js:7:39416
1929: #endif tmp_js_export.js:7:39416
1930: tmp_js_export.js:7:39416
1931:   diffuse_light *= 1.0 - metallic; tmp_js_export.js:7:39416
1932:   ambient_light *= 1.0 - metallic; tmp_js_export.js:7:39416
1933: tmp_js_export.js:7:39416
1934:   gl_FragColor = vec4(ambient_light + diffuse_light + specular_light, alpha); tmp_js_export.js:7:39416
1935: tmp_js_export.js:7:39416
1936:   //add emission if in base pass tmp_js_export.js:7:39416
1937: #ifdef BASE_PASS tmp_js_export.js:7:39416
1938:   gl_FragColor.rgb += emission; tmp_js_export.js:7:39416
1939: #endif tmp_js_export.js:7:39416
1940:   // gl_FragColor = vec4(normal, 1.0); tmp_js_export.js:7:39416
1941: tmp_js_export.js:7:39416
1942: //apply fog tmp_js_export.js:7:39416
1943: #if defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED) tmp_js_export.js:7:39416
1944: tmp_js_export.js:7:39416
1945: #if defined(USE_VERTEX_LIGHTING) tmp_js_export.js:7:39416
1946: tmp_js_export.js:7:39416
1947: #if defined(BASE_PASS) tmp_js_export.js:7:39416
1948:   gl_FragColor.rgb = mix(gl_FragColor.rgb, fog_interp.rgb, fog_interp.a); tmp_js_export.js:7:39416
1949: #else tmp_js_export.js:7:39416
1950:   gl_FragColor.rgb *= (1.0 - fog_interp.a); tmp_js_export.js:7:39416
1951: #endif // BASE_PASS tmp_js_export.js:7:39416
1952: tmp_js_export.js:7:39416
1953: #else //pixel based fog tmp_js_export.js:7:39416
1954:   float fog_amount = 0.0; tmp_js_export.js:7:39416
1955: tmp_js_export.js:7:39416
1956: #ifdef LIGHT_MODE_DIRECTIONAL tmp_js_export.js:7:39416
1957: tmp_js_export.js:7:39416
1958:   vec3 fog_color = mix(fog_color_base.rgb, fog_sun_color_amount.rgb, fog_sun_color_amount.a * pow(max(dot(eye_position, light_direction), 0.0), 8.0)); tmp_js_export.js:7:39416
1959: #else tmp_js_export.js:7:39416
1960:   vec3 fog_color = fog_color_base.rgb; tmp_js_export.js:7:39416
1961: #endif tmp_js_export.js:7:39416
1962: tmp_js_export.js:7:39416
1963: #ifdef FOG_DEPTH_ENABLED tmp_js_export.js:7:39416
1964: tmp_js_export.js:7:39416
1965:   { tmp_js_export.js:7:39416
1966: tmp_js_export.js:7:39416
1967:       float fog_z = smoothstep(fog_depth_begin, fog_max_distance, length(vertex)); tmp_js_export.js:7:39416
1968: tmp_js_export.js:7:39416
1969:       fog_amount = pow(fog_z, fog_depth_curve) * fog_color_base.a; tmp_js_export.js:7:39416
1970: tmp_js_export.js:7:39416
1971:       if (fog_transmit_enabled) { tmp_js_export.js:7:39416
1972:           vec3 total_light = gl_FragColor.rgb; tmp_js_export.js:7:39416
1973:           float transmit = pow(fog_z, fog_transmit_curve); tmp_js_export.js:7:39416
1974:           fog_color = mix(max(total_light, fog_color), fog_color, transmit); tmp_js_export.js:7:39416
1975:       } tmp_js_export.js:7:39416
1976:   } tmp_js_export.js:7:39416
1977: #endif tmp_js_export.js:7:39416
1978: tmp_js_export.js:7:39416
1979: #ifdef FOG_HEIGHT_ENABLED tmp_js_export.js:7:39416
1980:   { tmp_js_export.js:7:39416
1981:       float y = (camera_matrix * vec4(vertex, 1.0)).y; tmp_js_export.js:7:39416
1982:       fog_amount = max(fog_amount, pow(smoothstep(fog_height_min, fog_height_max, y), fog_height_curve)); tmp_js_export.js:7:39416
1983:   } tmp_js_export.js:7:39416
1984: #endif tmp_js_export.js:7:39416
1985: tmp_js_export.js:7:39416
1986: #if defined(BASE_PASS) tmp_js_export.js:7:39416
1987:   gl_FragColor.rgb = mix(gl_FragColor.rgb, fog_color, fog_amount); tmp_js_export.js:7:39416
1988: #else tmp_js_export.js:7:39416
1989:   gl_FragColor.rgb *= (1.0 - fog_amount); tmp_js_export.js:7:39416
1990: #endif // BASE_PASS tmp_js_export.js:7:39416
1991: tmp_js_export.js:7:39416
1992: #endif //use vertex lit tmp_js_export.js:7:39416
1993: tmp_js_export.js:7:39416
1994: #endif // defined(FOG_DEPTH_ENABLED) || defined(FOG_HEIGHT_ENABLED) tmp_js_export.js:7:39416
1995: tmp_js_export.js:7:39416
1996: #endif //unshaded tmp_js_export.js:7:39416
1997: tmp_js_export.js:7:39416
1998: #else // not RENDER_DEPTH tmp_js_export.js:7:39416
1999: //depth render tmp_js_export.js:7:39416
2000: #ifdef USE_RGBA_SHADOWS tmp_js_export.js:7:39416
2001: tmp_js_export.js:7:39416
2002:   highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0; // bias tmp_js_export.js:7:39416
2003:   highp vec4 comp = fract(depth * vec4(255.0 * 255.0 * 255.0, 255.0 * 255.0, 255.0, 1.0)); tmp_js_export.js:7:39416
2004:   comp -= comp.xxyz * vec4(0.0, 1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0); tmp_js_export.js:7:39416
2005:   gl_FragColor = comp; tmp_js_export.js:7:39416
2006: tmp_js_export.js:7:39416
2007: #endif tmp_js_export.js:7:39416
2008: #endif tmp_js_export.js:7:39416
2009: } tmp_js_export.js:7:39416
2010: tmp_js_export.js:7:39416
**ERROR**: SceneShaderGLES2: Program linking failed: tmp_js_export.js:7:39685
Programs with more than 16 samplers are disallowed on Mesa drivers to avoid crashing. tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.cpp:129:_display_error_with_code() - SceneShaderGLES2: Program linking failed: tmp_js_export.js:7:39685
Programs with more than 16 samplers are disallowed on Mesa drivers to avoid crashing. tmp_js_export.js:7:39685
**ERROR**: Method/Function Failed, returning: 0L tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.cpp:410:get_current_version() - Method/Function Failed, returning: 0L tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: false tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.cpp:88:bind() - Condition ' !version ' is true. returned: false tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.h:254:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
Error: WebGL warning: drawElements: The current program is not linked. 13 tmp_js_export.js:7:194884
Error: WebGL: No further warnings will be reported for this WebGL context. (already reported 32 warnings) tmp_js_export.js:7:194884

The relevant part seems to be:

**ERROR**: SceneShaderGLES2: Program linking failed: tmp_js_export.js:7:39685
Programs with more than 16 samplers are disallowed on Mesa drivers to avoid crashing. tmp_js_export.js:7:39685
   At: drivers/gles2/shader_gles2.cpp:129:_display_error_with_code() - SceneShaderGLES2: Program linking failed: tmp_js_export.js:7:39685
akien-mga commented 4 years ago

On chromium on the same distro/drivers I can confirm that it works well. I do get errors in the logs too, but no mention of hitting 16 samplers:

tmp_js_export.js:7 Godot Engine v3.2.alpha3.official - https://godotengine.org
tmp_js_export.js:7 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
RuntimeEnvironment.ASM_CONSTS @ tmp_js_export.js:7
tmp_js_export.js:7 OpenGL ES 2.0 Renderer: WebKit WebGL
tmp_js_export.js:7  
tmp_js_export.js:7 WebGL: INVALID_OPERATION: framebufferRenderbuffer: renderbuffer has never been bound
_glFramebufferRenderbuffer @ tmp_js_export.js:7
tmp_js_export.js:7 WebGL: INVALID_OPERATION: framebufferRenderbuffer: renderbuffer has never been bound
_glFramebufferRenderbuffer @ tmp_js_export.js:7
tmp_js_export.js:7 **ERROR**: Texture 'res://.import/WildNormal.png-20902661572dada35e4e3a9727ad45d6.s3tc.stex' was required to be a power of 2 (because it uses either mipmaps or repeat), so it was decompressed. This will hurt performance and memory usage.
put_char @ tmp_js_export.js:7
tmp_js_export.js:7    At: drivers/gles2/rasterizer_storage_gles2.cpp:641:texture_set_data() - Texture 'res://.import/WildNormal.png-20902661572dada35e4e3a9727ad45d6.s3tc.stex' was required to be a power of 2 (because it uses either mipmaps or repeat), so it was decompressed. This will hurt performance and memory usage.
put_char @ tmp_js_export.js:7
tmp_js_export.js:7 **ERROR**: Texture 'res://.import/WildGrid.png-09bc5364f72c31b80b9cdd2ee1128f00.s3tc.stex' was required to be a power of 2 (because it uses either mipmaps or repeat), so it was decompressed. This will hurt performance and memory usage.
put_char @ tmp_js_export.js:7
tmp_js_export.js:7    At: drivers/gles2/rasterizer_storage_gles2.cpp:641:texture_set_data() - Texture 'res://.import/WildGrid.png-09bc5364f72c31b80b9cdd2ee1128f00.s3tc.stex' was required to be a power of 2 (because it uses either mipmaps or repeat), so it was decompressed. This will hurt performance and memory usage.
put_char @ tmp_js_export.js:7
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
[.WebGL-0x562bed413910]RENDER WARNING: there is no texture bound to the unit 190
tmp_js_export.html:1 WebGL: too many errors, no more errors will be reported to the console for this context.
danilw commented 4 years ago

this mesa driver bug as I see

Programs with more than 16 samplers are disallowed on Mesa drivers

Nvidia does not have this problem.

akien-mga commented 4 years ago

To clarify, the above is with GLES2 / WebGL 1.0.

I tested GLES3 / WebGL 2.0 to compare and there are other (possibly unrelated) issues.

Firefox on Linux/Mesa (Intel), WebGL2

Screenshot_20191025_102142 Model visible and properly animated, but black material. Same reference to hitting the hard limit of 16 samplers on Mesa.

The script from “http://localhost:8060/tmp_js_export.js” was loaded even though its MIME type (“”) is not a valid JavaScript MIME type. tmp_js_export.html
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. tmp_js_export.js:7:17440
Error: WebGL warning: compressedTexImage2D: Bad `internalFormat`:  10 tmp_js_export.js:7:262466
Error: WebGL warning: compressedTexImage2D: COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT requires that width and height are block-aligned, or, if level>0, equal to 0, 1, or 2. 2 tmp_js_export.js:7:262466
Error: WebGL warning: drawElements: Buffer for uniform block is smaller than UNIFORM_BLOCK_DATA_SIZE. tmp_js_export.js:7:194884
Error: WebGL warning: linkProgram: Programs with more than 16 samplers are disallowed on Mesa drivers to avoid crashing. tmp_js_export.js:7:273482
699:    float dd = -d * d; tmp_js_export.js:7:39416
700:    vec3 profile = tmp_js_export.js:7:39416
701:            vec3(0.233, 0.455, 0.649) * exp(dd / 0.0064) + tmp_js_export.js:7:39416
702:            vec3(0.1,   0.336, 0.344) * exp(dd / 0.0484) + tmp_js_export.js:7:39416
703:            vec3(0.118, 0.198, 0.0)   * exp(dd / 0.187)  + tmp_js_export.js:7:39416
704:            vec3(0.113, 0.007, 0.007) * exp(dd / 0.567)  + tmp_js_export.js:7:39416
705:            vec3(0.358, 0.004, 0.0)   * exp(dd / 1.99)   + tmp_js_export.js:7:39416
706:            vec3(0.078, 0.0,   0.0)   * exp(dd / 7.41); tmp_js_export.js:7:39416
707: tmp_js_export.js:7:39416
708:    /** tmp_js_export.js:7:39416
709:    * Using the profile, we finally approximate the transmitted lighting from tmp_js_export.js:7:39416
710:    * the back of the object: tmp_js_export.js:7:39416
711:    */ tmp_js_export.js:7:39416
712:    return profile * clamp(0.3 + dot(light_vec, normal),0.0,1.0); tmp_js_export.js:7:39416
713: } tmp_js_export.js:7:39416
714: #endif tmp_js_export.js:7:39416
715: tmp_js_export.js:7:39416
716: void light_process_omni(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 binormal, vec3 tangent, vec3 albedo, vec3 transmission, float roughness, float metallic, float specular, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light, inout float alpha) { tmp_js_export.js:7:39416
717: tmp_js_export.js:7:39416
718:    vec3 light_rel_vec = omni_lights[idx].light_pos_inv_radius.xyz - vertex; tmp_js_export.js:7:39416
719:    float light_length = length(light_rel_vec); tmp_js_export.js:7:39416
720:    float normalized_distance = light_length * omni_lights[idx].light_pos_inv_radius.w; tmp_js_export.js:7:39416
721:    float omni_attenuation = pow(max(1.0 - normalized_distance, 0.0), omni_lights[idx].light_direction_attenuation.w); tmp_js_export.js:7:39416
722:    vec3 light_attenuation = vec3(omni_attenuation); tmp_js_export.js:7:39416
723: tmp_js_export.js:7:39416
724: #if !defined(SHADOWS_DISABLED) tmp_js_export.js:7:39416
725:    if (omni_lights[idx].light_params.w > 0.5) { tmp_js_export.js:7:39416
726:        // there is a shadowmap tmp_js_export.js:7:39416
727: tmp_js_export.js:7:39416
728:        highp vec3 splane = (omni_lights[idx].shadow_matrix * vec4(vertex, 1.0)).xyz; tmp_js_export.js:7:39416
729:        float shadow_len = length(splane); tmp_js_export.js:7:39416
730:        splane = normalize(splane); tmp_js_export.js:7:39416
731:        vec4 clamp_rect = omni_lights[idx].light_clamp; tmp_js_export.js:7:39416
732: tmp_js_export.js:7:39416
733:        if (splane.z >= 0.0) { tmp_js_export.js:7:39416
734: tmp_js_export.js:7:39416
735:            splane.z += 1.0; tmp_js_export.js:7:39416
736: tmp_js_export.js:7:39416
737:            clamp_rect.y += clamp_rect.w; tmp_js_export.js:7:39416
738: tmp_js_export.js:7:39416
739:        } else { tmp_js_export.js:7:39416
740: tmp_js_export.js:7:39416
741:            splane.z = 1.0 - splane.z; tmp_js_export.js:7:39416
742: tmp_js_export.js:7:39416
743:            /* tmp_js_export.js:7:39416
744:            if (clamp_rect.z < clamp_rect.w) { tmp_js_export.js:7:39416
745:                clamp_rect.x += clamp_rect.z; tmp_js_export.js:7:39416
746:            } else { tmp_js_export.js:7:39416
747:                clamp_rect.y += clamp_rect.w; tmp_js_export.js:7:39416
748:            } tmp_js_export.js:7:39416
749:            */ tmp_js_export.js:7:39416
750:        } tmp_js_export.js:7:39416
751: tmp_js_export.js:7:39416
752:        splane.xy /= splane.z; tmp_js_export.js:7:39416
753:        splane.xy = splane.xy * 0.5 + 0.5; tmp_js_export.js:7:39416
754:        splane.z = shadow_len * omni_lights[idx].light_pos_inv_radius.w; tmp_js_export.js:7:39416
755: tmp_js_export.js:7:39416
756:        splane.xy = clamp_rect.xy + splane.xy * clamp_rect.zw; tmp_js_export.js:7:39416
757:        float shadow = sample_shadow(shadow_atlas, shadow_atlas_pixel_size, splane.xy, splane.z, clamp_rect); tmp_js_export.js:7:39416
758: tmp_js_export.js:7:39416
759: #ifdef USE_CONTACT_SHADOWS tmp_js_export.js:7:39416
760: tmp_js_export.js:7:39416
761:        if (shadow > 0.01 && omni_lights[idx].shadow_color_contact.a > 0.0) { tmp_js_export.js:7:39416
762: tmp_js_export.js:7:39416
763:            float contact_shadow = contact_shadow_compute(vertex, normalize(light_rel_vec), min(light_length, omni_lights[idx].shadow_color_contact.a)); tmp_js_export.js:7:39416
764:            shadow = min(shadow, contact_shadow); tmp_js_export.js:7:39416
765:        } tmp_js_export.js:7:39416
766: #endif tmp_js_export.js:7:39416
767:        light_attenuation *= mix(omni_lights[idx].shadow_color_contact.rgb, vec3(1.0), shadow); tmp_js_export.js:7:39416
768:    } tmp_js_export.js:7:39416
769: #endif //SHADOWS_DISABLED tmp_js_export.js:7:39416
770:    light_compute(normal, normalize(light_rel_vec), eye_vec, binormal, tangent, omni_lights[idx].light_color_energy.rgb, light_attenuation, albedo, transmission, omni_lights[idx].light_params.z * p_blob_intensity, roughness, metallic, specular, rim * omni_attenuation, rim_tint, clearcoat, clearcoat_gloss, anisotropy, diffuse_light, specular_light, alpha); tmp_js_export.js:7:39416
771: } tmp_js_export.js:7:39416
772: tmp_js_export.js:7:39416
773: void light_process_spot(int idx, vec3 vertex, vec3 eye_vec, vec3 normal, vec3 binormal, vec3 tangent, vec3 albedo, vec3 transmission, float roughness, float metallic, float specular, float rim, float rim_tint, float clearcoat, float clearcoat_gloss, float anisotropy, float p_blob_intensity, inout vec3 diffuse_light, inout vec3 specular_light, inout float alpha) { tmp_js_export.js:7:39416
774: tmp_js_export.js:7:39416
775:    vec3 light_rel_vec = spot_lights[idx].light_pos_inv_radius.xyz - vertex; tmp_js_export.js:7:39416
776:    float light_length = length(light_rel_vec); tmp_js_export.js:7:39416
777:    float normalized_distance = light_length * spot_lights[idx].light_pos_inv_radius.w; tmp_js_export.js:7:39416
778:    float spot_attenuation = pow(max(1.0 - normalized_distance, 0.001), spot_lights[idx].light_direction_attenuation.w); tmp_js_export.js:7:39416
779:    vec3 spot_dir = spot_lights[idx].light_direction_attenuation.xyz; tmp_js_export.js:7:39416
780:    float spot_cutoff = spot_lights[idx].light_params.y; tmp_js_export.js:7:39416
781:    float scos = max(dot(-normalize(light_rel_vec), spot_dir), spot_cutoff); tmp_js_export.js:7:39416
782:    float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - spot_cutoff)); tmp_js_export.js:7:39416
783:    spot_attenuation *= 1.0 - pow(spot_rim, spot_lights[idx].light_params.x); tmp_js_export.js:7:39416
784:    vec3 light_attenuation = vec3(spot_attenuation); tmp_js_export.js:7:39416
785: tmp_js_export.js:7:39416
786: #if !defined(SHADOWS_DISABLED) tmp_js_export.js:7:39416
787:    if (spot_lights[idx].light_params.w > 0.5) { tmp_js_export.js:7:39416
788:        //there is a shadowmap tmp_js_export.js:7:39416
789:        highp vec4 splane = (spot_lights[idx].shadow_matrix * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
790:        splane.xyz /= splane.w; tmp_js_export.js:7:39416
791: tmp_js_export.js:7:39416
792:        float shadow = sample_shadow(shadow_atlas, shadow_atlas_pixel_size, splane.xy, splane.z, spot_lights[idx].light_clamp); tmp_js_export.js:7:39416
793: tmp_js_export.js:7:39416
794: #ifdef USE_CONTACT_SHADOWS tmp_js_export.js:7:39416
795:        if (shadow > 0.01 && spot_lights[idx].shadow_color_contact.a > 0.0) { tmp_js_export.js:7:39416
796: tmp_js_export.js:7:39416
797:            float contact_shadow = contact_shadow_compute(vertex, normalize(light_rel_vec), min(light_length, spot_lights[idx].shadow_color_contact.a)); tmp_js_export.js:7:39416
798:            shadow = min(shadow, contact_shadow); tmp_js_export.js:7:39416
799:        } tmp_js_export.js:7:39416
800: #endif tmp_js_export.js:7:39416
801:        light_attenuation *= mix(spot_lights[idx].shadow_color_contact.rgb, vec3(1.0), shadow); tmp_js_export.js:7:39416
802:    } tmp_js_export.js:7:39416
803: #endif //SHADOWS_DISABLED tmp_js_export.js:7:39416
804: tmp_js_export.js:7:39416
805:    light_compute(normal, normalize(light_rel_vec), eye_vec, binormal, tangent, spot_lights[idx].light_color_energy.rgb, light_attenuation, albedo, transmission, spot_lights[idx].light_params.z * p_blob_intensity, roughness, metallic, specular, rim * spot_attenuation, rim_tint, clearcoat, clearcoat_gloss, anisotropy, diffuse_light, specular_light, alpha); tmp_js_export.js:7:39416
806: } tmp_js_export.js:7:39416
807: tmp_js_export.js:7:39416
808: void reflection_process(int idx, vec3 vertex, vec3 normal, vec3 binormal, vec3 tangent, float roughness, float anisotropy, vec3 ambient, vec3 skybox, inout highp vec4 reflection_accum, inout highp vec4 ambient_accum) { tmp_js_export.js:7:39416
809: tmp_js_export.js:7:39416
810:    vec3 ref_vec = normalize(reflect(vertex, normal)); tmp_js_export.js:7:39416
811:    vec3 local_pos = (reflections[idx].local_matrix * vec4(vertex, 1.0)).xyz; tmp_js_export.js:7:39416
812:    vec3 box_extents = reflections[idx].box_extents.xyz; tmp_js_export.js:7:39416
813: tmp_js_export.js:7:39416
814:    if (any(greaterThan(abs(local_pos), box_extents))) { //out of the reflection box tmp_js_export.js:7:39416
815:        return; tmp_js_export.js:7:39416
816:    } tmp_js_export.js:7:39416
817: tmp_js_export.js:7:39416
818:    vec3 inner_pos = abs(local_pos / box_extents); tmp_js_export.js:7:39416
819:    float blend = max(inner_pos.x, max(inner_pos.y, inner_pos.z)); tmp_js_export.js:7:39416
820:    //make blend more rounded tmp_js_export.js:7:39416
821:    blend = mix(length(inner_pos), blend, blend); tmp_js_export.js:7:39416
822:    blend *= blend; tmp_js_export.js:7:39416
823:    blend = max(0.0, 1.0 - blend); tmp_js_export.js:7:39416
824: tmp_js_export.js:7:39416
825:    if (reflections[idx].params.x > 0.0) { // compute reflection tmp_js_export.js:7:39416
826: tmp_js_export.js:7:39416
827:        vec3 local_ref_vec = (reflections[idx].local_matrix * vec4(ref_vec, 0.0)).xyz; tmp_js_export.js:7:39416
828: tmp_js_export.js:7:39416
829:        if (reflections[idx].params.w > 0.5) { //box project tmp_js_export.js:7:39416
830: tmp_js_export.js:7:39416
831:            vec3 nrdir = normalize(local_ref_vec); tmp_js_export.js:7:39416
832:            vec3 rbmax = (box_extents - local_pos) / nrdir; tmp_js_export.js:7:39416
833:            vec3 rbmin = (-box_extents - local_pos) / nrdir; tmp_js_export.js:7:39416
834: tmp_js_export.js:7:39416
835:            vec3 rbminmax = mix(rbmin, rbmax, greaterThan(nrdir, vec3(0.0, 0.0, 0.0))); tmp_js_export.js:7:39416
836: tmp_js_export.js:7:39416
837:            float fa = min(min(rbminmax.x, rbminmax.y), rbminmax.z); tmp_js_export.js:7:39416
838:            vec3 posonbox = local_pos + nrdir * fa; tmp_js_export.js:7:39416
839:            local_ref_vec = posonbox - reflections[idx].box_offset.xyz; tmp_js_export.js:7:39416
840:        } tmp_js_export.js:7:39416
841: tmp_js_export.js:7:39416
842:        vec4 clamp_rect = reflections[idx].atlas_clamp; tmp_js_export.js:7:39416
843:        vec3 norm = normalize(local_ref_vec); tmp_js_export.js:7:39416
844:        norm.xy /= 1.0 + abs(norm.z); tmp_js_export.js:7:39416
845:        norm.xy = norm.xy * vec2(0.5, 0.25) + vec2(0.5, 0.25); tmp_js_export.js:7:39416
846:        if (norm.z > 0.0) { tmp_js_export.js:7:39416
847:            norm.y = 0.5 - norm.y + 0.5; tmp_js_export.js:7:39416
848:        } tmp_js_export.js:7:39416
849: tmp_js_export.js:7:39416
850:        vec2 atlas_uv = norm.xy * clamp_rect.zw + clamp_rect.xy; tmp_js_export.js:7:39416
851:        atlas_uv = clamp(atlas_uv, clamp_rect.xy, clamp_rect.xy + clamp_rect.zw); tmp_js_export.js:7:39416
852: tmp_js_export.js:7:39416
853:        highp vec4 reflection; tmp_js_export.js:7:39416
854:        reflection.rgb = textureLod(reflection_atlas, atlas_uv, roughness * 5.0).rgb; tmp_js_export.js:7:39416
855: tmp_js_export.js:7:39416
856:        if (reflections[idx].params.z < 0.5) { tmp_js_export.js:7:39416
857:            reflection.rgb = mix(skybox, reflection.rgb, blend); tmp_js_export.js:7:39416
858:        } tmp_js_export.js:7:39416
859:        reflection.rgb *= reflections[idx].params.x; tmp_js_export.js:7:39416
860:        reflection.a = blend; tmp_js_export.js:7:39416
861:        reflection.rgb *= reflection.a; tmp_js_export.js:7:39416
862: tmp_js_export.js:7:39416
863:        reflection_accum += reflection; tmp_js_export.js:7:39416
864:    } tmp_js_export.js:7:39416
865: #if !defined(USE_LIGHTMAP) && !defined(USE_LIGHTMAP_CAPTURE) tmp_js_export.js:7:39416
866:    if (reflections[idx].ambient.a > 0.0) { //compute ambient using skybox tmp_js_export.js:7:39416
867: tmp_js_export.js:7:39416
868:        vec3 local_amb_vec = (reflections[idx].local_matrix * vec4(normal, 0.0)).xyz; tmp_js_export.js:7:39416
869: tmp_js_export.js:7:39416
870:        vec3 splane = normalize(local_amb_vec); tmp_js_export.js:7:39416
871:        vec4 clamp_rect = reflections[idx].atlas_clamp; tmp_js_export.js:7:39416
872: tmp_js_export.js:7:39416
873:        splane.z *= -1.0; tmp_js_export.js:7:39416
874:        if (splane.z >= 0.0) { tmp_js_export.js:7:39416
875:            splane.z += 1.0; tmp_js_export.js:7:39416
876:            clamp_rect.y += clamp_rect.w; tmp_js_export.js:7:39416
877:        } else { tmp_js_export.js:7:39416
878:            splane.z = 1.0 - splane.z; tmp_js_export.js:7:39416
879:            splane.y = -splane.y; tmp_js_export.js:7:39416
880:        } tmp_js_export.js:7:39416
881: tmp_js_export.js:7:39416
882:        splane.xy /= splane.z; tmp_js_export.js:7:39416
883:        splane.xy = splane.xy * 0.5 + 0.5; tmp_js_export.js:7:39416
884: tmp_js_export.js:7:39416
885:        splane.xy = splane.xy * clamp_rect.zw + clamp_rect.xy; tmp_js_export.js:7:39416
886:        splane.xy = clamp(splane.xy, clamp_rect.xy, clamp_rect.xy + clamp_rect.zw); tmp_js_export.js:7:39416
887: tmp_js_export.js:7:39416
888:        highp vec4 ambient_out; tmp_js_export.js:7:39416
889:        ambient_out.a = blend; tmp_js_export.js:7:39416
890:        ambient_out.rgb = textureLod(reflection_atlas, splane.xy, 5.0).rgb; tmp_js_export.js:7:39416
891:        ambient_out.rgb = mix(reflections[idx].ambient.rgb, ambient_out.rgb, reflections[idx].ambient.a); tmp_js_export.js:7:39416
892:        if (reflections[idx].params.z < 0.5) { tmp_js_export.js:7:39416
893:            ambient_out.rgb = mix(ambient, ambient_out.rgb, blend); tmp_js_export.js:7:39416
894:        } tmp_js_export.js:7:39416
895: tmp_js_export.js:7:39416
896:        ambient_out.rgb *= ambient_out.a; tmp_js_export.js:7:39416
897:        ambient_accum += ambient_out; tmp_js_export.js:7:39416
898:    } else { tmp_js_export.js:7:39416
899: tmp_js_export.js:7:39416
900:        highp vec4 ambient_out; tmp_js_export.js:7:39416
901:        ambient_out.a = blend; tmp_js_export.js:7:39416
902:        ambient_out.rgb = reflections[idx].ambient.rgb; tmp_js_export.js:7:39416
903:        if (reflections[idx].params.z < 0.5) { tmp_js_export.js:7:39416
904:            ambient_out.rgb = mix(ambient, ambient_out.rgb, blend); tmp_js_export.js:7:39416
905:        } tmp_js_export.js:7:39416
906:        ambient_out.rgb *= ambient_out.a; tmp_js_export.js:7:39416
907:        ambient_accum += ambient_out; tmp_js_export.js:7:39416
908:    } tmp_js_export.js:7:39416
909: #endif tmp_js_export.js:7:39416
910: } tmp_js_export.js:7:39416
911: tmp_js_export.js:7:39416
912: #ifdef USE_LIGHTMAP tmp_js_export.js:7:39416
913: uniform mediump sampler2D lightmap; //texunit:-9 tmp_js_export.js:7:39416
914: uniform mediump float lightmap_energy; tmp_js_export.js:7:39416
915: #endif tmp_js_export.js:7:39416
916: tmp_js_export.js:7:39416
917: #ifdef USE_LIGHTMAP_CAPTURE tmp_js_export.js:7:39416
918: uniform mediump vec4[12] lightmap_captures; tmp_js_export.js:7:39416
919: uniform bool lightmap_capture_sky; tmp_js_export.js:7:39416
920: tmp_js_export.js:7:39416
921: #endif tmp_js_export.js:7:39416
922: tmp_js_export.js:7:39416
923: #ifdef USE_GI_PROBES tmp_js_export.js:7:39416
924: tmp_js_export.js:7:39416
925: uniform mediump sampler3D gi_probe1; //texunit:-9 tmp_js_export.js:7:39416
926: uniform highp mat4 gi_probe_xform1; tmp_js_export.js:7:39416
927: uniform highp vec3 gi_probe_bounds1; tmp_js_export.js:7:39416
928: uniform highp vec3 gi_probe_cell_size1; tmp_js_export.js:7:39416
929: uniform highp float gi_probe_multiplier1; tmp_js_export.js:7:39416
930: uniform highp float gi_probe_bias1; tmp_js_export.js:7:39416
931: uniform highp float gi_probe_normal_bias1; tmp_js_export.js:7:39416
932: uniform bool gi_probe_blend_ambient1; tmp_js_export.js:7:39416
933: tmp_js_export.js:7:39416
934: uniform mediump sampler3D gi_probe2; //texunit:-10 tmp_js_export.js:7:39416
935: uniform highp mat4 gi_probe_xform2; tmp_js_export.js:7:39416
936: uniform highp vec3 gi_probe_bounds2; tmp_js_export.js:7:39416
937: uniform highp vec3 gi_probe_cell_size2; tmp_js_export.js:7:39416
938: uniform highp float gi_probe_multiplier2; tmp_js_export.js:7:39416
939: uniform highp float gi_probe_bias2; tmp_js_export.js:7:39416
940: uniform highp float gi_probe_normal_bias2; tmp_js_export.js:7:39416
941: uniform bool gi_probe2_enabled; tmp_js_export.js:7:39416
942: uniform bool gi_probe_blend_ambient2; tmp_js_export.js:7:39416
943: tmp_js_export.js:7:39416
944: vec3 voxel_cone_trace(mediump sampler3D probe, vec3 cell_size, vec3 pos, vec3 ambient, bool blend_ambient, vec3 direction, float tan_half_angle, float max_distance, float p_bias) { tmp_js_export.js:7:39416
945: tmp_js_export.js:7:39416
946:    float dist = p_bias; //1.0; //dot(direction,mix(vec3(-1.0),vec3(1.0),greaterThan(direction,vec3(0.0))))*2.0; tmp_js_export.js:7:39416
947:    float alpha = 0.0; tmp_js_export.js:7:39416
948:    vec3 color = vec3(0.0); tmp_js_export.js:7:39416
949: tmp_js_export.js:7:39416
950:    while (dist < max_distance && alpha < 0.95) { tmp_js_export.js:7:39416
951:        float diameter = max(1.0, 2.0 * tan_half_angle * dist); tmp_js_export.js:7:39416
952:        vec4 scolor = textureLod(probe, (pos + dist * direction) * cell_size, log2(diameter)); tmp_js_export.js:7:39416
953:        float a = (1.0 - alpha); tmp_js_export.js:7:39416
954:        color += scolor.rgb * a; tmp_js_export.js:7:39416
955:        alpha += a * scolor.a; tmp_js_export.js:7:39416
956:        dist += diameter * 0.5; tmp_js_export.js:7:39416
957:    } tmp_js_export.js:7:39416
958: tmp_js_export.js:7:39416
959:    if (blend_ambient) { tmp_js_export.js:7:39416
960:        color.rgb = mix(ambient, color.rgb, min(1.0, alpha / 0.95)); tmp_js_export.js:7:39416
961:    } tmp_js_export.js:7:39416
962: tmp_js_export.js:7:39416
963:    return color; tmp_js_export.js:7:39416
964: } tmp_js_export.js:7:39416
965: tmp_js_export.js:7:39416
966: void gi_probe_compute(mediump sampler3D probe, mat4 probe_xform, vec3 bounds, vec3 cell_size, vec3 pos, vec3 ambient, vec3 environment, bool blend_ambient, float multiplier, mat3 normal_mtx, vec3 ref_vec, float roughness, float p_bias, float p_normal_bias, inout vec4 out_spec, inout vec4 out_diff) { tmp_js_export.js:7:39416
967: tmp_js_export.js:7:39416
968:    vec3 probe_pos = (probe_xform * vec4(pos, 1.0)).xyz; tmp_js_export.js:7:39416
969:    vec3 ref_pos = (probe_xform * vec4(pos + ref_vec, 1.0)).xyz; tmp_js_export.js:7:39416
970:    ref_vec = normalize(ref_pos - probe_pos); tmp_js_export.js:7:39416
971: tmp_js_export.js:7:39416
972:    probe_pos += (probe_xform * vec4(normal_mtx[2], 0.0)).xyz * p_normal_bias; tmp_js_export.js:7:39416
973: tmp_js_export.js:7:39416
974:    /*  out_diff.rgb = voxel_cone_trace(probe,cell_size,probe_pos,normalize((probe_xform * vec4(ref_vec,0.0)).xyz),0.0 ,100.0); tmp_js_export.js:7:39416
975:    out_diff.a = 1.0; tmp_js_export.js:7:39416
976:    return;*/ tmp_js_export.js:7:39416
977:    //out_diff = vec4(textureLod(probe,probe_pos*cell_size,3.0).rgb,1.0); tmp_js_export.js:7:39416
978:    //return; tmp_js_export.js:7:39416
979: tmp_js_export.js:7:39416
980:    //this causes corrupted pixels, i have no idea why.. tmp_js_export.js:7:39416
981:    if (any(bvec2(any(lessThan(probe_pos, vec3(0.0))), any(greaterThan(probe_pos, bounds))))) { tmp_js_export.js:7:39416
982:        return; tmp_js_export.js:7:39416
983:    } tmp_js_export.js:7:39416
984: tmp_js_export.js:7:39416
985:    vec3 blendv = abs(probe_pos / bounds * 2.0 - 1.0); tmp_js_export.js:7:39416
986:    float blend = clamp(1.0 - max(blendv.x, max(blendv.y, blendv.z)), 0.0, 1.0); tmp_js_export.js:7:39416
987:    //float blend=1.0; tmp_js_export.js:7:39416
988: tmp_js_export.js:7:39416
989:    float max_distance = length(bounds); tmp_js_export.js:7:39416
990: tmp_js_export.js:7:39416
991:    //radiance tmp_js_export.js:7:39416
992: #ifdef VCT_QUALITY_HIGH tmp_js_export.js:7:39416
993: tmp_js_export.js:7:39416
994: #define MAX_CONE_DIRS 6 tmp_js_export.js:7:39416
995:    vec3 cone_dirs[MAX_CONE_DIRS] = vec3[]( tmp_js_export.js:7:39416
996:            vec3(0.0, 0.0, 1.0), tmp_js_export.js:7:39416
997:            vec3(0.866025, 0.0, 0.5), tmp_js_export.js:7:39416
998:            vec3(0.267617, 0.823639, 0.5), tmp_js_export.js:7:39416
999:            vec3(-0.700629, 0.509037, 0.5), tmp_js_export.js:7:39416
1000:           vec3(-0.700629, -0.509037, 0.5), tmp_js_export.js:7:39416
1001:           vec3(0.267617, -0.823639, 0.5)); tmp_js_export.js:7:39416
1002: tmp_js_export.js:7:39416
1003:   float cone_weights[MAX_CONE_DIRS] = float[](0.25, 0.15, 0.15, 0.15, 0.15, 0.15); tmp_js_export.js:7:39416
1004:   float cone_angle_tan = 0.577; tmp_js_export.js:7:39416
1005:   float min_ref_tan = 0.0; tmp_js_export.js:7:39416
1006: #else tmp_js_export.js:7:39416
1007: tmp_js_export.js:7:39416
1008: #define MAX_CONE_DIRS 4 tmp_js_export.js:7:39416
1009: tmp_js_export.js:7:39416
1010:   vec3 cone_dirs[MAX_CONE_DIRS] = vec3[]( tmp_js_export.js:7:39416
1011:           vec3(0.707107, 0.0, 0.707107), tmp_js_export.js:7:39416
1012:           vec3(0.0, 0.707107, 0.707107), tmp_js_export.js:7:39416
1013:           vec3(-0.707107, 0.0, 0.707107), tmp_js_export.js:7:39416
1014:           vec3(0.0, -0.707107, 0.707107)); tmp_js_export.js:7:39416
1015: tmp_js_export.js:7:39416
1016:   float cone_weights[MAX_CONE_DIRS] = float[](0.25, 0.25, 0.25, 0.25); tmp_js_export.js:7:39416
1017:   float cone_angle_tan = 0.98269; tmp_js_export.js:7:39416
1018:   max_distance *= 0.5; tmp_js_export.js:7:39416
1019:   float min_ref_tan = 0.2; tmp_js_export.js:7:39416
1020: tmp_js_export.js:7:39416
1021: #endif tmp_js_export.js:7:39416
1022:   vec3 light = vec3(0.0); tmp_js_export.js:7:39416
1023:   for (int i = 0; i < MAX_CONE_DIRS; i++) { tmp_js_export.js:7:39416
1024: tmp_js_export.js:7:39416
1025:       vec3 dir = normalize((probe_xform * vec4(pos + normal_mtx * cone_dirs[i], 1.0)).xyz - probe_pos); tmp_js_export.js:7:39416
1026:       light += cone_weights[i] * voxel_cone_trace(probe, cell_size, probe_pos, ambient, blend_ambient, dir, cone_angle_tan, max_distance, p_bias); tmp_js_export.js:7:39416
1027:   } tmp_js_export.js:7:39416
1028: tmp_js_export.js:7:39416
1029:   light *= multiplier; tmp_js_export.js:7:39416
1030: tmp_js_export.js:7:39416
1031:   out_diff += vec4(light * blend, blend); tmp_js_export.js:7:39416
1032: tmp_js_export.js:7:39416
1033:   //irradiance tmp_js_export.js:7:39416
1034: tmp_js_export.js:7:39416
1035:   vec3 irr_light = voxel_cone_trace(probe, cell_size, probe_pos, environment, blend_ambient, ref_vec, max(min_ref_tan, tan(roughness * 0.5 * M_PI * 0.99)), max_distance, p_bias); tmp_js_export.js:7:39416
1036: tmp_js_export.js:7:39416
1037:   irr_light *= multiplier; tmp_js_export.js:7:39416
1038:   //irr_light=vec3(0.0); tmp_js_export.js:7:39416
1039: tmp_js_export.js:7:39416
1040:   out_spec += vec4(irr_light * blend, blend); tmp_js_export.js:7:39416
1041: } tmp_js_export.js:7:39416
1042: tmp_js_export.js:7:39416
1043: void gi_probes_compute(vec3 pos, vec3 normal, float roughness, inout vec3 out_specular, inout vec3 out_ambient) { tmp_js_export.js:7:39416
1044: tmp_js_export.js:7:39416
1045:   roughness = roughness * roughness; tmp_js_export.js:7:39416
1046: tmp_js_export.js:7:39416
1047:   vec3 ref_vec = normalize(reflect(normalize(pos), normal)); tmp_js_export.js:7:39416
1048: tmp_js_export.js:7:39416
1049:   //find arbitrary tangent and bitangent, then build a matrix tmp_js_export.js:7:39416
1050:   vec3 v0 = abs(normal.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(0.0, 1.0, 0.0); tmp_js_export.js:7:39416
1051:   vec3 tangent = normalize(cross(v0, normal)); tmp_js_export.js:7:39416
1052:   vec3 bitangent = normalize(cross(tangent, normal)); tmp_js_export.js:7:39416
1053:   mat3 normal_mat = mat3(tangent, bitangent, normal); tmp_js_export.js:7:39416
1054: tmp_js_export.js:7:39416
1055:   vec4 diff_accum = vec4(0.0); tmp_js_export.js:7:39416
1056:   vec4 spec_accum = vec4(0.0); tmp_js_export.js:7:39416
1057: tmp_js_export.js:7:39416
1058:   vec3 ambient = out_ambient; tmp_js_export.js:7:39416
1059:   out_ambient = vec3(0.0); tmp_js_export.js:7:39416
1060: tmp_js_export.js:7:39416
1061:   vec3 environment = out_specular; tmp_js_export.js:7:39416
1062: tmp_js_export.js:7:39416
1063:   out_specular = vec3(0.0); tmp_js_export.js:7:39416
1064: tmp_js_export.js:7:39416
1065:   gi_probe_compute(gi_probe1, gi_probe_xform1, gi_probe_bounds1, gi_probe_cell_size1, pos, ambient, environment, gi_probe_blend_ambient1, gi_probe_multiplier1, normal_mat, ref_vec, roughness, gi_probe_bias1, gi_probe_normal_bias1, spec_accum, diff_accum); tmp_js_export.js:7:39416
1066: tmp_js_export.js:7:39416
1067:   if (gi_probe2_enabled) { tmp_js_export.js:7:39416
1068: tmp_js_export.js:7:39416
1069:       gi_probe_compute(gi_probe2, gi_probe_xform2, gi_probe_bounds2, gi_probe_cell_size2, pos, ambient, environment, gi_probe_blend_ambient2, gi_probe_multiplier2, normal_mat, ref_vec, roughness, gi_probe_bias2, gi_probe_normal_bias2, spec_accum, diff_accum); tmp_js_export.js:7:39416
1070:   } tmp_js_export.js:7:39416
1071: tmp_js_export.js:7:39416
1072:   if (diff_accum.a > 0.0) { tmp_js_export.js:7:39416
1073:       diff_accum.rgb /= diff_accum.a; tmp_js_export.js:7:39416
1074:   } tmp_js_export.js:7:39416
1075: tmp_js_export.js:7:39416
1076:   if (spec_accum.a > 0.0) { tmp_js_export.js:7:39416
1077:       spec_accum.rgb /= spec_accum.a; tmp_js_export.js:7:39416
1078:   } tmp_js_export.js:7:39416
1079: tmp_js_export.js:7:39416
1080:   out_specular += spec_accum.rgb; tmp_js_export.js:7:39416
1081:   out_ambient += diff_accum.rgb; tmp_js_export.js:7:39416
1082: } tmp_js_export.js:7:39416
1083: tmp_js_export.js:7:39416
1084: #endif tmp_js_export.js:7:39416
1085: tmp_js_export.js:7:39416
1086: void main() { tmp_js_export.js:7:39416
1087: tmp_js_export.js:7:39416
1088: #ifdef RENDER_DEPTH_DUAL_PARABOLOID tmp_js_export.js:7:39416
1089: tmp_js_export.js:7:39416
1090:   if (dp_clip > 0.0) tmp_js_export.js:7:39416
1091:       discard; tmp_js_export.js:7:39416
1092: #endif tmp_js_export.js:7:39416
1093: tmp_js_export.js:7:39416
1094:   //lay out everything, whathever is unused is optimized away anyway tmp_js_export.js:7:39416
1095:   highp vec3 vertex = vertex_interp; tmp_js_export.js:7:39416
1096:   vec3 view = -normalize(vertex_interp); tmp_js_export.js:7:39416
1097:   vec3 albedo = vec3(1.0); tmp_js_export.js:7:39416
1098:   vec3 transmission = vec3(0.0); tmp_js_export.js:7:39416
1099:   float metallic = 0.0; tmp_js_export.js:7:39416
1100:   float specular = 0.5; tmp_js_export.js:7:39416
1101:   vec3 emission = vec3(0.0); tmp_js_export.js:7:39416
1102:   float roughness = 1.0; tmp_js_export.js:7:39416
1103:   float rim = 0.0; tmp_js_export.js:7:39416
1104:   float rim_tint = 0.0; tmp_js_export.js:7:39416
1105:   float clearcoat = 0.0; tmp_js_export.js:7:39416
1106:   float clearcoat_gloss = 0.0; tmp_js_export.js:7:39416
1107:   float anisotropy = 0.0; tmp_js_export.js:7:39416
1108:   vec2 anisotropy_flow = vec2(1.0, 0.0); tmp_js_export.js:7:39416
1109: tmp_js_export.js:7:39416
1110: #if defined(ENABLE_AO) tmp_js_export.js:7:39416
1111:   float ao = 1.0; tmp_js_export.js:7:39416
1112:   float ao_light_affect = 0.0; tmp_js_export.js:7:39416
1113: #endif tmp_js_export.js:7:39416
1114: tmp_js_export.js:7:39416
1115:   float alpha = 1.0; tmp_js_export.js:7:39416
1116: tmp_js_export.js:7:39416
1117: #if defined(ALPHA_SCISSOR_USED) tmp_js_export.js:7:39416
1118:   float alpha_scissor = 0.5; tmp_js_export.js:7:39416
1119: #endif tmp_js_export.js:7:39416
1120: tmp_js_export.js:7:39416
1121: #if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY) tmp_js_export.js:7:39416
1122:   vec3 binormal = normalize(binormal_interp); tmp_js_export.js:7:39416
1123:   vec3 tangent = normalize(tangent_interp); tmp_js_export.js:7:39416
1124: #else tmp_js_export.js:7:39416
1125:   vec3 binormal = vec3(0.0); tmp_js_export.js:7:39416
1126:   vec3 tangent = vec3(0.0); tmp_js_export.js:7:39416
1127: #endif tmp_js_export.js:7:39416
1128:   vec3 normal = normalize(normal_interp); tmp_js_export.js:7:39416
1129: tmp_js_export.js:7:39416
1130: #if defined(DO_SIDE_CHECK) tmp_js_export.js:7:39416
1131:   if (!gl_FrontFacing) { tmp_js_export.js:7:39416
1132:       normal = -normal; tmp_js_export.js:7:39416
1133:   } tmp_js_export.js:7:39416
1134: #endif tmp_js_export.js:7:39416
1135: tmp_js_export.js:7:39416
1136: #if defined(ENABLE_UV_INTERP) tmp_js_export.js:7:39416
1137:   vec2 uv = uv_interp; tmp_js_export.js:7:39416
1138: #endif tmp_js_export.js:7:39416
1139: tmp_js_export.js:7:39416
1140: #if defined(ENABLE_UV2_INTERP) || defined(USE_LIGHTMAP) tmp_js_export.js:7:39416
1141:   vec2 uv2 = uv2_interp; tmp_js_export.js:7:39416
1142: #endif tmp_js_export.js:7:39416
1143: tmp_js_export.js:7:39416
1144: #if defined(ENABLE_COLOR_INTERP) tmp_js_export.js:7:39416
1145:   vec4 color = color_interp; tmp_js_export.js:7:39416
1146: #endif tmp_js_export.js:7:39416
1147: tmp_js_export.js:7:39416
1148: #if defined(ENABLE_NORMALMAP) tmp_js_export.js:7:39416
1149: tmp_js_export.js:7:39416
1150:   vec3 normalmap = vec3(0.5); tmp_js_export.js:7:39416
1151: #endif tmp_js_export.js:7:39416
1152: tmp_js_export.js:7:39416
1153:   float normaldepth = 1.0; tmp_js_export.js:7:39416
1154: tmp_js_export.js:7:39416
1155: #if defined(SCREEN_UV_USED) tmp_js_export.js:7:39416
1156:   vec2 screen_uv = gl_FragCoord.xy * screen_pixel_size; tmp_js_export.js:7:39416
1157: #endif tmp_js_export.js:7:39416
1158: tmp_js_export.js:7:39416
1159: #if defined(ENABLE_SSS) tmp_js_export.js:7:39416
1160:   float sss_strength = 0.0; tmp_js_export.js:7:39416
1161: #endif tmp_js_export.js:7:39416
1162: tmp_js_export.js:7:39416
1163:   { tmp_js_export.js:7:39416
1164:       /* clang-format off */ tmp_js_export.js:7:39416
1165:   { tmp_js_export.js:7:39416
1166:       vec2 m_base_uv=uv_interp; tmp_js_export.js:7:39416
1167:       vec4 m_albedo_tex=texture(m_texture_albedo, m_base_uv); tmp_js_export.js:7:39416
1168:       albedo=(m_albedo.rgb*m_albedo_tex.rgb); tmp_js_export.js:7:39416
1169:       float m_metallic_tex=dot(texture(m_texture_metallic, m_base_uv), m_metallic_texture_channel); tmp_js_export.js:7:39416
1170:       metallic=(m_metallic_tex*m_metallic); tmp_js_export.js:7:39416
1171:       float m_roughness_tex=dot(texture(m_texture_roughness, m_base_uv), m_roughness_texture_channel); tmp_js_export.js:7:39416
1172:       roughness=(m_roughness_tex*m_roughness); tmp_js_export.js:7:39416
1173:       specular=m_specular; tmp_js_export.js:7:39416
1174:       normalmap=texture(m_texture_normal, m_base_uv).rgb; tmp_js_export.js:7:39416
1175:       normaldepth=m_normal_scale; tmp_js_export.js:7:39416
1176:       vec3 m_transmission_tex=texture(m_texture_transmission, m_base_uv).rgb; tmp_js_export.js:7:39416
1177:       transmission=(m_transmission.rgb+m_transmission_tex); tmp_js_export.js:7:39416
1178:       vec4 m_detail_tex=texture(m_texture_detail_albedo, m_base_uv); tmp_js_export.js:7:39416
1179:       vec4 m_detail_norm_tex=texture(m_texture_detail_normal, m_base_uv); tmp_js_export.js:7:39416
1180:       vec4 m_detail_mask_tex=texture(m_texture_detail_mask, m_base_uv); tmp_js_export.js:7:39416
1181:       vec3 m_detail=mix(albedo.rgb, (albedo.rgb*m_detail_tex.rgb), m_detail_tex.a); tmp_js_export.js:7:39416
1182:       vec3 m_detail_norm=mix(normalmap, m_detail_norm_tex.rgb, m_detail_tex.a); tmp_js_export.js:7:39416
1183:       normalmap=mix(normalmap, m_detail_norm, m_detail_mask_tex.r); tmp_js_export.js:7:39416
1184:       albedo.rgb=mix(albedo.rgb, m_detail, m_detail_mask_tex.r); tmp_js_export.js:7:39416
1185:   } tmp_js_export.js:7:39416
1186: tmp_js_export.js:7:39416
1187: tmp_js_export.js:7:39416
1188:       /* clang-format on */ tmp_js_export.js:7:39416
1189:   } tmp_js_export.js:7:39416
1190: tmp_js_export.js:7:39416
1191: #if !defined(USE_SHADOW_TO_OPACITY) tmp_js_export.js:7:39416
1192: tmp_js_export.js:7:39416
1193: #if defined(ALPHA_SCISSOR_USED) tmp_js_export.js:7:39416
1194:   if (alpha < alpha_scissor) { tmp_js_export.js:7:39416
1195:       discard; tmp_js_export.js:7:39416
1196:   } tmp_js_export.js:7:39416
1197: #endif // ALPHA_SCISSOR_USED tmp_js_export.js:7:39416
1198: tmp_js_export.js:7:39416
1199: #ifdef USE_OPAQUE_PREPASS tmp_js_export.js:7:39416
1200: tmp_js_export.js:7:39416
1201:   if (alpha < opaque_prepass_threshold) { tmp_js_export.js:7:39416
1202:       discard; tmp_js_export.js:7:39416
1203:   } tmp_js_export.js:7:39416
1204: tmp_js_export.js:7:39416
1205: #endif // USE_OPAQUE_PREPASS tmp_js_export.js:7:39416
1206: tmp_js_export.js:7:39416
1207: #endif // !USE_SHADOW_TO_OPACITY tmp_js_export.js:7:39416
1208: tmp_js_export.js:7:39416
1209: #if defined(ENABLE_NORMALMAP) tmp_js_export.js:7:39416
1210: tmp_js_export.js:7:39416
1211:   normalmap.xy = normalmap.xy * 2.0 - 1.0; tmp_js_export.js:7:39416
1212:   normalmap.z = sqrt(max(0.0, 1.0 - dot(normalmap.xy, normalmap.xy))); //always ignore Z, as it can be RG packed, Z may be pos/neg, etc. tmp_js_export.js:7:39416
1213: tmp_js_export.js:7:39416
1214:   normal = normalize(mix(normal, tangent * normalmap.x + binormal * normalmap.y + normal * normalmap.z, normaldepth)); tmp_js_export.js:7:39416
1215: tmp_js_export.js:7:39416
1216: #endif tmp_js_export.js:7:39416
1217: tmp_js_export.js:7:39416
1218: #if defined(LIGHT_USE_ANISOTROPY) tmp_js_export.js:7:39416
1219: tmp_js_export.js:7:39416
1220:   if (anisotropy > 0.01) { tmp_js_export.js:7:39416
1221:       //rotation matrix tmp_js_export.js:7:39416
1222:       mat3 rot = mat3(tangent, binormal, normal); tmp_js_export.js:7:39416
1223:       //make local to space tmp_js_export.js:7:39416
1224:       tangent = normalize(rot * vec3(anisotropy_flow.x, anisotropy_flow.y, 0.0)); tmp_js_export.js:7:39416
1225:       binormal = normalize(rot * vec3(-anisotropy_flow.y, anisotropy_flow.x, 0.0)); tmp_js_export.js:7:39416
1226:   } tmp_js_export.js:7:39416
1227: tmp_js_export.js:7:39416
1228: #endif tmp_js_export.js:7:39416
1229: tmp_js_export.js:7:39416
1230: #ifdef ENABLE_CLIP_ALPHA tmp_js_export.js:7:39416
1231:   if (albedo.a < 0.99) { tmp_js_export.js:7:39416
1232:       //used for doublepass and shadowmapping tmp_js_export.js:7:39416
1233:       discard; tmp_js_export.js:7:39416
1234:   } tmp_js_export.js:7:39416
1235: #endif tmp_js_export.js:7:39416
1236: tmp_js_export.js:7:39416
1237:   /////////////////////// LIGHTING ////////////////////////////// tmp_js_export.js:7:39416
1238: tmp_js_export.js:7:39416
1239:   //apply energy conservation tmp_js_export.js:7:39416
1240: tmp_js_export.js:7:39416
1241: #ifdef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1242: tmp_js_export.js:7:39416
1243:   vec3 specular_light = specular_light_interp.rgb; tmp_js_export.js:7:39416
1244:   vec3 diffuse_light = diffuse_light_interp.rgb; tmp_js_export.js:7:39416
1245: #else tmp_js_export.js:7:39416
1246: tmp_js_export.js:7:39416
1247:   vec3 specular_light = vec3(0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1248:   vec3 diffuse_light = vec3(0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1249: tmp_js_export.js:7:39416
1250: #endif tmp_js_export.js:7:39416
1251: tmp_js_export.js:7:39416
1252:   vec3 ambient_light; tmp_js_export.js:7:39416
1253:   vec3 env_reflection_light = vec3(0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1254: tmp_js_export.js:7:39416
1255:   vec3 eye_vec = view; tmp_js_export.js:7:39416
1256: tmp_js_export.js:7:39416
1257: #ifdef USE_RADIANCE_MAP tmp_js_export.js:7:39416
1258: tmp_js_export.js:7:39416
1259: #ifdef AMBIENT_LIGHT_DISABLED tmp_js_export.js:7:39416
1260:   ambient_light = vec3(0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1261: #else tmp_js_export.js:7:39416
1262:   { tmp_js_export.js:7:39416
1263: tmp_js_export.js:7:39416
1264:       { //read radiance from dual paraboloid tmp_js_export.js:7:39416
1265: tmp_js_export.js:7:39416
1266:           vec3 ref_vec = reflect(-eye_vec, normal); //2.0 * ndotv * normal - view; // reflect(v, n); tmp_js_export.js:7:39416
1267:           ref_vec = normalize((radiance_inverse_xform * vec4(ref_vec, 0.0)).xyz); tmp_js_export.js:7:39416
1268:           vec3 radiance = textureDualParaboloid(radiance_map, ref_vec, roughness) * bg_energy; tmp_js_export.js:7:39416
1269:           env_reflection_light = radiance; tmp_js_export.js:7:39416
1270:       } tmp_js_export.js:7:39416
1271:       //no longer a cubemap tmp_js_export.js:7:39416
1272:       //vec3 radiance = textureLod(radiance_cube, r, lod).xyz * ( brdf.x + brdf.y); tmp_js_export.js:7:39416
1273:   } tmp_js_export.js:7:39416
1274: #ifndef USE_LIGHTMAP tmp_js_export.js:7:39416
1275:   { tmp_js_export.js:7:39416
1276: tmp_js_export.js:7:39416
1277:       vec3 ambient_dir = normalize((radiance_inverse_xform * vec4(normal, 0.0)).xyz); tmp_js_export.js:7:39416
1278:       vec3 env_ambient = textureDualParaboloid(radiance_map, ambient_dir, 1.0) * bg_energy; tmp_js_export.js:7:39416
1279: tmp_js_export.js:7:39416
1280:       ambient_light = mix(ambient_light_color.rgb, env_ambient, radiance_ambient_contribution); tmp_js_export.js:7:39416
1281:       //ambient_light=vec3(0.0,0.0,0.0); tmp_js_export.js:7:39416
1282:   } tmp_js_export.js:7:39416
1283: #endif tmp_js_export.js:7:39416
1284: #endif //AMBIENT_LIGHT_DISABLED tmp_js_export.js:7:39416
1285: tmp_js_export.js:7:39416
1286: #else tmp_js_export.js:7:39416
1287: tmp_js_export.js:7:39416
1288: #ifdef AMBIENT_LIGHT_DISABLED tmp_js_export.js:7:39416
1289:   ambient_light = vec3(0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1290: #else tmp_js_export.js:7:39416
1291:   ambient_light = ambient_light_color.rgb; tmp_js_export.js:7:39416
1292:   env_reflection_light = bg_color.rgb * bg_energy; tmp_js_export.js:7:39416
1293: #endif //AMBIENT_LIGHT_DISABLED tmp_js_export.js:7:39416
1294: tmp_js_export.js:7:39416
1295: #endif tmp_js_export.js:7:39416
1296: tmp_js_export.js:7:39416
1297:   ambient_light *= ambient_energy; tmp_js_export.js:7:39416
1298: tmp_js_export.js:7:39416
1299:   float specular_blob_intensity = 1.0; tmp_js_export.js:7:39416
1300: tmp_js_export.js:7:39416
1301: #if defined(SPECULAR_TOON) tmp_js_export.js:7:39416
1302:   specular_blob_intensity *= specular * 2.0; tmp_js_export.js:7:39416
1303: #endif tmp_js_export.js:7:39416
1304: tmp_js_export.js:7:39416
1305: #ifdef USE_GI_PROBES tmp_js_export.js:7:39416
1306:   gi_probes_compute(vertex, normal, roughness, env_reflection_light, ambient_light); tmp_js_export.js:7:39416
1307: tmp_js_export.js:7:39416
1308: #endif tmp_js_export.js:7:39416
1309: tmp_js_export.js:7:39416
1310: #ifdef USE_LIGHTMAP tmp_js_export.js:7:39416
1311:   ambient_light = texture(lightmap, uv2).rgb * lightmap_energy; tmp_js_export.js:7:39416
1312: #endif tmp_js_export.js:7:39416
1313: tmp_js_export.js:7:39416
1314: #ifdef USE_LIGHTMAP_CAPTURE tmp_js_export.js:7:39416
1315:   { tmp_js_export.js:7:39416
1316:       vec3 cone_dirs[12] = vec3[]( tmp_js_export.js:7:39416
1317:               vec3(0.0, 0.0, 1.0), tmp_js_export.js:7:39416
1318:               vec3(0.866025, 0.0, 0.5), tmp_js_export.js:7:39416
1319:               vec3(0.267617, 0.823639, 0.5), tmp_js_export.js:7:39416
1320:               vec3(-0.700629, 0.509037, 0.5), tmp_js_export.js:7:39416
1321:               vec3(-0.700629, -0.509037, 0.5), tmp_js_export.js:7:39416
1322:               vec3(0.267617, -0.823639, 0.5), tmp_js_export.js:7:39416
1323:               vec3(0.0, 0.0, -1.0), tmp_js_export.js:7:39416
1324:               vec3(0.866025, 0.0, -0.5), tmp_js_export.js:7:39416
1325:               vec3(0.267617, 0.823639, -0.5), tmp_js_export.js:7:39416
1326:               vec3(-0.700629, 0.509037, -0.5), tmp_js_export.js:7:39416
1327:               vec3(-0.700629, -0.509037, -0.5), tmp_js_export.js:7:39416
1328:               vec3(0.267617, -0.823639, -0.5)); tmp_js_export.js:7:39416
1329: tmp_js_export.js:7:39416
1330:       vec3 local_normal = normalize(camera_matrix * vec4(normal, 0.0)).xyz; tmp_js_export.js:7:39416
1331:       vec4 captured = vec4(0.0); tmp_js_export.js:7:39416
1332:       float sum = 0.0; tmp_js_export.js:7:39416
1333:       for (int i = 0; i < 12; i++) { tmp_js_export.js:7:39416
1334:           float amount = max(0.0, dot(local_normal, cone_dirs[i])); //not correct, but creates a nice wrap around effect tmp_js_export.js:7:39416
1335:           captured += lightmap_captures[i] * amount; tmp_js_export.js:7:39416
1336:           sum += amount; tmp_js_export.js:7:39416
1337:       } tmp_js_export.js:7:39416
1338: tmp_js_export.js:7:39416
1339:       captured /= sum; tmp_js_export.js:7:39416
1340: tmp_js_export.js:7:39416
1341:       if (lightmap_capture_sky) { tmp_js_export.js:7:39416
1342:           ambient_light = mix(ambient_light, captured.rgb, captured.a); tmp_js_export.js:7:39416
1343:       } else { tmp_js_export.js:7:39416
1344:           ambient_light = captured.rgb; tmp_js_export.js:7:39416
1345:       } tmp_js_export.js:7:39416
1346:   } tmp_js_export.js:7:39416
1347: #endif tmp_js_export.js:7:39416
1348: tmp_js_export.js:7:39416
1349: #ifdef USE_FORWARD_LIGHTING tmp_js_export.js:7:39416
1350: tmp_js_export.js:7:39416
1351:   highp vec4 reflection_accum = vec4(0.0, 0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1352:   highp vec4 ambient_accum = vec4(0.0, 0.0, 0.0, 0.0); tmp_js_export.js:7:39416
1353:   for (int i = 0; i < reflection_count; i++) { tmp_js_export.js:7:39416
1354:       reflection_process(reflection_indices[i], vertex, normal, binormal, tangent, roughness, anisotropy, ambient_light, env_reflection_light, reflection_accum, ambient_accum); tmp_js_export.js:7:39416
1355:   } tmp_js_export.js:7:39416
1356: tmp_js_export.js:7:39416
1357:   if (reflection_accum.a > 0.0) { tmp_js_export.js:7:39416
1358:       specular_light += reflection_accum.rgb / reflection_accum.a; tmp_js_export.js:7:39416
1359:   } else { tmp_js_export.js:7:39416
1360:       specular_light += env_reflection_light; tmp_js_export.js:7:39416
1361:   } tmp_js_export.js:7:39416
1362: #if !defined(USE_LIGHTMAP) && !defined(USE_LIGHTMAP_CAPTURE) tmp_js_export.js:7:39416
1363:   if (ambient_accum.a > 0.0) { tmp_js_export.js:7:39416
1364:       ambient_light = ambient_accum.rgb / ambient_accum.a; tmp_js_export.js:7:39416
1365:   } tmp_js_export.js:7:39416
1366: #endif tmp_js_export.js:7:39416
1367: #endif tmp_js_export.js:7:39416
1368: tmp_js_export.js:7:39416
1369:   { tmp_js_export.js:7:39416
1370: tmp_js_export.js:7:39416
1371: #if defined(DIFFUSE_TOON) tmp_js_export.js:7:39416
1372:       //simplify for toon, as tmp_js_export.js:7:39416
1373:       specular_light *= specular * metallic * albedo * 2.0; tmp_js_export.js:7:39416
1374: #else tmp_js_export.js:7:39416
1375: tmp_js_export.js:7:39416
1376:       // scales the specular reflections, needs to be be computed before lighting happens, tmp_js_export.js:7:39416
1377:       // but after environment, GI, and reflection probes are added tmp_js_export.js:7:39416
1378:       // Environment brdf approximation (Lazarov 2013) tmp_js_export.js:7:39416
1379:       // see https://www.unrealengine.com/en-US/blog/physically-based-shading-on-mobile tmp_js_export.js:7:39416
1380:       const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022); tmp_js_export.js:7:39416
1381:       const vec4 c1 = vec4(1.0, 0.0425, 1.04, -0.04); tmp_js_export.js:7:39416
1382:       vec4 r = roughness * c0 + c1; tmp_js_export.js:7:39416
1383:       float ndotv = clamp(dot(normal, eye_vec), 0.0, 1.0); tmp_js_export.js:7:39416
1384:       float a004 = min(r.x * r.x, exp2(-9.28 * ndotv)) * r.x + r.y; tmp_js_export.js:7:39416
1385:       vec2 env = vec2(-1.04, 1.04) * a004 + r.zw; tmp_js_export.js:7:39416
1386: tmp_js_export.js:7:39416
1387:       vec3 f0 = F0(metallic, specular, albedo); tmp_js_export.js:7:39416
1388:       specular_light *= env.x * f0 + env.y; tmp_js_export.js:7:39416
1389: #endif tmp_js_export.js:7:39416
1390:   } tmp_js_export.js:7:39416
1391: tmp_js_export.js:7:39416
1392: #if defined(USE_LIGHT_DIRECTIONAL) tmp_js_export.js:7:39416
1393: tmp_js_export.js:7:39416
1394:   vec3 light_attenuation = vec3(1.0); tmp_js_export.js:7:39416
1395: tmp_js_export.js:7:39416
1396:   float depth_z = -vertex.z; tmp_js_export.js:7:39416
1397: #ifdef LIGHT_DIRECTIONAL_SHADOW tmp_js_export.js:7:39416
1398: #if !defined(SHADOWS_DISABLED) tmp_js_export.js:7:39416
1399: tmp_js_export.js:7:39416
1400: #ifdef LIGHT_USE_PSSM4 tmp_js_export.js:7:39416
1401:   if (depth_z < shadow_split_offsets.w) { tmp_js_export.js:7:39416
1402: #elif defined(LIGHT_USE_PSSM2) tmp_js_export.js:7:39416
1403:   if (depth_z < shadow_split_offsets.y) { tmp_js_export.js:7:39416
1404: #else tmp_js_export.js:7:39416
1405:   if (depth_z < shadow_split_offsets.x) { tmp_js_export.js:7:39416
1406: #endif //LIGHT_USE_PSSM4 tmp_js_export.js:7:39416
1407: tmp_js_export.js:7:39416
1408:       vec3 pssm_coord; tmp_js_export.js:7:39416
1409:       float pssm_fade = 0.0; tmp_js_export.js:7:39416
1410: tmp_js_export.js:7:39416
1411: #ifdef LIGHT_USE_PSSM_BLEND tmp_js_export.js:7:39416
1412:       float pssm_blend; tmp_js_export.js:7:39416
1413:       vec3 pssm_coord2; tmp_js_export.js:7:39416
1414:       bool use_blend = true; tmp_js_export.js:7:39416
1415: #endif tmp_js_export.js:7:39416
1416: tmp_js_export.js:7:39416
1417: #ifdef LIGHT_USE_PSSM4 tmp_js_export.js:7:39416
1418: tmp_js_export.js:7:39416
1419:       if (depth_z < shadow_split_offsets.y) { tmp_js_export.js:7:39416
1420: tmp_js_export.js:7:39416
1421:           if (depth_z < shadow_split_offsets.x) { tmp_js_export.js:7:39416
1422: tmp_js_export.js:7:39416
1423:               highp vec4 splane = (shadow_matrix1 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1424:               pssm_coord = splane.xyz / splane.w; tmp_js_export.js:7:39416
1425: tmp_js_export.js:7:39416
1426: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1427: tmp_js_export.js:7:39416
1428:               splane = (shadow_matrix2 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1429:               pssm_coord2 = splane.xyz / splane.w; tmp_js_export.js:7:39416
1430:               pssm_blend = smoothstep(0.0, shadow_split_offsets.x, depth_z); tmp_js_export.js:7:39416
1431: #endif tmp_js_export.js:7:39416
1432: tmp_js_export.js:7:39416
1433:           } else { tmp_js_export.js:7:39416
1434: tmp_js_export.js:7:39416
1435:               highp vec4 splane = (shadow_matrix2 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1436:               pssm_coord = splane.xyz / splane.w; tmp_js_export.js:7:39416
1437: tmp_js_export.js:7:39416
1438: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1439:               splane = (shadow_matrix3 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1440:               pssm_coord2 = splane.xyz / splane.w; tmp_js_export.js:7:39416
1441:               pssm_blend = smoothstep(shadow_split_offsets.x, shadow_split_offsets.y, depth_z); tmp_js_export.js:7:39416
1442: #endif tmp_js_export.js:7:39416
1443:           } tmp_js_export.js:7:39416
1444:       } else { tmp_js_export.js:7:39416
1445: tmp_js_export.js:7:39416
1446:           if (depth_z < shadow_split_offsets.z) { tmp_js_export.js:7:39416
1447: tmp_js_export.js:7:39416
1448:               highp vec4 splane = (shadow_matrix3 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1449:               pssm_coord = splane.xyz / splane.w; tmp_js_export.js:7:39416
1450: tmp_js_export.js:7:39416
1451: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1452:               splane = (shadow_matrix4 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1453:               pssm_coord2 = splane.xyz / splane.w; tmp_js_export.js:7:39416
1454:               pssm_blend = smoothstep(shadow_split_offsets.y, shadow_split_offsets.z, depth_z); tmp_js_export.js:7:39416
1455: #endif tmp_js_export.js:7:39416
1456: tmp_js_export.js:7:39416
1457:           } else { tmp_js_export.js:7:39416
1458: tmp_js_export.js:7:39416
1459:               highp vec4 splane = (shadow_matrix4 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1460:               pssm_coord = splane.xyz / splane.w; tmp_js_export.js:7:39416
1461:               pssm_fade = smoothstep(shadow_split_offsets.z, shadow_split_offsets.w, depth_z); tmp_js_export.js:7:39416
1462: tmp_js_export.js:7:39416
1463: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1464:               use_blend = false; tmp_js_export.js:7:39416
1465: tmp_js_export.js:7:39416
1466: #endif tmp_js_export.js:7:39416
1467:           } tmp_js_export.js:7:39416
1468:       } tmp_js_export.js:7:39416
1469: tmp_js_export.js:7:39416
1470: #endif //LIGHT_USE_PSSM4 tmp_js_export.js:7:39416
1471: tmp_js_export.js:7:39416
1472: #ifdef LIGHT_USE_PSSM2 tmp_js_export.js:7:39416
1473: tmp_js_export.js:7:39416
1474:       if (depth_z < shadow_split_offsets.x) { tmp_js_export.js:7:39416
1475: tmp_js_export.js:7:39416
1476:           highp vec4 splane = (shadow_matrix1 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1477:           pssm_coord = splane.xyz / splane.w; tmp_js_export.js:7:39416
1478: tmp_js_export.js:7:39416
1479: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1480: tmp_js_export.js:7:39416
1481:           splane = (shadow_matrix2 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1482:           pssm_coord2 = splane.xyz / splane.w; tmp_js_export.js:7:39416
1483:           pssm_blend = smoothstep(0.0, shadow_split_offsets.x, depth_z); tmp_js_export.js:7:39416
1484: #endif tmp_js_export.js:7:39416
1485: tmp_js_export.js:7:39416
1486:       } else { tmp_js_export.js:7:39416
1487:           highp vec4 splane = (shadow_matrix2 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1488:           pssm_coord = splane.xyz / splane.w; tmp_js_export.js:7:39416
1489:           pssm_fade = smoothstep(shadow_split_offsets.x, shadow_split_offsets.y, depth_z); tmp_js_export.js:7:39416
1490: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1491:           use_blend = false; tmp_js_export.js:7:39416
1492: tmp_js_export.js:7:39416
1493: #endif tmp_js_export.js:7:39416
1494:       } tmp_js_export.js:7:39416
1495: tmp_js_export.js:7:39416
1496: #endif //LIGHT_USE_PSSM2 tmp_js_export.js:7:39416
1497: tmp_js_export.js:7:39416
1498: #if !defined(LIGHT_USE_PSSM4) && !defined(LIGHT_USE_PSSM2) tmp_js_export.js:7:39416
1499:       { //regular orthogonal tmp_js_export.js:7:39416
1500:           highp vec4 splane = (shadow_matrix1 * vec4(vertex, 1.0)); tmp_js_export.js:7:39416
1501:           pssm_coord = splane.xyz / splane.w; tmp_js_export.js:7:39416
1502:       } tmp_js_export.js:7:39416
1503: #endif tmp_js_export.js:7:39416
1504: tmp_js_export.js:7:39416
1505:       //one one sample tmp_js_export.js:7:39416
1506: tmp_js_export.js:7:39416
1507:       float shadow = sample_shadow(directional_shadow, directional_shadow_pixel_size, pssm_coord.xy, pssm_coord.z, light_clamp); tmp_js_export.js:7:39416
1508: tmp_js_export.js:7:39416
1509: #if defined(LIGHT_USE_PSSM_BLEND) tmp_js_export.js:7:39416
1510: tmp_js_export.js:7:39416
1511:       if (use_blend) { tmp_js_export.js:7:39416
1512:           shadow = mix(shadow, sample_shadow(directional_shadow, directional_shadow_pixel_size, pssm_coord2.xy, pssm_coord2.z, light_clamp), pssm_blend); tmp_js_export.js:7:39416
1513:       } tmp_js_export.js:7:39416
1514: #endif tmp_js_export.js:7:39416
1515: tmp_js_export.js:7:39416
1516: #ifdef USE_CONTACT_SHADOWS tmp_js_export.js:7:39416
1517:       if (shadow > 0.01 && shadow_color_contact.a > 0.0) { tmp_js_export.js:7:39416
1518: tmp_js_export.js:7:39416
1519:           float contact_shadow = contact_shadow_compute(vertex, -light_direction_attenuation.xyz, shadow_color_contact.a); tmp_js_export.js:7:39416
1520:           shadow = min(shadow, contact_shadow); tmp_js_export.js:7:39416
1521:       } tmp_js_export.js:7:39416
1522: #endif tmp_js_export.js:7:39416
1523:       light_attenuation = mix(mix(shadow_color_contact.rgb, vec3(1.0), shadow), vec3(1.0), pssm_fade); tmp_js_export.js:7:39416
1524:   } tmp_js_export.js:7:39416
1525: tmp_js_export.js:7:39416
1526: #endif // !defined(SHADOWS_DISABLED) tmp_js_export.js:7:39416
1527: #endif //LIGHT_DIRECTIONAL_SHADOW tmp_js_export.js:7:39416
1528: tmp_js_export.js:7:39416
1529: #ifdef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1530:   diffuse_light *= mix(vec3(1.0), light_attenuation, diffuse_light_interp.a); tmp_js_export.js:7:39416
1531:   specular_light *= mix(vec3(1.0), light_attenuation, specular_light_interp.a); tmp_js_export.js:7:39416
1532: tmp_js_export.js:7:39416
1533: #else tmp_js_export.js:7:39416
1534:   light_compute(normal, -light_direction_attenuation.xyz, eye_vec, binormal, tangent, light_color_energy.rgb, light_attenuation, albedo, transmission, light_params.z * specular_blob_intensity, roughness, metallic, specular, rim, rim_tint, clearcoat, clearcoat_gloss, anisotropy, diffuse_light, specular_light, alpha); tmp_js_export.js:7:39416
1535: #endif tmp_js_export.js:7:39416
1536: tmp_js_export.js:7:39416
1537: #endif //#USE_LIGHT_DIRECTIONAL tmp_js_export.js:7:39416
1538: tmp_js_export.js:7:39416
1539: #ifdef USE_FORWARD_LIGHTING tmp_js_export.js:7:39416
1540: tmp_js_export.js:7:39416
1541: #ifdef USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1542: tmp_js_export.js:7:39416
1543:   diffuse_light *= albedo; tmp_js_export.js:7:39416
1544: #else tmp_js_export.js:7:39416
1545: tmp_js_export.js:7:39416
1546:   for (int i = 0; i < omni_light_count; i++) { tmp_js_export.js:7:39416
1547:       light_process_omni(omni_light_indices[i], vertex, eye_vec, normal, binormal, tangent, albedo, transmission, roughness, metallic, specular, rim, rim_tint, clearcoat, clearcoat_gloss, anisotropy, specular_blob_intensity, diffuse_light, specular_light, alpha); tmp_js_export.js:7:39416
1548:   } tmp_js_export.js:7:39416
1549: tmp_js_export.js:7:39416
1550:   for (int i = 0; i < spot_light_count; i++) { tmp_js_export.js:7:39416
1551:       light_process_spot(spot_light_indices[i], vertex, eye_vec, normal, binormal, tangent, albedo, transmission, roughness, metallic, specular, rim, rim_tint, clearcoat, clearcoat_gloss, anisotropy, specular_blob_intensity, diffuse_light, specular_light, alpha); tmp_js_export.js:7:39416
1552:   } tmp_js_export.js:7:39416
1553: tmp_js_export.js:7:39416
1554: #endif //USE_VERTEX_LIGHTING tmp_js_export.js:7:39416
1555: tmp_js_export.js:7:39416
1556: #endif tmp_js_export.js:7:39416
1557: tmp_js_export.js:7:39416
1558: #ifdef USE_SHADOW_TO_OPACITY tmp_js_export.js:7:39416
1559:   alpha = min(alpha, clamp(length(ambient_light), 0.0, 1.0)); tmp_js_export.js:7:39416
1560: tmp_js_export.js:7:39416
1561: #if defined(ALPHA_SCISSOR_USED) tmp_js_export.js:7:39416
1562:   if (alpha < alpha_scissor) { tmp_js_export.js:7:39416
1563:       discard; tmp_js_export.js:7:39416
1564:   } tmp_js_export.js:7:39416
1565: #endif // ALPHA_SCISSOR_USED tmp_js_export.js:7:39416
1566: tmp_js_export.js:7:39416
1567: #ifdef USE_OPAQUE_PREPASS tmp_js_export.js:7:39416
1568: tmp_js_export.js:7:39416
1569:   if (alpha < opaque_prepass_threshold) { tmp_js_export.js:7:39416
1570:       discard; tmp_js_export.js:7:39416
1571:   } tmp_js_export.js:7:39416
1572: tmp_js_export.js:7:39416
1573: #endif // USE_OPAQUE_PREPASS tmp_js_export.js:7:39416
1574: tmp_js_export.js:7:39416
1575: #endif // USE_SHADOW_TO_OPACITY tmp_js_export.js:7:39416
1576: tmp_js_export.js:7:39416
1577: #ifdef RENDER_DEPTH tmp_js_export.js:7:39416
1578: //nothing happens, so a tree-ssa optimizer will result in no fragment shader :) tmp_js_export.js:7:39416
1579: #else tmp_js_export.js:7:39416
1580: tmp_js_export.js:7:39416
1581:   specular_light *= reflection_multiplier; tmp_js_export.js:7:39416
1582:   ambient_light *= albedo; //ambient must be multiplied by albedo at the end tmp_js_export.js:7:39416
1583: tmp_js_export.js:7:39416
1584: #if defined(ENABLE_AO) tmp_js_export.js:7:39416
1585:   ambient_light *= ao; tmp_js_export.js:7:39416
1586:   ao_light_affect = mix(1.0, ao, ao_light_affect); tmp_js_export.js:7:39416
1587:   specular_light *= ao_light_affect; tmp_js_export.js:7:39416
1588:   diffuse_light *= ao_light_affect; tmp_js_export.js:7:39416
1589: #endif tmp_js_export.js:7:39416
1590: tmp_js_export.js:7:39416
1591:   // base color remapping tmp_js_export.js:7:39416
1592:   diffuse_light *= 1.0 - metallic; // TODO: avoid all diffuse and ambient light calculations when metallic == 1 up to this point tmp_js_export.js:7:39416
1593:   ambient_light *= 1.0 - metallic; tmp_js_export.js:7:39416
1594: tmp_js_export.js:7:39416
1595:   if (fog_color_enabled.a > 0.5) { tmp_js_export.js:7:39416
1596: tmp_js_export.js:7:39416
1597:       float fog_amount = 0.0; tmp_js_export.js:7:39416
1598: tmp_js_export.js:7:39416
1599: #ifdef USE_LIGHT_DIRECTIONAL tmp_js_export.js:7:39416
1600: tmp_js_export.js:7:39416
1601:       vec3 fog_color = mix(fog_color_enabled.rgb, fog_sun_color_amount.rgb, fog_sun_color_amount.a * pow(max(dot(normalize(vertex), -light_direction_attenuation.xyz), 0.0), 8.0)); tmp_js_export.js:7:39416
1602: #else tmp_js_export.js:7:39416
1603: tmp_js_export.js:7:39416
1604:       vec3 fog_color = fog_color_enabled.rgb; tmp_js_export.js:7:39416
1605: #endif tmp_js_export.js:7:39416
1606: tmp_js_export.js:7:39416
1607:       //apply fog tmp_js_export.js:7:39416
1608: tmp_js_export.js:7:39416
1609:       if (fog_depth_enabled) { tmp_js_export.js:7:39416
1610:           float fog_far = fog_depth_end > 0.0 ? fog_depth_end : z_far; tmp_js_export.js:7:39416
1611: tmp_js_export.js:7:39416
1612:           float fog_z = smoothstep(fog_depth_begin, fog_far, length(vertex)); tmp_js_export.js:7:39416
1613: tmp_js_export.js:7:39416
1614:           fog_amount = pow(fog_z, fog_depth_curve) * fog_density; tmp_js_export.js:7:39416
1615:           if (fog_transmit_enabled) { tmp_js_export.js:7:39416
1616:               vec3 total_light = emission + ambient_light + specular_light + diffuse_light; tmp_js_export.js:7:39416
1617:               float transmit = pow(fog_z, fog_transmit_curve); tmp_js_export.js:7:39416
1618:               fog_color = mix(max(total_light, fog_color), fog_color, transmit); tmp_js_export.js:7:39416
1619:           } tmp_js_export.js:7:39416
1620:       } tmp_js_export.js:7:39416
1621: tmp_js_export.js:7:39416
1622:       if (fog_height_enabled) { tmp_js_export.js:7:39416
1623:           float y = (camera_matrix * vec4(vertex, 1.0)).y; tmp_js_export.js:7:39416
1624:           fog_amount = max(fog_amount, pow(smoothstep(fog_height_min, fog_height_max, y), fog_height_curve)); tmp_js_export.js:7:39416
1625:       } tmp_js_export.js:7:39416
1626: tmp_js_export.js:7:39416
1627:       float rev_amount = 1.0 - fog_amount; tmp_js_export.js:7:39416
1628: tmp_js_export.js:7:39416
1629:       emission = emission * rev_amount + fog_color * fog_amount; tmp_js_export.js:7:39416
1630:       ambient_light *= rev_amount; tmp_js_export.js:7:39416
1631:       specular_light *= rev_amount; tmp_js_export.js:7:39416
1632:       diffuse_light *= rev_amount; tmp_js_export.js:7:39416
1633:   } tmp_js_export.js:7:39416
1634: tmp_js_export.js:7:39416
1635: #ifdef USE_MULTIPLE_RENDER_TARGETS tmp_js_export.js:7:39416
1636: tmp_js_export.js:7:39416
1637: #ifdef SHADELESS tmp_js_export.js:7:39416
1638:   diffuse_buffer = vec4(albedo.rgb, 0.0); tmp_js_export.js:7:39416
1639:   specular_buffer = vec4(0.0); tmp_js_export.js:7:39416
1640: tmp_js_export.js:7:39416
1641: #else tmp_js_export.js:7:39416
1642: tmp_js_export.js:7:39416
1643:   //approximate ambient scale for SSAO, since we will lack full ambient tmp_js_export.js:7:39416
1644:   float max_emission = max(emission.r, max(emission.g, emission.b)); tmp_js_export.js:7:39416
1645:   float max_ambient = max(ambient_light.r, max(ambient_light.g, ambient_light.b)); tmp_js_export.js:7:39416
1646:   float max_diffuse = max(diffuse_light.r, max(diffuse_light.g, diffuse_light.b)); tmp_js_export.js:7:39416
1647:   float total_ambient = max_ambient + max_diffuse + max_emission; tmp_js_export.js:7:39416
1648:   float ambient_scale = (total_ambient > 0.0) ? (max_ambient + ambient_occlusion_affect_light * max_diffuse) / total_ambient : 0.0; tmp_js_export.js:7:39416
1649: tmp_js_export.js:7:39416
1650: #if defined(ENABLE_AO) tmp_js_export.js:7:39416
1651:   ambient_scale = mix(0.0, ambient_scale, ambient_occlusion_affect_ao_channel); tmp_js_export.js:7:39416
1652: #endif tmp_js_export.js:7:39416
1653:   diffuse_buffer = vec4(emission + diffuse_light + ambient_light, ambient_scale); tmp_js_export.js:7:39416
1654:   specular_buffer = vec4(specular_light, metallic); tmp_js_export.js:7:39416
1655: tmp_js_export.js:7:39416
1656: #endif //SHADELESS tmp_js_export.js:7:39416
1657: tmp_js_export.js:7:39416
1658:   normal_mr_buffer = vec4(normalize(normal) * 0.5 + 0.5, roughness); tmp_js_export.js:7:39416
1659: tmp_js_export.js:7:39416
1660: #if defined(ENABLE_SSS) tmp_js_export.js:7:39416
1661:   sss_buffer = sss_strength; tmp_js_export.js:7:39416
1662: #endif tmp_js_export.js:7:39416
1663: tmp_js_export.js:7:39416
1664: #else //USE_MULTIPLE_RENDER_TARGETS tmp_js_export.js:7:39416
1665: tmp_js_export.js:7:39416
1666: #ifdef SHADELESS tmp_js_export.js:7:39416
1667:   frag_color = vec4(albedo, alpha); tmp_js_export.js:7:39416
1668: #else tmp_js_export.js:7:39416
1669:   frag_color = vec4(emission + ambient_light + diffuse_light + specular_light, alpha); tmp_js_export.js:7:39416
1670: #endif //SHADELESS tmp_js_export.js:7:39416
1671: tmp_js_export.js:7:39416
1672: #endif //USE_MULTIPLE_RENDER_TARGETS tmp_js_export.js:7:39416
1673: tmp_js_export.js:7:39416
1674: #endif //RENDER_DEPTH tmp_js_export.js:7:39416
1675: } tmp_js_export.js:7:39416
1676: tmp_js_export.js:7:39416
**ERROR**: SceneShaderGLES3: Program LINK FAILED: tmp_js_export.js:7:39685
Programs with more than 16 samplers are disallowed on Mesa drivers to avoid crashing. tmp_js_export.js:7:39685
   At: drivers/gles3/shader_gles3.cpp:164:_display_error_with_code() - SceneShaderGLES3: Program LINK FAILED: tmp_js_export.js:7:39685
Programs with more than 16 samplers are disallowed on Mesa drivers to avoid crashing. tmp_js_export.js:7:39685
**ERROR**: SceneShaderGLES3: Program LINK FAILED: tmp_js_export.js:7:39685
Programs with more than 16 samplers are disallowed on Mesa drivers to avoid crashing. tmp_js_export.js:7:39685
   At: drivers/gles3/shader_gles3.cpp:497:get_current_version() - SceneShaderGLES3: Program LINK FAILED: tmp_js_export.js:7:39685
Programs with more than 16 samplers are disallowed on Mesa drivers to avoid crashing. tmp_js_export.js:7:39685
**ERROR**: Method/Function Failed, returning: 0L tmp_js_export.js:7:39685
   At: drivers/gles3/shader_gles3.cpp:504:get_current_version() - Method/Function Failed, returning: 0L tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: false tmp_js_export.js:7:39685
   At: drivers/gles3/shader_gles3.cpp:123:bind() - Condition ' !version ' is true. returned: false tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles3/shader_gles3.h:379:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles3/shader_gles3.h:379:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles3/shader_gles3.h:379:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles3/shader_gles3.h:379:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
**ERROR**: Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
   At: drivers/gles3/shader_gles3.h:379:_get_uniform() - Condition ' !version ' is true. returned: -1 tmp_js_export.js:7:39685
Error: WebGL warning: drawElements: The current program is not linked. 18 tmp_js_export.js:7:194884
Error: WebGL: No further warnings will be reported for this WebGL context. (already reported 32 warnings) tmp_js_export.js:7:194884

Chromium on Linux/Mesa, WebGL2

Screenshot_20191025_102519 Model shows properly, but textures are missing. The error log refers again to issue with not being powers of 2:

tmp_js_export.js:7 Godot Engine v3.2.alpha3.official - https://godotengine.org
tmp_js_export.js:7 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
RuntimeEnvironment.ASM_CONSTS @ tmp_js_export.js:7
_emscripten_asm_const_i @ tmp_js_export.js:7
__ZN21AudioDriverJavaScript4initEv @ wasm-047ed5ae-42110:1
__ZN18AudioDriverManager10initializeEi @ wasm-047ed5ae-43443:1
__ZN13OS_JavaScript10initializeERKN2OS9VideoModeEii @ wasm-047ed5ae-45477:1
__ZN4Main6setup2Ey @ wasm-047ed5ae-39116:1
__ZN4Main5setupEPKciPPcb @ wasm-047ed5ae-39118:1
_main @ wasm-047ed5ae-21004:1
RuntimeEnvironment.Module._main @ tmp_js_export.js:7
callMain @ tmp_js_export.js:7
synchronousStart @ tmp_js_export.js:213
Promise.then (async)
Engine.startGame @ tmp_js_export.js:152
(anonymous) @ tmp_js_export.html:258
(anonymous) @ tmp_js_export.html:263
tmp_js_export.js:7 OpenGL ES 3.0 Renderer: WebKit WebGL
tmp_js_export.js:7  
tmp_js_export.js:7 **ERROR**: Texuture 'res://.import/WildNormal.png-20902661572dada35e4e3a9727ad45d6.s3tc.stex' is compressed, has mipmaps but is not of powerf-of-2 size. This does not work on OpenGL ES 3.0.
put_char @ tmp_js_export.js:7
write @ tmp_js_export.js:7
write @ tmp_js_export.js:7
doWritev @ tmp_js_export.js:7
___syscall146 @ tmp_js_export.js:7
___stdio_write @ wasm-047ed5ae-10784:1
___vfprintf_internal @ wasm-047ed5ae-22292:1
_vfprintf @ wasm-047ed5ae-4438:1
__ZN9StdLogger4logvEPKcPib @ wasm-047ed5ae-31711:1
__ZN6Logger10logf_errorEPKcz @ wasm-047ed5ae-2773:1
__ZN6Logger9log_errorEPKcS1_iS1_S1_NS_9ErrorTypeE @ wasm-047ed5ae-38519:1
__ZN15CompositeLogger9log_errorEPKcS1_iS1_S1_N6Logger9ErrorTypeE @ wasm-047ed5ae-44628:1
__ZN2OS11print_errorEPKcS1_iS1_S1_N6Logger9ErrorTypeE @ wasm-047ed5ae-40484:1
__Z16_err_print_errorPKcS0_iS0_16ErrorHandlerType @ wasm-047ed5ae-536:1
__ZN22RasterizerStorageGLES316texture_set_dataE3RIDRK3RefI5ImageEi @ wasm-047ed5ae-41558:1
__ZN18VisualServerRaster16texture_set_dataE3RIDRK3RefI5ImageEi @ wasm-047ed5ae-43214:1
__ZN13StreamTexture4loadERK6String @ wasm-047ed5ae-9101:1
__ZN33ResourceFormatLoaderStreamTexture4loadERK6StringS2_P5Error @ wasm-047ed5ae-40328:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN22ResourceFormatImporter4loadERK6StringS2_P5Error @ wasm-047ed5ae-41397:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN31ResourceInteractiveLoaderBinary4pollEv @ wasm-047ed5ae-40403:1
__ZN20ResourceFormatLoader4loadERK6StringS2_P5Error @ wasm-047ed5ae-42311:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN29ResourceInteractiveLoaderText4pollEv @ wasm-047ed5ae-40529:1
__ZN20ResourceFormatLoader4loadERK6StringS2_P5Error @ wasm-047ed5ae-42311:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN4Main5startEv @ wasm-047ed5ae-39117:1
_main_after_fs_sync @ wasm-047ed5ae-21003:1
RuntimeEnvironment.Module._main_after_fs_sync @ tmp_js_export.js:7
ccall @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
doCallback @ tmp_js_export.js:7
done @ tmp_js_export.js:7
reconcile @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
index.openKeyCursor.onsuccess @ tmp_js_export.js:7
IndexedDB (async)
(anonymous) @ tmp_js_export.js:7
req.onsuccess @ tmp_js_export.js:7
IndexedDB (async)
getDB @ tmp_js_export.js:7
getRemoteSet @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
getLocalSet @ tmp_js_export.js:7
syncfs @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
syncfs @ tmp_js_export.js:7
RuntimeEnvironment.ASM_CONSTS @ tmp_js_export.js:7
_emscripten_asm_const_i @ tmp_js_export.js:7
_main @ wasm-047ed5ae-21004:1
RuntimeEnvironment.Module._main @ tmp_js_export.js:7
callMain @ tmp_js_export.js:7
synchronousStart @ tmp_js_export.js:213
Promise.then (async)
Engine.startGame @ tmp_js_export.js:152
(anonymous) @ tmp_js_export.html:258
(anonymous) @ tmp_js_export.html:263
Show 10 more frames
tmp_js_export.js:7    At: drivers/gles3/rasterizer_storage_gles3.cpp:758:texture_set_data() - Texuture 'res://.import/WildNormal.png-20902661572dada35e4e3a9727ad45d6.s3tc.stex' is compressed, has mipmaps but is not of powerf-of-2 size. This does not work on OpenGL ES 3.0.
put_char @ tmp_js_export.js:7
write @ tmp_js_export.js:7
write @ tmp_js_export.js:7
doWritev @ tmp_js_export.js:7
___syscall146 @ tmp_js_export.js:7
___stdio_write @ wasm-047ed5ae-10784:1
___vfprintf_internal @ wasm-047ed5ae-22292:1
_vfprintf @ wasm-047ed5ae-4438:1
__ZN9StdLogger4logvEPKcPib @ wasm-047ed5ae-31711:1
__ZN6Logger10logf_errorEPKcz @ wasm-047ed5ae-2773:1
__ZN6Logger9log_errorEPKcS1_iS1_S1_NS_9ErrorTypeE @ wasm-047ed5ae-38519:1
__ZN15CompositeLogger9log_errorEPKcS1_iS1_S1_N6Logger9ErrorTypeE @ wasm-047ed5ae-44628:1
__ZN2OS11print_errorEPKcS1_iS1_S1_N6Logger9ErrorTypeE @ wasm-047ed5ae-40484:1
__Z16_err_print_errorPKcS0_iS0_16ErrorHandlerType @ wasm-047ed5ae-536:1
__ZN22RasterizerStorageGLES316texture_set_dataE3RIDRK3RefI5ImageEi @ wasm-047ed5ae-41558:1
__ZN18VisualServerRaster16texture_set_dataE3RIDRK3RefI5ImageEi @ wasm-047ed5ae-43214:1
__ZN13StreamTexture4loadERK6String @ wasm-047ed5ae-9101:1
__ZN33ResourceFormatLoaderStreamTexture4loadERK6StringS2_P5Error @ wasm-047ed5ae-40328:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN22ResourceFormatImporter4loadERK6StringS2_P5Error @ wasm-047ed5ae-41397:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN31ResourceInteractiveLoaderBinary4pollEv @ wasm-047ed5ae-40403:1
__ZN20ResourceFormatLoader4loadERK6StringS2_P5Error @ wasm-047ed5ae-42311:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN29ResourceInteractiveLoaderText4pollEv @ wasm-047ed5ae-40529:1
__ZN20ResourceFormatLoader4loadERK6StringS2_P5Error @ wasm-047ed5ae-42311:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN4Main5startEv @ wasm-047ed5ae-39117:1
_main_after_fs_sync @ wasm-047ed5ae-21003:1
RuntimeEnvironment.Module._main_after_fs_sync @ tmp_js_export.js:7
ccall @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
doCallback @ tmp_js_export.js:7
done @ tmp_js_export.js:7
reconcile @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
index.openKeyCursor.onsuccess @ tmp_js_export.js:7
IndexedDB (async)
(anonymous) @ tmp_js_export.js:7
req.onsuccess @ tmp_js_export.js:7
IndexedDB (async)
getDB @ tmp_js_export.js:7
getRemoteSet @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
getLocalSet @ tmp_js_export.js:7
syncfs @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
syncfs @ tmp_js_export.js:7
RuntimeEnvironment.ASM_CONSTS @ tmp_js_export.js:7
_emscripten_asm_const_i @ tmp_js_export.js:7
_main @ wasm-047ed5ae-21004:1
RuntimeEnvironment.Module._main @ tmp_js_export.js:7
callMain @ tmp_js_export.js:7
synchronousStart @ tmp_js_export.js:213
Promise.then (async)
Engine.startGame @ tmp_js_export.js:152
(anonymous) @ tmp_js_export.html:258
(anonymous) @ tmp_js_export.html:263
Show 10 more frames
tmp_js_export.js:7 **ERROR**: Texuture 'res://.import/WildGrid.png-09bc5364f72c31b80b9cdd2ee1128f00.s3tc.stex' is compressed, has mipmaps but is not of powerf-of-2 size. This does not work on OpenGL ES 3.0.
put_char @ tmp_js_export.js:7
write @ tmp_js_export.js:7
write @ tmp_js_export.js:7
doWritev @ tmp_js_export.js:7
___syscall146 @ tmp_js_export.js:7
___stdio_write @ wasm-047ed5ae-10784:1
___vfprintf_internal @ wasm-047ed5ae-22292:1
_vfprintf @ wasm-047ed5ae-4438:1
__ZN9StdLogger4logvEPKcPib @ wasm-047ed5ae-31711:1
__ZN6Logger10logf_errorEPKcz @ wasm-047ed5ae-2773:1
__ZN6Logger9log_errorEPKcS1_iS1_S1_NS_9ErrorTypeE @ wasm-047ed5ae-38519:1
__ZN15CompositeLogger9log_errorEPKcS1_iS1_S1_N6Logger9ErrorTypeE @ wasm-047ed5ae-44628:1
__ZN2OS11print_errorEPKcS1_iS1_S1_N6Logger9ErrorTypeE @ wasm-047ed5ae-40484:1
__Z16_err_print_errorPKcS0_iS0_16ErrorHandlerType @ wasm-047ed5ae-536:1
__ZN22RasterizerStorageGLES316texture_set_dataE3RIDRK3RefI5ImageEi @ wasm-047ed5ae-41558:1
__ZN18VisualServerRaster16texture_set_dataE3RIDRK3RefI5ImageEi @ wasm-047ed5ae-43214:1
__ZN13StreamTexture4loadERK6String @ wasm-047ed5ae-9101:1
__ZN33ResourceFormatLoaderStreamTexture4loadERK6StringS2_P5Error @ wasm-047ed5ae-40328:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN22ResourceFormatImporter4loadERK6StringS2_P5Error @ wasm-047ed5ae-41397:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN31ResourceInteractiveLoaderBinary4pollEv @ wasm-047ed5ae-40403:1
__ZN20ResourceFormatLoader4loadERK6StringS2_P5Error @ wasm-047ed5ae-42311:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN29ResourceInteractiveLoaderText4pollEv @ wasm-047ed5ae-40529:1
__ZN20ResourceFormatLoader4loadERK6StringS2_P5Error @ wasm-047ed5ae-42311:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN4Main5startEv @ wasm-047ed5ae-39117:1
_main_after_fs_sync @ wasm-047ed5ae-21003:1
RuntimeEnvironment.Module._main_after_fs_sync @ tmp_js_export.js:7
ccall @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
doCallback @ tmp_js_export.js:7
done @ tmp_js_export.js:7
reconcile @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
index.openKeyCursor.onsuccess @ tmp_js_export.js:7
IndexedDB (async)
(anonymous) @ tmp_js_export.js:7
req.onsuccess @ tmp_js_export.js:7
IndexedDB (async)
getDB @ tmp_js_export.js:7
getRemoteSet @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
getLocalSet @ tmp_js_export.js:7
syncfs @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
syncfs @ tmp_js_export.js:7
RuntimeEnvironment.ASM_CONSTS @ tmp_js_export.js:7
_emscripten_asm_const_i @ tmp_js_export.js:7
_main @ wasm-047ed5ae-21004:1
RuntimeEnvironment.Module._main @ tmp_js_export.js:7
callMain @ tmp_js_export.js:7
synchronousStart @ tmp_js_export.js:213
Promise.then (async)
Engine.startGame @ tmp_js_export.js:152
(anonymous) @ tmp_js_export.html:258
(anonymous) @ tmp_js_export.html:263
Show 10 more frames
tmp_js_export.js:7    At: drivers/gles3/rasterizer_storage_gles3.cpp:758:texture_set_data() - Texuture 'res://.import/WildGrid.png-09bc5364f72c31b80b9cdd2ee1128f00.s3tc.stex' is compressed, has mipmaps but is not of powerf-of-2 size. This does not work on OpenGL ES 3.0.
put_char @ tmp_js_export.js:7
write @ tmp_js_export.js:7
write @ tmp_js_export.js:7
doWritev @ tmp_js_export.js:7
___syscall146 @ tmp_js_export.js:7
___stdio_write @ wasm-047ed5ae-10784:1
___vfprintf_internal @ wasm-047ed5ae-22292:1
_vfprintf @ wasm-047ed5ae-4438:1
__ZN9StdLogger4logvEPKcPib @ wasm-047ed5ae-31711:1
__ZN6Logger10logf_errorEPKcz @ wasm-047ed5ae-2773:1
__ZN6Logger9log_errorEPKcS1_iS1_S1_NS_9ErrorTypeE @ wasm-047ed5ae-38519:1
__ZN15CompositeLogger9log_errorEPKcS1_iS1_S1_N6Logger9ErrorTypeE @ wasm-047ed5ae-44628:1
__ZN2OS11print_errorEPKcS1_iS1_S1_N6Logger9ErrorTypeE @ wasm-047ed5ae-40484:1
__Z16_err_print_errorPKcS0_iS0_16ErrorHandlerType @ wasm-047ed5ae-536:1
__ZN22RasterizerStorageGLES316texture_set_dataE3RIDRK3RefI5ImageEi @ wasm-047ed5ae-41558:1
__ZN18VisualServerRaster16texture_set_dataE3RIDRK3RefI5ImageEi @ wasm-047ed5ae-43214:1
__ZN13StreamTexture4loadERK6String @ wasm-047ed5ae-9101:1
__ZN33ResourceFormatLoaderStreamTexture4loadERK6StringS2_P5Error @ wasm-047ed5ae-40328:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN22ResourceFormatImporter4loadERK6StringS2_P5Error @ wasm-047ed5ae-41397:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN31ResourceInteractiveLoaderBinary4pollEv @ wasm-047ed5ae-40403:1
__ZN20ResourceFormatLoader4loadERK6StringS2_P5Error @ wasm-047ed5ae-42311:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN29ResourceInteractiveLoaderText4pollEv @ wasm-047ed5ae-40529:1
__ZN20ResourceFormatLoader4loadERK6StringS2_P5Error @ wasm-047ed5ae-42311:1
__ZN14ResourceLoader5_loadERK6StringS2_S2_bP5Error @ wasm-047ed5ae-16141:1
__ZN14ResourceLoader4loadERK6StringS2_bP5Error @ wasm-047ed5ae-1119:1
__ZN4Main5startEv @ wasm-047ed5ae-39117:1
_main_after_fs_sync @ wasm-047ed5ae-21003:1
RuntimeEnvironment.Module._main_after_fs_sync @ tmp_js_export.js:7
ccall @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
doCallback @ tmp_js_export.js:7
done @ tmp_js_export.js:7
reconcile @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
index.openKeyCursor.onsuccess @ tmp_js_export.js:7
IndexedDB (async)
(anonymous) @ tmp_js_export.js:7
req.onsuccess @ tmp_js_export.js:7
IndexedDB (async)
getDB @ tmp_js_export.js:7
getRemoteSet @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
getLocalSet @ tmp_js_export.js:7
syncfs @ tmp_js_export.js:7
(anonymous) @ tmp_js_export.js:7
syncfs @ tmp_js_export.js:7
RuntimeEnvironment.ASM_CONSTS @ tmp_js_export.js:7
_emscripten_asm_const_i @ tmp_js_export.js:7
_main @ wasm-047ed5ae-21004:1
RuntimeEnvironment.Module._main @ tmp_js_export.js:7
callMain @ tmp_js_export.js:7
synchronousStart @ tmp_js_export.js:213
Promise.then (async)
Engine.startGame @ tmp_js_export.js:152
(anonymous) @ tmp_js_export.html:258
(anonymous) @ tmp_js_export.html:263
Show 10 more frames
tmp_js_export.html:1 [.WebGL-0x562bf6931190]GL ERROR :GL_INVALID_OPERATION : glCompressedTexImage2D: width or height invalid for level
tmp_js_export.html:1 [.WebGL-0x562bf6931190]GL ERROR :GL_INVALID_OPERATION : glCompressedTexImage2D: width or height invalid for level
tmp_js_export.html:1 [.WebGL-0x562bf6931190]GL ERROR :GL_INVALID_OPERATION : glDrawElements: uniform buffers : no buffer bound at index 4
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
[.WebGL-0x562bf6931190]RENDER WARNING: texture bound to texture unit 4 is not renderable. It might be non-power-of-2 or have incompatible texture filtering (maybe)?
tmp_js_export.html:1 WebGL: too many errors, no more errors will be reported to the console for this context.

Edit: I'll move that last Chromium bug to a dedicated issue (#33058).

akien-mga commented 4 years ago

The problem with that particular material is that it seems to use too many textures: Screenshot_20191025_111246 (Four textures for Albedo, Normal, Transmission and Detail.)

If I disable any of them, the rendering issue is fixed (worked around). I've tried disabling mipmaps and filtering on the PNGs but that didn't solve the issue.

We need to find a way to reduce the number of samplers used in such case I guess, or find a way to notify users about it (and document how to do low-end materials for WebGL).