Skip to content

Commit 78554fa

Browse files
committed
Refactor shader imports and add new shader files
- Updated shader imports in shaders.tsx to remove file extensions for consistency. - Added new shader files for various effects: - android.tsx: Retro 8-bit pixel effect with dynamic color cycling. - default.tsx: Basic vertex shader for positioning. - dreamcast.tsx: Dreamcast-inspired background with grid and spiral effects. - iwhbyd.tsx: Halo-themed shader with hexagonal grid and cosmic effects. - konami_code.tsx: Pixelated retro animation shader. - missing_no.tsx: Game Boy-inspired shader with glitch effects. - oceangate.tsx: Underwater scene with seaweed and bubble particles. - re5.tsx: RE5-themed shader with organic virus effects. - silent_hill.tsx: Fog simulation shader with ash particles.
1 parent 948a503 commit 78554fa

10 files changed

Lines changed: 35 additions & 18 deletions

File tree

src/components/background/shaders.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import androidShaderSource from "./shaders/android.glsl";
2-
import dreamcastShaderSource from "./shaders/dreamcast.glsl";
3-
import iwhbydShaderSource from "./shaders/iwhbyd.glsl";
4-
import konamiCodeShaderSource from "./shaders/konami_code.glsl";
5-
import missingNoShaderSource from "./shaders/missing_no.glsl";
6-
import oceangateShaderSource from "./shaders/oceangate.glsl";
7-
import re5ShaderSource from "./shaders/re5.glsl";
8-
import silentHillShaderSource from "./shaders/silent_hill.glsl";
9-
import defaultVertextSource from "./shaders/default.vert";
1+
import androidShaderSource from "./shaders/android";
2+
import dreamcastShaderSource from "./shaders/dreamcast";
3+
import iwhbydShaderSource from "./shaders/iwhbyd";
4+
import konamiCodeShaderSource from "./shaders/konami_code";
5+
import missingNoShaderSource from "./shaders/missing_no";
6+
import oceangateShaderSource from "./shaders/oceangate";
7+
import re5ShaderSource from "./shaders/re5";
8+
import silentHillShaderSource from "./shaders/silent_hill";
9+
import defaultVertextSource from "./shaders/default";
1010

1111
export type ShaderKind = "android" | "iwhbyd" | "konami_code" | "missing_no" | "oceangate" | "re5" | "silent_hill" | "dreamcast" | "default" | "unknown";
1212

src/components/background/shaders/android.glsl renamed to src/components/background/shaders/android.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export default `
12
precision mediump float;
23
uniform vec2 u_resolution;
34
uniform float u_time;
@@ -50,7 +51,6 @@ void main() {
5051
vec3 neonYellow = vec3(0.88, 0.85, 0.20) + cos(colorCycle * 1.5) * 0.10;
5152
vec3 digitalWhite = vec3(0.95, 0.98, 0.95); // Fixed highlight core
5253
53-
// 5. Hq12weasdrfwxeazwaq 1`23456RYTUTTTFD 1QQDGTHYUJ Q e3q24re5tr6ytu21yhgtfredsw1Azeard Color Posterization and Multi-Band Zoning
5454
vec3 finalColor = glassLiquid;
5555
5656
if (totalInfluence > 2.8) {
@@ -97,4 +97,5 @@ void main() {
9797
finalColor = floor(finalColor * 5.0) / 5.0; // Hard clamp color depth bits
9898
9999
gl_FragColor = vec4(finalColor, 1.0);
100-
}
100+
}
101+
`;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
export default `
12
attribute vec2 position;
23
void main() {
34
gl_Position = vec4(position, 0.0, 1.0);
4-
}
5+
}
6+
`;

src/components/background/shaders/dreamcast.glsl renamed to src/components/background/shaders/dreamcast.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export default `
12
precision highp float;
23
uniform vec2 u_resolution;
34
uniform vec2 u_mouse;
@@ -170,3 +171,4 @@ void main() {
170171
171172
gl_FragColor = vec4(finalColor, 1.0);
172173
}
174+
`;

src/components/background/shaders/iwhbyd.glsl renamed to src/components/background/shaders/iwhbyd.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export default `
12
precision highp float;
23
uniform vec2 u_resolution;
34
uniform vec2 u_mouse;
@@ -92,4 +93,5 @@ void main() {
9293
}
9394
9495
gl_FragColor = vec4(finalColor, 1.0);
95-
}
96+
}
97+
`;

src/components/background/shaders/konami_code.glsl renamed to src/components/background/shaders/konami_code.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export default `
12
precision mediump float;
23
uniform vec2 u_resolution;
34
uniform float u_time;
@@ -14,4 +15,5 @@ void main() {
1415
float colorB = cos(uv.y * 4.0 - u_time) * 0.5 + 0.5;
1516
1617
gl_FragColor = vec4(colorA, colorB, 0.8, 1.0);
17-
}
18+
}
19+
`;

src/components/background/shaders/missing_no.glsl renamed to src/components/background/shaders/missing_no.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export default `
12
precision mediump float;
23
uniform vec2 u_resolution;
34
uniform float u_time;
@@ -53,4 +54,5 @@ void main() {
5354
}
5455
5556
gl_FragColor = finalColor;
56-
}
57+
}
58+
`;

src/components/background/shaders/oceangate.glsl renamed to src/components/background/shaders/oceangate.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export default `
12
precision mediump float;
23
uniform vec2 u_resolution;
34
uniform float u_time;
@@ -87,4 +88,5 @@ void main() {
8788
finalColor *= vignette;
8889
8990
gl_FragColor = vec4(finalColor, 1.0);
90-
}
91+
}
92+
`;

src/components/background/shaders/re5.glsl renamed to src/components/background/shaders/re5.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export default `
12
precision highp float;
23
uniform vec2 u_resolution;
34
uniform float u_time;
@@ -109,4 +110,5 @@ void main() {
109110
110111
// Final color wash correction step
111112
gl_FragColor = vec4(finalColor, 1.0);
112-
}
113+
}
114+
`;

src/components/background/shaders/silent_hill.glsl renamed to src/components/background/shaders/silent_hill.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
export default `
12
precision mediump float;
23
uniform vec2 u_resolution;
34
uniform float u_time;
@@ -70,4 +71,5 @@ void main() {
7071
vec3 finalColor = mix(finalFog, ashColor, ashParticle * 0.7);
7172
7273
gl_FragColor = vec4(finalColor, 1.0);
73-
}
74+
}
75+
`;

0 commit comments

Comments
 (0)