diff --git a/dist/post_shaders/Bloom.fx b/dist/post_shaders/Bloom.fx index dcc6d15a06..a450b21331 100644 --- a/dist/post_shaders/Bloom.fx +++ b/dist/post_shaders/Bloom.fx @@ -44,9 +44,9 @@ float4 PS_Bloom(float4 pos : SV_Position, float2 uv : TEXCOORD) : SV_Target float spread = 0.002 * gray / max(saturation, 0.25) * Radius; float3 sum = float3(0.0, 0.0, 0.0); - for (int x = -3; x <= 3; x += 2) + [unroll] for (int x = -3; x <= 3; x += 2) { - for (int y = -3; y <= 3; y += 2) + [unroll] for (int y = -3; y <= 3; y += 2) { float3 tap = tex2D(BackBuffer, uv + float2(x, y) * spread).rgb; sum += tap * Weight(tap); diff --git a/dist/post_shaders/Blur.fx b/dist/post_shaders/Blur.fx index bb9c48b6d7..aa17d03c2e 100644 --- a/dist/post_shaders/Blur.fx +++ b/dist/post_shaders/Blur.fx @@ -60,7 +60,7 @@ float4 PS_Blur(float4 pos : SV_Position, float2 uv : TEXCOORD) : SV_Target float3 sum = float3(0.0, 0.0, 0.0); float total = 0.0; - for (int i = 0; i < TAPS; ++i) + [unroll] for (int i = 0; i < TAPS; ++i) { float reach = sqrt((float(i) + 0.5) / float(TAPS)); sum += tex2D(BackBuffer, uv + spoke * reach * texel * Radius).rgb * weight; diff --git a/dist/post_shaders/Deband.fx b/dist/post_shaders/Deband.fx index fe4f3a3423..96086a9c6c 100644 --- a/dist/post_shaders/Deband.fx +++ b/dist/post_shaders/Deband.fx @@ -51,7 +51,7 @@ float4 PS_Deband(float4 pos : SV_Position, float2 uv : TEXCOORD) : SV_Target float3 total = float3(0.0, 0.0, 0.0); float3 deviation = float3(0.0, 0.0, 0.0); - for (int ring = 1; ring <= 2; ++ring) + [unroll] for (int ring = 1; ring <= 2; ++ring) { float angle = base + float(ring) * 2.3999632; float reach = Radius * float(ring) * 0.5; diff --git a/dist/post_shaders/Denoise.fx b/dist/post_shaders/Denoise.fx index 2921535fe3..c87e33a446 100644 --- a/dist/post_shaders/Denoise.fx +++ b/dist/post_shaders/Denoise.fx @@ -54,9 +54,9 @@ float4 PS_Denoise(float4 pos : SV_Position, float2 uv : TEXCOORD) : SV_Target float3 sum = float3(0.0, 0.0, 0.0); float3 total = float3(0.0, 0.0, 0.0); - for (int y = -2; y <= 2; ++y) + [unroll] for (int y = -2; y <= 2; ++y) { - for (int x = -2; x <= 2; ++x) + [unroll] for (int x = -2; x <= 2; ++x) { float2 offset = float2(x, y); float3 tap = tex2D(BackBuffer, uv + offset * texel).rgb; diff --git a/dist/post_shaders/MotionBlur.fx b/dist/post_shaders/MotionBlur.fx index 21c6cde2b3..d541b5db9d 100644 --- a/dist/post_shaders/MotionBlur.fx +++ b/dist/post_shaders/MotionBlur.fx @@ -66,7 +66,7 @@ float4 PS_MotionBlur(float4 pos : SV_Position, float2 uv : TEXCOORD) : SV_Target float jitter = frac(sin(dot(pos.xy, float2(12.9898, 78.233))) * 43758.5453); float3 sum = float3(0.0, 0.0, 0.0); - for (int i = 0; i < TAPS; ++i) + [unroll] for (int i = 0; i < TAPS; ++i) { float t = (float(i) + jitter) / float(TAPS) - 0.5; sum += tex2D(BackBuffer, uv + velocity * t).rgb;