uniform samplerRECT samp0 : register(s0); const float2 samples[8] = { float2(-1.5, -1.5), float2(-2.5, 0), float2(-1.5, 1.5), float2(0, 2.5), float2(1.5, 1.5), float2(2.5, 0), float2(1.5, -1.5), float2(0, -2.5), }; void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0) { float4 c_center = texRECT(samp0, uv0).rgba; float4 bloom_sum = float4(0.0, 0.0, 0.0, 0.0); uv0 += float2(0.3, 0.3); float radius1 = 1.3; bloom_sum += texRECT(samp0, uv0 + float2(-1.5, -1.5) * radius1); bloom_sum += texRECT(samp0, uv0 + float2(-2.5, 0) * radius1); bloom_sum += texRECT(samp0, uv0 + float2(-1.5, 1.5) * radius1); bloom_sum += texRECT(samp0, uv0 + float2(0, 2.5) * radius1); bloom_sum += texRECT(samp0, uv0 + float2(1.5, 1.5) * radius1); bloom_sum += texRECT(samp0, uv0 + float2(2.5, 0) * radius1); bloom_sum += texRECT(samp0, uv0 + float2(1.5, -1.5) * radius1); bloom_sum += texRECT(samp0, uv0 + float2(0, -2.5) * radius1); float radius2 = 4.6; bloom_sum += texRECT(samp0, uv0 + float2(-1.5, -1.5) * radius2); bloom_sum += texRECT(samp0, uv0 + float2(-2.5, 0) * radius2); bloom_sum += texRECT(samp0, uv0 + float2(-1.5, 1.5) * radius2); bloom_sum += texRECT(samp0, uv0 + float2(0, 2.5) * radius2); bloom_sum += texRECT(samp0, uv0 + float2(1.5, 1.5) * radius2); bloom_sum += texRECT(samp0, uv0 + float2(2.5, 0) * radius2); bloom_sum += texRECT(samp0, uv0 + float2(1.5, -1.5) * radius2); bloom_sum += texRECT(samp0, uv0 + float2(0, -2.5) * radius2); bloom_sum *= 0.07; bloom_sum -= float4(0.3, 0.3, 0.3, 0.3); bloom_sum = max(bloom_sum, float4(0,0,0,0)); ocol0 = c_center * 0.7 + bloom_sum; }