// MinecraftPT — Bloom_FS // Final bloom composite onto the scene. // bloomB is a fixed 1024x1024 image; the valid bloom region for this screen // is its top-left (viewWidth/4 x viewHeight/4) texels, so UV = screen / 4096. #include "/Lib/Settings.glsl" #include "/Lib/Utilities.glsl" uniform sampler2D colortex12; uniform sampler2D bloomB; layout(location = 0) out vec4 colorOut; void main(){ vec2 texelCoord = gl_FragCoord.xy; vec3 scene = texelFetch(colortex12, ivec2(texelCoord), 0).rgb; vec3 bloom = textureLod(bloomB, clamp(texelCoord / 4096.0, vec2(0.0), vec2(1.0)), 0.0).rgb; vec3 color = scene + bloom * BLOOM_AMOUNT; colorOut = vec4(color, 1.0); }