Variable BLOOM_UPSAMPLE_FRAGMENT_SHADERConst
BLOOM_UPSAMPLE_FRAGMENT_SHADER: "\n precision highp float;\n in vec2 vUv;\n out vec4 fragColor;\n\n uniform sampler2D uInput;\n uniform vec2 uTexelSize;\n uniform float uRadius;\n\n void main() {\n vec2 r = uTexelSize * uRadius;\n vec3 s0 = texture(uInput, vUv + r * vec2(-1.0, 0.0)).rgb;\n vec3 s1 = texture(uInput, vUv + r * vec2( 1.0, 0.0)).rgb;\n vec3 s2 = texture(uInput, vUv + r * vec2( 0.0, -1.0)).rgb;\n vec3 s3 = texture(uInput, vUv + r * vec2( 0.0, 1.0)).rgb;\n vec3 c = texture(uInput, vUv).rgb;\n fragColor = vec4(c * 0.5 + (s0 + s1 + s2 + s3) * 0.125, 1.0);\n }\n" = ...
4-tap tent upsample. Samples the smaller mip with a unit-radius tent and additively blends into the larger mip (achieved by blending with
THREE.AdditiveBlendingon the material).