diff --git a/assets/shader/focus.hlsl b/assets/shader/focus.hlsl index 1607e438..fb41a19f 100644 --- a/assets/shader/focus.hlsl +++ b/assets/shader/focus.hlsl @@ -37,10 +37,7 @@ float perlinNoise(vec2 p, float iteration) for (float i = 0.0; i < MAX_ITERATIONS; i += 1.0) { - if (i >= iteration) - { - break; - } + if (i >= iteration) break; float freq = pow(2.0, i); float Amp = 1.0 / freq; diff --git a/assets/shader/fog.hlsl b/assets/shader/fog.hlsl index 2ed65e7c..f0bc4b13 100644 --- a/assets/shader/fog.hlsl +++ b/assets/shader/fog.hlsl @@ -49,10 +49,7 @@ float perlinNoise3d(vec3 pos, float size, float seed, float iteration) float r = 0.0; for (float i = 0.0; i < MAX_ITERATIONS; i++) { - if (i >= iteration) - { - break; - } + if (i >= iteration) break; float freq = pow(2.0, i); r += Noise3d(pos, size * freq, seed) * (1.0 / freq); } diff --git a/assets/shader/gaussianBlur.hlsl b/assets/shader/gaussianBlur.hlsl index 3933c1b5..6dc67041 100644 --- a/assets/shader/gaussianBlur.hlsl +++ b/assets/shader/gaussianBlur.hlsl @@ -10,15 +10,9 @@ vec4 effect(vec4 color, sampler2D tex, vec2 texCoord, vec2 scrCoord) { float weightSum = 0.0; for (float x = 0.0; x < MAX_ITERATIONS; x++) { - if (x >= smpCount) - { - break; - } + if (x >= smpCount) break; for (float y = 0.0; y < MAX_ITERATIONS; y++) { - if (y >= smpCount) - { - break; - } + if (y >= smpCount) break; vec2 kuvCentered = vec2(x, y) / smpCount - 0.5; // uv coord within the kernel float bell = cos(length(kuvCentered) * 3.141592653589793) * 0.5 + 0.5; diff --git a/assets/shader/gaussianSharp.hlsl b/assets/shader/gaussianSharp.hlsl index ed187e41..0aec31d3 100644 --- a/assets/shader/gaussianSharp.hlsl +++ b/assets/shader/gaussianSharp.hlsl @@ -12,15 +12,9 @@ vec4 effect(vec4 color, sampler2D tex, vec2 texCoord, vec2 scrCoord) { float weightSum = 0.0; for (float x = 0.0; x < MAX_ITERATIONS; x++) { - if (x >= smpCount) - { - break; - } + if (x >= smpCount) break; for (float y = 0.0; y < MAX_ITERATIONS; y++) { - if (y >= smpCount) - { - break; - } + if (y >= smpCount) break; vec2 kuvCentered = vec2(x, y) / smpCount - 0.5; // uv coord within the kernel float bell = cos(length(kuvCentered) * 3.141592653589793) * 0.5 + 0.5;