@@ -13784,7 +13784,7 @@ var specularmap_pars_fragment = "#ifdef USE_SPECULARMAP\n\tuniform sampler2D spe
1378413784
1378513785var tonemapping_fragment = "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif";
1378613786
13787- var tonemapping_pars_fragment = "#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }";
13787+ var tonemapping_pars_fragment = "#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }";
1378813788
1378913789var transmission_fragment = "#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif";
1379013790
@@ -19379,6 +19379,9 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
1937919379
1938019380		prefixVertex = [
1938119381
19382+ 			'#define SHADER_TYPE ' + parameters.shaderType,
19383+ 			'#define SHADER_NAME ' + parameters.shaderName,
19384+ 
1938219385			customDefines
1938319386
1938419387		].filter( filterEmptyLine ).join( '\n' );
@@ -19392,6 +19395,10 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
1939219395		prefixFragment = [
1939319396
1939419397			customExtensions,
19398+ 
19399+ 			'#define SHADER_TYPE ' + parameters.shaderType,
19400+ 			'#define SHADER_NAME ' + parameters.shaderName,
19401+ 
1939519402			customDefines
1939619403
1939719404		].filter( filterEmptyLine ).join( '\n' );
@@ -19408,6 +19415,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
1940819415
1940919416			generatePrecision( parameters ),
1941019417
19418+ 			'#define SHADER_TYPE ' + parameters.shaderType,
1941119419			'#define SHADER_NAME ' + parameters.shaderName,
1941219420
1941319421			customDefines,
@@ -19621,6 +19629,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
1962119629
1962219630			generatePrecision( parameters ),
1962319631
19632+ 			'#define SHADER_TYPE ' + parameters.shaderType,
1962419633			'#define SHADER_NAME ' + parameters.shaderName,
1962519634
1962619635			customDefines,
@@ -19919,6 +19928,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
1991919928
1992019929	//
1992119930
19931+ 	this.type = parameters.shaderType;
1992219932	this.name = parameters.shaderName;
1992319933	this.id = programIdCount ++;
1992419934	this.cacheKey = cacheKey;
@@ -20212,7 +20222,8 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
2021220222			isWebGL2: IS_WEBGL2,
2021320223
2021420224			shaderID: shaderID,
20215- 			shaderName: material.type,
20225+ 			shaderType: material.type,
20226+ 			shaderName: material.name,
2021620227
2021720228			vertexShader: vertexShader,
2021820229			fragmentShader: fragmentShader,
@@ -29119,7 +29130,7 @@ class WebGLRenderer {
2911929130
2912029131				const isWebGL2 = capabilities.isWebGL2;
2912129132
29122- 				_transmissionRenderTarget = new WebGLRenderTarget( 1024, 1024, {
29133+ 				_transmissionRenderTarget = new WebGLRenderTarget( 1024 * _pixelRatio , 1024 * _pixelRatio , {
2912329134					generateMipmaps: true,
2912429135					type: extensions.has( 'EXT_color_buffer_half_float' ) ? HalfFloatType : UnsignedByteType,
2912529136					minFilter: LinearMipmapLinearFilter,
0 commit comments