mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:39:07 +00:00
085fa5f526
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3380 8ced0084-cf51-0410-be5f-012b33b47a6e
46 lines
1.7 KiB
Plaintext
46 lines
1.7 KiB
Plaintext
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;
|
|
}
|