2009-06-08 19:42:25 +00:00
|
|
|
uniform samplerRECT samp0 : register(s0);
|
|
|
|
|
2009-06-08 20:29:20 +00:00
|
|
|
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0, in float2 uv1 : TEXCOORD1)
|
2009-06-08 19:42:25 +00:00
|
|
|
{
|
2009-06-08 20:29:20 +00:00
|
|
|
float4 c_center = texRECT(samp0, uv0.xy).rgba;
|
2009-06-08 19:42:25 +00:00
|
|
|
|
|
|
|
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));
|
|
|
|
|
2009-06-08 20:29:20 +00:00
|
|
|
float2 vpos = (uv1 - float2(.5, .5)) * 2;
|
|
|
|
float dist = (dot(vpos, vpos));
|
|
|
|
dist = 1 - 0.4*dist;
|
|
|
|
|
|
|
|
ocol0 = (c_center * 0.7 + bloom_sum) * dist;
|
2009-06-08 19:42:25 +00:00
|
|
|
}
|