Skip to content

Commit

Permalink
格式化
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Nov 20, 2024
1 parent 2ab8188 commit dd7d401
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
5 changes: 1 addition & 4 deletions assets/shader/focus.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 1 addition & 4 deletions assets/shader/fog.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
10 changes: 2 additions & 8 deletions assets/shader/gaussianBlur.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 2 additions & 8 deletions assets/shader/gaussianSharp.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dd7d401

Please sign in to comment.