diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-06-23 13:34:02 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-06-23 13:34:02 +0200 |
| commit | 051668fe9ac8d02fd9546e588d4255ee5e120f40 (patch) | |
| tree | c36e1415e78c37c71b0abaab3099349d8650d9dd /src/main/resources | |
| parent | 72b8d8c8a37cd4396de44f0bcd2a9e8bd4b073b9 (diff) | |
| download | Firmament-051668fe9ac8d02fd9546e588d4255ee5e120f40.tar.gz Firmament-051668fe9ac8d02fd9546e588d4255ee5e120f40.tar.bz2 Firmament-051668fe9ac8d02fd9546e588d4255ee5e120f40.zip | |
feat: Add dev capes
Diffstat (limited to 'src/main/resources')
| -rw-r--r-- | src/main/resources/assets/firmament/shaders/cape/parallax.fsh | 53 | ||||
| -rw-r--r-- | src/main/resources/assets/firmament/textures/cape/REUSE.toml | 16 | ||||
| -rw-r--r-- | src/main/resources/assets/firmament/textures/cape/firm_static.png | bin | 0 -> 42249 bytes | |||
| -rw-r--r-- | src/main/resources/assets/firmament/textures/cape/firmament_star.png | bin | 0 -> 1141 bytes | |||
| -rw-r--r-- | src/main/resources/assets/firmament/textures/cape/parallax_background.png | bin | 0 -> 2053 bytes | |||
| -rw-r--r-- | src/main/resources/assets/firmament/textures/cape/parallax_template.png | bin | 0 -> 516 bytes |
6 files changed, 69 insertions, 0 deletions
diff --git a/src/main/resources/assets/firmament/shaders/cape/parallax.fsh b/src/main/resources/assets/firmament/shaders/cape/parallax.fsh new file mode 100644 index 0000000..bc9a440 --- /dev/null +++ b/src/main/resources/assets/firmament/shaders/cape/parallax.fsh @@ -0,0 +1,53 @@ +#version 150 + +#moj_import <minecraft:fog.glsl> +#define M_PI 3.1415926535897932384626433832795 +#define M_TAU (2.0 * M_PI) +uniform sampler2D Sampler0; +uniform sampler2D Sampler1; +uniform sampler2D Sampler3; + +uniform vec4 ColorModulator; +uniform float FogStart; +uniform float FogEnd; +uniform vec4 FogColor; +uniform float Animation; + +in float vertexDistance; +in vec4 vertexColor; +in vec4 lightMapColor; +in vec4 overlayColor; +in vec2 texCoord0; + +out vec4 fragColor; + +float highlightDistance(vec2 coord, vec2 direction, float time) { + vec2 dir = normalize(direction); + float projection = dot(coord, dir); + float animationTime = sin(projection + time * 13 * M_TAU); + if (animationTime < 0.997) { + return 0.0; + } + return animationTime; +} + +void main() { + vec4 color = texture(Sampler0, texCoord0); + if (color.g > 0.99) { + // TODO: maybe this speed in each direction should be a uniform + color = texture(Sampler1, texCoord0 + Animation * vec2(3.0, -2.0)); + } + + vec4 highlightColor = texture(Sampler3, texCoord0); + if (highlightColor.a > 0.5) { + color = highlightColor; + float animationHighlight = highlightDistance(texCoord0, vec2(-12.0, 2.0), Animation); + color.rgb += (animationHighlight); + } + #ifdef ALPHA_CUTOUT + if (color.a < ALPHA_CUTOUT) { + discard; + } + #endif + fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); +} diff --git a/src/main/resources/assets/firmament/textures/cape/REUSE.toml b/src/main/resources/assets/firmament/textures/cape/REUSE.toml new file mode 100644 index 0000000..7cb21f2 --- /dev/null +++ b/src/main/resources/assets/firmament/textures/cape/REUSE.toml @@ -0,0 +1,16 @@ +#SPDX-FileCopyrightText: 2025 Linnea Gräf <nea@nea.moe> +# +#SPDX-License-Identifier: CC0-1.0 +version = 1 + +[[annotations]] +path = ["firmament_star.png", "parallax_background.png", "parallax_template.png"] +SPDX-License-Identifier = "CC-BY-4.0" +SPDX-FileCopyrightText = ["ic22487", "Linnea Gräf"] + +[[annotations]] +path = ["firm_static.png"] +SPDX-License-Identifier = "CC-BY-4.0" +SPDX-FileCopyrightText = ["ic22487", "kathund"] + + diff --git a/src/main/resources/assets/firmament/textures/cape/firm_static.png b/src/main/resources/assets/firmament/textures/cape/firm_static.png Binary files differnew file mode 100644 index 0000000..b01511c --- /dev/null +++ b/src/main/resources/assets/firmament/textures/cape/firm_static.png diff --git a/src/main/resources/assets/firmament/textures/cape/firmament_star.png b/src/main/resources/assets/firmament/textures/cape/firmament_star.png Binary files differnew file mode 100644 index 0000000..520d309 --- /dev/null +++ b/src/main/resources/assets/firmament/textures/cape/firmament_star.png diff --git a/src/main/resources/assets/firmament/textures/cape/parallax_background.png b/src/main/resources/assets/firmament/textures/cape/parallax_background.png Binary files differnew file mode 100644 index 0000000..05ef0fa --- /dev/null +++ b/src/main/resources/assets/firmament/textures/cape/parallax_background.png diff --git a/src/main/resources/assets/firmament/textures/cape/parallax_template.png b/src/main/resources/assets/firmament/textures/cape/parallax_template.png Binary files differnew file mode 100644 index 0000000..ada76eb --- /dev/null +++ b/src/main/resources/assets/firmament/textures/cape/parallax_template.png |
