webcompat / web-bugs

A place to report bugs on websites.
https://webcompat.com
Mozilla Public License 2.0
742 stars 66 forks source link

www.foosballworldcup18.com - site is not usable #20478

Closed webcompat-bot closed 6 years ago

webcompat-bot commented 6 years ago

URL: https://www.foosballworldcup18.com/

Browser / Version: Firefox 65.0 Operating System: Linux Tested Another Browser: Yes

Problem type: Site is not usable Description: WebGL Steps to Reproduce: black screen

Browser Configuration
  • mixed active content blocked: false
  • image.mem.shared: true
  • buildID: 20181026100128
  • tracking content blocked: false
  • gfx.webrender.blob-images: true
  • hasTouchScreen: false
  • mixed passive content blocked: false
  • gfx.webrender.enabled: false
  • gfx.webrender.all: true
  • channel: nightly

Console Messages:

[u'[JavaScript Warning: "The resource at https://www.googletagmanager.com/gtag/js?id=UA-83030067-8 was blocked because content blocking is enabled." {file: "https://www.foosballworldcup18.com/" line: 0}]', u'[console.log(THREE.WebGLRenderer, 91dev) https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js:1:537443]', u"[console.error(THREE.WebGLShader: Shader couldn't compile.) https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js:1:492037]", u'[console.warn(THREE.WebGLShader: gl.getShaderInfoLog(), fragment, 0:107(188): error: invalid input layout qualifier used\n0:114(170): error: invalid input layout qualifier used\n, 1: precision highp float;\n2: precision highp int;\n3: #define SHADER_NAME ShaderMaterial\n4: #define GAMMA_FACTOR 2\n5: uniform mat4 viewMatrix;\n6: uniform vec3 cameraPosition;\n7: #define TONE_MAPPING\n8: #ifndef saturate\n9: \t#define saturate(a) clamp( a, 0.0, 1.0 )\n10: #endif\n11: uniform float toneMappingExposure;\n12: uniform float toneMappingWhitePoint;\n13: vec3 LinearToneMapping( vec3 color ) {\n14: \treturn toneMappingExposure * color;\n15: }\n16: vec3 ReinhardToneMapping( vec3 color ) {\n17: \tcolor *= toneMappingExposure;\n18: \treturn saturate( color / ( vec3( 1.0 ) + color ) );\n19: }\n20: #define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\n21: vec3 Uncharted2ToneMapping( vec3 color ) {\n22: \tcolor *= toneMappingExposure;\n23: \treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n24: }\n25: vec3 OptimizedCineonToneMapping( vec3 color ) {\n26: \tcolor *= toneMappingExposure;\n27: \tcolor = max( vec3( 0.0 ), color - 0.004 );\n28: \treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n29: }\n30: \n31: vec3 toneMapping( vec3 color ) { return LinearToneMapping( color ); }\n32: \n33: vec4 LinearToLinear( in vec4 value ) {\n34: \treturn value;\n35: }\n36: vec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n37: \treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n38: }\n39: vec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n40: \treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n41: }\n42: vec4 sRGBToLinear( in vec4 value ) {\n43: \treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n44: }\n45: vec4 LinearTosRGB( in vec4 value ) {\n46: \treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n47: }\n48: vec4 RGBEToLinear( in vec4 value ) {\n49: \treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n50: }\n51: vec4 LinearToRGBE( in vec4 value ) {\n52: \tfloat maxComponent = max( max( value.r, value.g ), value.b );\n53: \tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n54: \treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n55: }\n56: vec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n57: \treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n58: }\n59: vec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n60: \tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n61: \tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\n62: \tM            = ceil( M * 255.0 ) / 255.0;\n63: \treturn vec4( value.rgb / ( M * maxRange ), M );\n64: }\n65: vec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n66: \treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n67: }\n68: vec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n69: \tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n70: \tfloat D      = max( maxRange / maxRGB, 1.0 );\n71: \tD            = min( floor( D ) / 255.0, 1.0 );\n72: \treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n73: }\n74: const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\n75: vec4 LinearToLogLuv( in vec4 value )  {\n76: \tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n77: \tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n78: \tvec4 vResult;\n79: \tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n80: \tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n81: \tvResult.w = fract(Le);\n82: \tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n83: \treturn vResult;\n84: }\n85: const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\n86: vec4 LogLuvToLinear( in vec4 value ) {\n87: \tfloat Le = value.z * 255.0 + value.w;\n88: \tvec3 Xp_Y_XYZp;\n89: \tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n90: \tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n91: \tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n92: \tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n93: \treturn vec4( max(vRGB, 0.0), 1.0 );\n94: }\n95: \n96: vec4 mapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }\n97: vec4 envMapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }\n98: vec4 emissiveMapTexelToLinear( vec4 value ) { return LinearToLinear( value ); }\n99: vec4 linearToOutputTexel( vec4 value ) { return LinearToLinear( value ); }\n100: \n101: #define GLSLIFY 1\n102: #define PHONG\n103: \n104: uniform vec3 diffuse;\n105: uniform vec3 emissive;\n106: uniform vec3 specular;\n107: uniform float shininess;\n108: uniform float opacity;\n109: uniform vec2 u_resolution;\n110: \n111: uniform vec3 colorA;\n112: uniform vec3 colorB;\n113: \n114: #define PI 3.14159265359\n115: #define PI2 6.28318530718\n116: #define PI_HALF 1.5707963267949\n117: #define RECIPROCAL_PI 0.31830988618\n118: #define RECIPROCAL_PI2 0.15915494\n119: #define LOG2 1.442695\n120: #define EPSILON 1e-6\n121: #define saturate(a) clamp( a, 0.0, 1.0 )\n122: #define whiteCompliment(a) ( 1.0 - saturate( a ) )\n123: float pow2( const in float x ) { return x*x; }\n124: float pow3( const in float x ) { return x*x*x; }\n125: float pow4( const in float x ) { float x2 = x*x; return x2*x2; }\n126: float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\n127: highp float rand( const in vec2 uv ) {\n128: \tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n129: \thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n130: \treturn fract(sin(sn) * c);\n131: }\n132: struct IncidentLight {\n133: \tvec3 color;\n134: \tvec3 direction;\n135: \tbool visible;\n136: };\n137: struct ReflectedLight {\n138: \tvec3 directDiffuse;\n139: \tvec3 directSpecular;\n140: \tvec3 indirectDiffuse;\n141: \tvec3 indirectSpecular;\n142: };\n143: struct GeometricContext {\n144: \tvec3 position;\n145: \tvec3 normal;\n146: \tvec3 viewDir;\n147: };\n148: vec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n149: \treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n150: }\n151: vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n152: \treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n153: }\n154: vec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n155: \tfloat distance = dot( planeNormal, point - pointOnPlane );\n156: \treturn - distance * planeNormal + point;\n157: }\n158: float sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n159: \treturn sign( dot( point - pointOnPlane, planeNormal ) );\n160: }\n161: vec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n162: \treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n163: }\n164: mat3 transposeMat3( const in mat3 m ) {\n165: \tmat3 tmp;\n166: \ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n167: \ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n168: \ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n169: \treturn tmp;\n170: }\n171: float linearToRelativeLuminance( const in vec3 color ) {\n172: \tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n173: \treturn dot( weights, color.rgb );\n174: }\n175: \n176: vec3 packNormalToRGB( const in vec3 normal ) {\n177: \treturn normalize( normal ) * 0.5 + 0.5;\n178: }\n179: vec3 unpackRGBToNormal( const in vec3 rgb ) {\n180: \treturn 2.0 * rgb.xyz - 1.0;\n181: }\n182: const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\n183: const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\n184: const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\n185: const float ShiftRight8 = 1. / 256.;\n186: vec4 packDepthToRGBA( const in float v ) {\n187: \tvec4 r = vec4( fract( v * PackFactors ), v );\n188: \tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n189: }\n190: float unpackRGBAToDepth( const in vec4 v ) {\n191: \treturn dot( v, UnpackFactors );\n192: }\n193: float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n194: \treturn ( viewZ + near ) / ( near - far );\n195: }\n196: float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n197: \treturn linearClipZ * ( near - far ) - near;\n198: }\n199: float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n200: \treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n201: }\n202: float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n203: \treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n204: }\n205: \n206: #if defined( DITHERING )\n207: \tvec3 dithering( vec3 color ) {\n208: \t\tfloat grid_position = rand( gl_FragCoord.xy );\n209: \t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n210: \t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n211: \t\treturn color + dither_shift_RGB;\n212: \t}\n213: #endif\n214: \n215: #ifdef USE_COLOR\n216: \tvarying vec3 vColor;\n217: #endif\n218: \n219: #if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n220: \tvarying vec2 vUv;\n221: #endif\n222: #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n223: \tvarying vec2 vUv2;\n224: #endif\n225: #ifdef USE_MAP\n226: \tuniform sampler2D map;\n227: #endif\n228: \n229: #ifdef USE_ALPHAMAP\n230: \tuniform sampler2D alphaMap;\n231: #endif\n232: \n233: #ifdef USE_AOMAP\n234: \tuniform sampler2D aoMap;\n235: \tuniform float aoMapIntensity;\n236: #endif\n237: #ifdef USE_LIGHTMAP\n238: \tuniform sampler2D lightMap;\n239: \tuniform float lightMapIntensity;\n240: #endif\n241: #ifdef USE_EMISSIVEMAP\n242: \tuniform sampler2D emissiveMap;\n243: #endif\n244: \n245: #if defined( USE_ENVMAP ) || defined( PHYSICAL )\n246: \tuniform float reflectivity;\n247: \tuniform float envMapIntensity;\n248: #endif\n249: #ifdef USE_ENVMAP\n250: \t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n251: \t\tvarying vec3 vWorldPosition;\n252: \t#endif\n253: \t#ifdef ENVMAP_TYPE_CUBE\n254: \t\tuniform samplerCube envMap;\n255: \t#else\n256: \t\tuniform sampler2D envMap;\n257: \t#endif\n258: \tuniform float flipEnvMap;\n259: \tuniform int maxMipLevel;\n260: \t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n261: \t\tuniform float refractionRatio;\n262: \t#else\n263: \t\tvarying vec3 vReflect;\n264: \t#endif\n265: #endif\n266: \n267: #ifdef TOON\n268: \tuniform sampler2D gradientMap;\n269: \tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n270: \t\tfloat dotNL = dot( normal, lightDirection );\n271: \t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n272: \t\t#ifdef USE_GRADIENTMAP\n273: \t\t\treturn texture2D( gradientMap, coord ).rgb;\n274: \t\t#else\n275: \t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n276: \t\t#endif\n277: \t}\n278: #endif\n279: \n280: #ifdef USE_FOG\n281: \tuniform vec3 fogColor;\n282: \tvarying float fogDepth;\n283: \t#ifdef FOG_EXP2\n284: \t\tuniform float fogDensity;\n285: \t#else\n286: \t\tuniform float fogNear;\n287: \t\tuniform float fogFar;\n288: \t#endif\n289: #endif\n290: \n291: float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n292: \tif( decayExponent > 0.0 ) {\n293: #if defined ( PHYSICALLY_CORRECT_LIGHTS )\n294: \t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n295: \t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n296: \t\treturn distanceFalloff * maxDistanceCutoffFactor;\n297: #else\n298: \t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n299: #endif\n300: \t}\n301: \treturn 1.0;\n302: }\n303: vec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n304: \treturn RECIPROCAL_PI * diffuseColor;\n305: }\n306: vec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n307: \tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n308: \treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n309: }\n310: float G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n311: \tfloat a2 = pow2( alpha );\n312: \tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n313: \tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n314: \treturn 1.0 / ( gl * gv );\n315: }\n316: float G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n317: \tfloat a2 = pow2( alpha );\n318: \tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n319: \tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n320: \treturn 0.5 / max( gv + gl, EPSILON );\n321: }\n322: float D_GGX( const in float alpha, const in float dotNH ) {\n323: \tfloat a2 = pow2( alpha );\n324: \tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n325: \treturn RECIPROCAL_PI * a2 / pow2( denom );\n326: }\n327: vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n328: \tfloat alpha = pow2( roughness );\n329: \tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n330: \tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n331: \tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n332: \tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n333: \tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n334: \tvec3 F = F_Schlick( specularColor, dotLH );\n335: \tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n336: \tfloat D = D_GGX( alpha, dotNH );\n337: \treturn F * ( G * D );\n338: }\n339: vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n340: \tconst float LUT_SIZE  = 64.0;\n341: \tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n342: \tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\n343: \tfloat dotNV = saturate( dot( N, V ) );\n344: \tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n345: \tuv = uv * LUT_SCALE + LUT_BIAS;\n346: \treturn uv;\n347: }\n348: float LTC_ClippedSphereFormFactor( const in vec3 f ) {\n349: \tfloat l = length( f );\n350: \treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n351: }\n352: vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n353: \tfloat x = dot( v1, v2 );\n354: \tfloat y = abs( x );\n355: \tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n356: \tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n357: \tfloat v = a / b;\n358: \tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n359: \treturn cross( v1, v2 ) * theta_sintheta;\n360: }\n361: vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n362: \tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n363: \tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n364: \tvec3 lightNormal = cross( v1, v2 );\n365: \tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n366: \tvec3 T1, T2;\n367: \tT1 = normalize( V - N * dot( V, N ) );\n368: \tT2 = - cross( N, T1 );\n369: \tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n370: \tvec3 coords[ 4 ];\n371: \tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n372: \tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n373: \tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n374: \tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n375: \tcoords[ 0 ] = normalize( coords[ 0 ] );\n376: \tcoords[ 1 ] = normalize( coords[ 1 ] );\n377: \tcoords[ 2 ] = normalize( coords[ 2 ] );\n378: \tcoords[ 3 ] = normalize( coords[ 3 ] );\n379: \tvec3 vectorFormFactor = vec3( 0.0 );\n380: \tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n381: \tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n382: \tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n383: \tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n384: \tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n385: \treturn vec3( result );\n386: }\n387: vec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n388: \tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n389: \tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n390: \tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n391: \tvec4 r = roughness * c0 + c1;\n392: \tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n393: \tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n394: \treturn specularColor * AB.x + AB.y;\n395: }\n396: float G_BlinnPhong_Implicit( ) {\n397: \treturn 0.25;\n398: }\n399: float D_BlinnPhong( const in float shininess, const in float dotNH ) {\n400: \treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n401: }\n402: vec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n403: \tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n404: \tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n405: \tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n406: \tvec3 F = F_Schlick( specularColor, dotLH );\n407: \tfloat G = G_BlinnPhong_Implicit( );\n408: \tfloat D = D_BlinnPhong( shininess, dotNH );\n409: \treturn F * ( G * D );\n410: }\n411: float GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n412: \treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n413: }\n414: float BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n415: \treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n416: }\n417: \n418: uniform vec3 ambientLightColor;\n419: vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n420: \tvec3 irradiance = ambientLightColor;\n421: \t#ifndef PHYSICALLY_CORRECT_LIGHTS\n422: \t\tirradiance *= PI;\n423: \t#endif\n424: \treturn irradiance;\n425: }\n426: #if 0 > 0\n427: \tstruct DirectionalLight {\n428: \t\tvec3 direction;\n429: \t\tvec3 color;\n430: \t\tint shadow;\n431: \t\tfloat shadowBias;\n432: \t\tfloat shadowRadius;\n433: \t\tvec2 shadowMapSize;\n434: \t};\n435: \tuniform DirectionalLight directionalLights[ 0 ];\n436: \tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n437: \t\tdirectLight.color = directionalLight.color;\n438: \t\tdirectLight.direction = directionalLight.direction;\n439: \t\tdirectLight.visible = true;\n440: \t}\n441: #endif\n442: #if 2 > 0\n443: \tstruct PointLight {\n444: \t\tvec3 position;\n445: \t\tvec3 color;\n446: \t\tfloat distance;\n447: \t\tfloat decay;\n448: \t\tint shadow;\n449: \t\tfloat shadowBias;\n450: \t\tfloat shadowRadius;\n451: \t\tvec2 shadowMapSize;\n452: \t\tfloat shadowCameraNear;\n453: \t\tfloat shadowCameraFar;\n454: \t};\n455: \tuniform PointLight pointLights[ 2 ];\n456: \tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n457: \t\tvec3 lVector = pointLight.position - geometry.position;\n458: \t\tdirectLight.direction = normalize( lVector );\n459: \t\tfloat lightDistance = length( lVector );\n460: \t\tdirectLight.color = pointLight.color;\n461: \t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n462: \t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n463: \t}\n464: #endif\n465: #if 0 > 0\n466: \tstruct SpotLight {\n467: \t\tvec3 position;\n468: \t\tvec3 direction;\n469: \t\tvec3 color;\n470: \t\tfloat distance;\n471: \t\tfloat decay;\n472: \t\tfloat coneCos;\n473: \t\tfloat penumbraCos;\n474: \t\tint shadow;\n475: \t\tfloat shadowBias;\n476: \t\tfloat shadowRadius;\n477: \t\tvec2 shadowMapSize;\n478: \t};\n479: \tuniform SpotLight spotLights[ 0 ];\n480: \tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n481: \t\tvec3 lVector = spotLight.position - geometry.position;\n482: \t\tdirectLight.direction = normalize( lVector );\n483: \t\tfloat lightDistance = length( lVector );\n484: \t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n485: \t\tif ( angleCos > spotLight.coneCos ) {\n486: \t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n487: \t\t\tdirectLight.color = spotLight.color;\n488: \t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n489: \t\t\tdirectLight.visible = true;\n490: \t\t} else {\n491: \t\t\tdirectLight.color = vec3( 0.0 );\n492: \t\t\tdirectLight.visible = false;\n493: \t\t}\n494: \t}\n495: #endif\n496: #if 0 > 0\n497: \tstruct RectAreaLight {\n498: \t\tvec3 color;\n499: \t\tvec3 position;\n500: \t\tvec3 halfWidth;\n501: \t\tvec3 halfHeight;\n502: \t};\n503: \tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n504: \tuniform RectAreaLight rectAreaLights[ 0 ];\n505: #endif\n506: #if 0 > 0\n507: \tstruct HemisphereLight {\n508: \t\tvec3 direction;\n509: \t\tvec3 skyColor;\n510: \t\tvec3 groundColor;\n511: \t};\n512: \tuniform HemisphereLight hemisphereLights[ 0 ];\n513: \tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n514: \t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n515: \t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n516: \t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n517: \t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n518: \t\t\tirradiance *= PI;\n519: \t\t#endif\n520: \t\treturn irradiance;\n521: \t}\n522: #endif\n523: \n524: #if defined( USE_ENVMAP ) && defined( PHYSICAL )\n525: \tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n526: \t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n527: \t\t#ifdef ENVMAP_TYPE_CUBE\n528: \t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n529: \t\t\t#ifdef TEXTURE_LOD_EXT\n530: \t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n531: \t\t\t#else\n532: \t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n533: \t\t\t#endif\n534: \t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n535: \t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n536: \t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n537: \t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n538: \t\t#else\n539: \t\t\tvec4 envMapColor = vec4( 0.0 );\n540: \t\t#endif\n541: \t\treturn PI * envMapColor.rgb * envMapIntensity;\n542: \t}\n543: \tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n544: \t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n545: \t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n546: \t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n547: \t}\n548: \tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n549: \t\t#ifdef ENVMAP_MODE_REFLECTION\n550: \t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n551: \t\t#else\n552: \t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n553: \t\t#endif\n554: \t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n555: \t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n556: \t\t#ifdef ENVMAP_TYPE_CUBE\n557: \t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n558: \t\t\t#ifdef TEXTURE_LOD_EXT\n559: \t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n560: \t\t\t#else\n561: \t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n562: \t\t\t#endif\n563: \t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n564: \t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n565: \t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n566: \t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n567: \t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n568: \t\t\tvec2 sampleUV;\n569: \t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n570: \t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n571: \t\t\t#ifdef TEXTURE_LOD_EXT\n572: \t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n573: \t\t\t#else\n574: \t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n575: \t\t\t#endif\n576: \t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n577: \t\t#elif defined( ENVMAP_TYPE_SPHERE )\n578: \t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n579: \t\t\t#ifdef TEXTURE_LOD_EXT\n580: \t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n581: \t\t\t#else\n582: \t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n583: \t\t\t#endif\n584: \t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n585: \t\t#endif\n586: \t\treturn envMapColor.rgb * envMapIntensity;\n587: \t}\n588: #endif\n589: \n590: varying vec3 vViewPosition;\n591: #ifndef FLAT_SHADED\n592: \tvarying vec3 vNormal;\n593: #endif\n594: struct BlinnPhongMaterial {\n595: \tvec3\tdiffuseColor;\n596: \tvec3\tspecularColor;\n597: \tfloat\tspecularShininess;\n598: \tfloat\tspecularStrength;\n599: };\n600: void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n601: \t#ifdef TOON\n602: \t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n603: \t#else\n604: \t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n605: \t\tvec3 irradiance = dotNL * directLight.color;\n606: \t#endif\n607: \t#ifndef PHYSICALLY_CORRECT_LIGHTS\n608: \t\tirradiance *= PI;\n609: \t#endif\n610: \treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n611: \treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n612: }\n613: void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n614: \treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n615: }\n616: #define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n617: #define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n618: #define Material_LightProbeLOD( material )\t(0)\n619: \n620: #ifdef USE_SHADOWMAP\n621: \t#if 0 > 0\n622: \t\tuniform sampler2D directionalShadowMap[ 0 ];\n623: \t\tvarying vec4 vDirectionalShadowCoord[ 0 ];\n624: \t#endif\n625: \t#if 0 > 0\n626: \t\tuniform sampler2D spotShadowMap[ 0 ];\n627: \t\tvarying vec4 vSpotShadowCoord[ 0 ];\n628: \t#endif\n629: \t#if 2 > 0\n630: \t\tuniform sampler2D pointShadowMap[ 2 ];\n631: \t\tvarying vec4 vPointShadowCoord[ 2 ];\n632: \t#endif\n633: \tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n634: \t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n635: \t}\n636: \tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n637: \t\tconst vec2 offset = vec2( 0.0, 1.0 );\n638: \t\tvec2 texelSize = vec2( 1.0 ) / size;\n639: \t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n640: \t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n641: \t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n642: \t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n643: \t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n644: \t\tvec2 f = fract( uv * size + 0.5 );\n645: \t\tfloat a = mix( lb, lt, f.y );\n646: \t\tfloat b = mix( rb, rt, f.y );\n647: \t\tfloat c = mix( a, b, f.x );\n648: \t\treturn c;\n649: \t}\n650: \tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n651: \t\tfloat shadow = 1.0;\n652: \t\tshadowCoord.xyz /= shadowCoord.w;\n653: \t\tshadowCoord.z += shadowBias;\n654: \t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n655: \t\tbool inFrustum = all( inFrustumVec );\n656: \t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n657: \t\tbool frustumTest = all( frustumTestVec );\n658: \t\tif ( frustumTest ) {\n659: \t\t#if defined( SHADOWMAP_TYPE_PCF )\n660: \t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n661: \t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n662: \t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n663: \t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n664: \t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n665: \t\t\tshadow = (\n666: \t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n667: \t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n668: \t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n669: \t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n670: \t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n671: \t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n672: \t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n673: \t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n674: \t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n675: \t\t\t) * ( 1.0 / 9.0 );\n676: \t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n677: \t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n678: \t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n679: \t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n680: \t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n681: \t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n682: \t\t\tshadow = (\n683: \t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n684: \t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n685: \t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n686: \t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n687: \t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n688: \t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n689: \t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n690: \t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n691: \t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n692: \t\t\t) * ( 1.0 / 9.0 );\n693: \t\t#else\n694: \t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n695: \t\t#endif\n696: \t\t}\n697: \t\treturn shadow;\n698: \t}\n699: \tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n700: \t\tvec3 absV = abs( v );\n701: \t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n702: \t\tabsV *= scaleToCube;\n703: \t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n704: \t\tvec2 planar = v.xy;\n705: \t\tfloat almostATexel = 1.5 * texelSizeY;\n706: \t\tfloat almostOne = 1.0 - almostATexel;\n707: \t\tif ( absV.z >= almostOne ) {\n708: \t\t\tif ( v.z > 0.0 )\n709: \t\t\t\tplanar.x = 4.0 - v.x;\n710: \t\t} else if ( absV.x >= almostOne ) {\n711: \t\t\tfloat signX = sign( v.x );\n712: \t\t\tplanar.x = v.z * signX + 2.0 * signX;\n713: \t\t} else if ( absV.y >= almostOne ) {\n714: \t\t\tfloat signY = sign( v.y );\n715: \t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n716: \t\t\tplanar.y = v.z * signY - 2.0;\n717: \t\t}\n718: \t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n719: \t}\n720: \tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n721: \t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n722: \t\tvec3 lightToPosition = shadowCoord.xyz;\n723: \t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n724: \t\tvec3 bd3D = normalize( lightToPosition );\n725: \t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n726: \t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n727: \t\t\treturn (\n728: \t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n729: \t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n730: \t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n731: \t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n732: \t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n733: \t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n734: \t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n735: \t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n736: \t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n737: \t\t\t) * ( 1.0 / 9.0 );\n738: \t\t#else\n739: \t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n740: \t\t#endif\n741: \t}\n742: #endif\n743: \n744: #ifdef USE_BUMPMAP\n745: \tuniform sampler2D bumpMap;\n746: \tuniform float bumpScale;\n747: \tvec2 dHdxy_fwd() {\n748: \t\tvec2 dSTdx = dFdx( vUv );\n749: \t\tvec2 dSTdy = dFdy( vUv );\n750: \t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n751: \t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n752: \t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n753: \t\treturn vec2( dBx, dBy );\n754: \t}\n755: \tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n756: \t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n757: \t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n758: \t\tvec3 vN = surf_norm;\n759: \t\tvec3 R1 = cross( vSigmaY, vN );\n760: \t\tvec3 R2 = cross( vN, vSigmaX );\n761: \t\tfloat fDet = dot( vSigmaX, R1 );\n762: \t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n763: \t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n764: \t}\n765: #endif\n766: \n767: #ifdef USE_NORMALMAP\n768: \tuniform sampler2D normalMap;\n769: \tuniform vec2 normalScale;\n770: \tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n771: \t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n772: \t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n773: \t\tvec2 st0 = dFdx( vUv.st );\n774: \t\tvec2 st1 = dFdy( vUv.st );\n775: \t\tvec3 S = normalize( q0 * st1.t - q1 * st0.t );\n776: \t\tvec3 T = normalize( -q0 * st1.s + q1 * st0.s );\n777: \t\tvec3 N = normalize( surf_norm );\n778: \t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n779: \t\tmapN.xy = normalScale * mapN.xy;\n780: \t\tmat3 tsn = mat3( S, T, N );\n781: \t\treturn normalize( tsn * mapN );\n782: \t}\n783: #endif\n784: \n785: #ifdef USE_SPECULARMAP\n786: \tuniform sampler2D specularMap;\n787: #endif\n788: #ifdef USE_LOGDEPTHBUF\n789: \tuniform float logDepthBufFC;\n790: \t#ifdef USE_LOGDEPTHBUF_EXT\n791: \t\tvarying float vFragDepth;\n792: \t#endif\n793: #endif\n794: \n795: #if 0 > 0\n796: \t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n797: \t\tvarying vec3 vViewPosition;\n798: \t#endif\n799: \tuniform vec4 clippingPlanes[ 0 ];\n800: #endif\n801: \n802: \n803: void main() {\n804: \n805: \t#if 0 > 0\n806: \tvec4 plane;\n807: \t\n808: \t#if 0 < 0\n809: \t\tbool clipped = true;\n810: \t\t\n811: \t\tif ( clipped ) discard;\n812: \t#endif\n813: #endif\n814: \n815: \n816: \tvec4 diffuseColor = vec4( diffuse, opacity );\n817: \tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n818: \tvec3 totalEmissiveRadiance = emissive;\n819: \n820: \t#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n821: \tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n822: #endif\n823: \t#ifdef USE_MAP\n824: \tvec4 texelColor = texture2D( map, vUv );\n825: \ttexelColor = mapTexelToLinear( texelColor );\n826: \tdiffuseColor *= texelColor;\n827: #endif\n828: \n829: \t#ifdef USE_COLOR\n830: \tdiffuseColor.rgb *= vColor;\n831: #endif\n832: \t#ifdef USE_ALPHAMAP\n833: \tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n834: #endif\n835: \n836: \t#ifdef ALPHATEST\n837: \tif ( diffuseColor.a < ALPHATEST ) discard;\n838: #endif\n839: \n840: \tfloat specularStrength;\n841: #ifdef USE_SPECULARMAP\n842: \tvec4 texelSpecular = texture2D( specularMap, vUv );\n843: \tspecularStrength = texelSpecular.r;\n844: #else\n845: \tspecularStrength = 1.0;\n846: #endif\n847: \t#ifdef FLAT_SHADED\n848: \tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n849: \tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n850: \tvec3 normal = normalize( cross( fdx, fdy ) );\n851: #else\n852: \tvec3 normal = normalize( vNormal );\n853: \t#ifdef DOUBLE_SIDED\n854: \t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n855: \t#endif\n856: #endif\n857: \n858: \t#ifdef USE_NORMALMAP\n859: \tnormal = perturbNormal2Arb( -vViewPosition, normal );\n860: #elif defined( USE_BUMPMAP )\n861: \tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n862: #endif\n863: \n864: \t#ifdef USE_EMISSIVEMAP\n865: \tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n866: \temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n867: \ttotalEmissiveRadiance *= emissiveColor.rgb;\n868: #endif\n869: \n870: \n871: \t// accumulation\n872: \tBlinnPhongMaterial material;\n873: material.diffuseColor = diffuseColor.rgb;\n874: material.specularColor = specular;\n875: material.specularShininess = shininess;\n876: material.specularStrength = specularStrength;\n877: \n878: \t\n879: GeometricContext geometry;\n880: geometry.position = - vViewPosition;\n881: geometry.normal = normal;\n882: geometry.viewDir = normalize( vViewPosition );\n883: IncidentLight directLight;\n884: #if ( 2 > 0 ) && defined( RE_Direct )\n885: \tPointLight pointLight;\n886: \t\n887: \t\tpointLight = pointLights[ 0 ];\n888: \t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n889: \t\t#ifdef USE_SHADOWMAP\n890: \t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ 0 ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ 0 ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n891: \t\t#endif\n892: \t\tRE_Direct( directLight, geometry, material, reflectedLight );\n893: \t\n894: \t\tpointLight = pointLights[ 1 ];\n895: \t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n896: \t\t#ifdef USE_SHADOWMAP\n897: \t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ 1 ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ 1 ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n898: \t\t#endif\n899: \t\tRE_Direct( directLight, geometry, material, reflectedLight );\n900: \t\n901: #endif\n902: #if ( 0 > 0 ) && defined( RE_Direct )\n903: \tSpotLight spotLight;\n904: \t\n905: #endif\n906: #if ( 0 > 0 ) && defined( RE_Direct )\n907: \tDirectionalLight directionalLight;\n908: \t\n909: #endif\n910: #if ( 0 > 0 ) && defined( RE_Direct_RectArea )\n911: \tRectAreaLight rectAreaLight;\n912: \t\n913: #endif\n914: #if defined( RE_IndirectDiffuse )\n915: \tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n916: \t#if ( 0 > 0 )\n917: \t\t\n918: \t#endif\n919: #endif\n920: #if defined( RE_IndirectSpecular )\n921: \tvec3 radiance = vec3( 0.0 );\n922: \tvec3 clearCoatRadiance = vec3( 0.0 );\n923: #endif\n924: \n925: \t#if defined( RE_IndirectDiffuse )\n926: \t#ifdef USE_LIGHTMAP\n927: \t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n928: \t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n929: \t\t\tlightMapIrradiance *= PI;\n930: \t\t#endif\n931: \t\tirradiance += lightMapIrradiance;\n932: \t#endif\n933: \t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n934: \t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n935: \t#endif\n936: #endif\n937: #if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n938: \tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n939: \t#ifndef STANDARD\n940: \t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n941: \t#endif\n942: #endif\n943: \n944: \t#if defined( RE_IndirectDiffuse )\n945: \tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n946: #endif\n947: #if defined( RE_IndirectSpecular )\n948: \tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n949: #endif\n950: \n951: \n952: \t// modulation\n953: \t#ifdef USE_AOMAP\n954: \tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n955: \treflectedLight.indirectDiffuse *= ambientOcclusion;\n956: \t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n957: \t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n958: \t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n959: \t#endif\n960: #endif\n961: \n962: \n963: \tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n964: \n965: \t#ifdef USE_ENVMAP\n966: \t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n967: \t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n968: \t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n969: \t\t#ifdef ENVMAP_MODE_REFLECTION\n970: \t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n971: \t\t#else\n972: \t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n973: \t\t#endif\n974: \t#else\n975: \t\tvec3 reflectVec = vReflect;\n976: \t#endif\n977: \t#ifdef ENVMAP_TYPE_CUBE\n978: \t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n979: \t#elif defined( ENVMAP_TYPE_EQUIREC )\n980: \t\tvec2 sampleUV;\n981: \t\treflectVec = normalize( reflectVec );\n982: \t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n983: \t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n984: \t\tvec4 envColor = texture2D( envMap, sampleUV );\n985: \t#elif defined( ENVMAP_TYPE_SPHERE )\n986: \t\treflectVec = normalize( reflectVec );\n987: \t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n988: \t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n989: \t#else\n990: \t\tvec4 envColor = vec4( 0.0 );\n991: \t#endif\n992: \tenvColor = envMapTexelToLinear( envColor );\n993: \t#ifdef ENVMAP_BLENDING_MULTIPLY\n994: \t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n995: \t#elif defined( ENVMAP_BLENDING_MIX )\n996: \t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n997: \t#elif defined( ENVMAP_BLENDING_ADD )\n998: \t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n999: \t#endif\n1000: #endif\n1001: \n1002: \n1003: \t// vec3 colorRA = colorA * (outgoingLight.r + outgoingLight.g + outgoingLight.b) / 1.;\n1004: \t// vec3 colorRB = colorB * (1.5 - (outgoingLight.r + outgoingLight.g + outgoingLight.b) / 1.);\n1005: \n1006: \n1007: \tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n1008:   float grayscaleValue = dot(gl_FragColor.rgb, vec3(0.299, 0.587, 0.114)) * 4.;\n1009: \tgl_FragColor = vec4((mix(vec4(colorB, 1.0), vec4(colorA, 1.0), grayscaleValue).rgb)  , diffuseColor.a );\n1010: \n1011: \t// vec3 colorR = smoothstep(colorB, colorA, vec3( (outgoingLight.r + outgoingLight.g + outgoingLight.b) / 3.)) / 1.5;\n1012: \n1013: \t// gl_FragColor = vec4( outgoingLight + grad.rgb, diffuseColor.a );\n1014: \t// gl_FragColor = grad;\n1015: \t// gl_FragColor = vec4( colorRA + colorRB * outgoingLight / 1., 1.);\n1016: \n1017: \t#if defined( TONE_MAPPING )\n1018:   gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n1019: #endif\n1020: \n1021: \t  gl_FragColor = linearToOutputTexel( gl_FragColor );\n1022: \n1023: \t#ifdef USE_FOG\n1024: \t#ifdef FOG_EXP2\n1025: \t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n1026: \t#else\n1027: \t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n1028: \t#endif\n1029: \tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n1030: #endif\n1031: \n1032: \t#ifdef PREMULTIPLIED_ALPHA\n1033: \tgl_FragColor.rgb *= gl_FragColor.a;\n1034: #endif\n1035: \n1036: \t#if defined( DITHERING )\n1037:   gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n1038: #endif\n1039: \n1040: \n1041: }\n1042: ) https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js:1:492126]', u'[console.error(THREE.WebGLProgram: shader error: , 0, gl.VALIDATE_STATUS, false, gl.getProgramInfoLog, Must have an compiled fragment shader attached., , 0:107(188): error: invalid input layout qualifier used\n0:114(170): error: invalid input layout qualifier used) https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js:1:500824]', u'[JavaScript Warning: "Error: WebGL warning: linkProgram: Must have an compiled fragment shader attached." {file: "https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js" line: 1}]', u'[JavaScript Warning: "Error: WebGL warning: useProgram: Program has not been successfully linked." {file: "https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js" line: 1}]', u'[JavaScript Warning: "Error: WebGL warning: drawArrays: The current program is not linked." {file: "https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js" line: 1}]', u'[console.log(                        ) https://www.foosballworldcup18.com/:4:1]', u'[JavaScript Warning: "Error: WebGL warning: useProgram: Program has not been successfully linked." {file: "https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js" line: 1}]', u'[JavaScript Warning: "Error: WebGL warning: drawArrays: Drawing without vertex attrib 0 array enabled forces the browser to do expensive emulation work when running on desktop OpenGL platforms, for example on Mac. It is preferable to always draw with vertex attrib 0 array enabled, by using bindAttribLocation to bind some always-used attribute to location 0." {file: "https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js" line: 1}]', u"[console.error(THREE.WebGLShader: Shader couldn't compile.) https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js:1:492037]", u'[console.error(THREE.WebGLProgram: shader error: , 1282, gl.VALIDATE_STATUS, false, gl.getProgramInfoLog, Must have an compiled fragment shader attached., , 0:110(188): error: invalid input layout qualifier used\n0:117(170): error: invalid input layout qualifier used) https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js:1:500824]', u'[JavaScript Warning: "Error: WebGL warning: linkProgram: Must have an compiled fragment shader attached." {file: "https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js" line: 1}]', u'[JavaScript Warning: "Error: WebGL warning: useProgram: Program has not been successfully linked." {file: "https://www.foosballworldcup18.com/static/js/app.d92247839b0c213b46b7.js" line: 1}]', u'[JavaScript Warning: "The resource at https://platform.twitter.com/widgets.js was blocked because content blocking is enabled." {file: "https://www.foosballworldcup18.com/" line: 0}]', u'[JavaScript Warning: "Loading failed for the  Githubissues.
            
  • Githubissues is a development platform for aggregating issues.