diff --git a/assets/audio/gameplay/ballhit.ogg b/assets/audio/gameplay/ballhit.ogg new file mode 100644 index 0000000..b7a35eb Binary files /dev/null and b/assets/audio/gameplay/ballhit.ogg differ diff --git a/assets/audio/gameplay/music/track_1.wav b/assets/audio/gameplay/music/track_1.wav new file mode 100644 index 0000000..01fc7f8 Binary files /dev/null and b/assets/audio/gameplay/music/track_1.wav differ diff --git a/assets/audio/ui/select.ogg b/assets/audio/ui/select.ogg new file mode 100644 index 0000000..856a60d Binary files /dev/null and b/assets/audio/ui/select.ogg differ diff --git a/assets/shaders/crt.fs b/assets/shaders/crt.fs new file mode 100644 index 0000000..db8f03c --- /dev/null +++ b/assets/shaders/crt.fs @@ -0,0 +1,48 @@ +#version 330 + +in vec2 fragTexCoord; +in vec4 fragColor; + +out vec4 finalColor; + +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// Adjust these values to tweak the aesthetic: +const float SCANLINE_INTENSITY = 0.25; // Lower value = softer lines (0.08 to 0.20) +const float BLOOM_AMOUNT = 0.10; // Slight phosphor bleed/glow +const float CRT_CURVATURE = 0.03; // Subtle screen bulge (0.0 = flat) + +void main() { + // 1. Subtle screen curvature distortion + vec2 uv = fragTexCoord; + vec2 dc = abs(0.5 - uv); + uv.x += uv.x * (dc.y * dc.y) * CRT_CURVATURE; + uv.y += uv.y * (dc.x * dc.x) * CRT_CURVATURE; + + // Discard pixels outside the curved screen bounds + if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) { + finalColor = vec4(0.0, 0.0, 0.0, 1.0); + return; + } + + // 2. Sample pixel with slight horizontal blur (Phosphor bleed) + vec4 col = texture(texture0, uv); + vec4 col_left = texture(texture0, uv - vec2(0.0008, 0.0)); + vec4 col_right = texture(texture0, uv + vec2(0.0008, 0.0)); + col.rgb = mix(col.rgb, (col_left.rgb + col_right.rgb) * 0.5, BLOOM_AMOUNT); + + // 3. Gaussian scanline profile matching 360 vertical lines + float scanline = sin(uv.y * 360.0 * 3.14159); + // Smooth power curve prevents harsh pitch-black cutoffs + float scanline_factor = pow(0.5 + 0.5 * scanline, 1.8); + + // Apply scanlines smoothly + col.rgb *= mix(1.0 - SCANLINE_INTENSITY, 1.0, scanline_factor); + + // 4. Subtle corner vignette + float vig = (16.0 * uv.x * uv.y * (1.0 - uv.x) * (1.0 - uv.y)); + col.rgb *= pow(vig, 0.05); + + finalColor = col * colDiffuse * fragColor; +} \ No newline at end of file