forked from space-wizards/space-station-14
-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed frezon & water vapour a little. added ammonia shader.
- Loading branch information
Ruddygreat
committed
Feb 10, 2025
1 parent
8fa0959
commit bbacc83
Showing
5 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
Resources/Textures/_Impstation/Shaders/ammonia_gas_shader.swsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
uniform highp vec4 colour; | ||
|
||
uniform sampler2D noise_0; | ||
uniform sampler2D noise_1; | ||
uniform sampler2D noise_2; | ||
|
||
const highp float tileSize = 32.0; | ||
|
||
void fragment() { | ||
|
||
highp float multiple = (1.0 / tileSize); | ||
highp vec2 rem = vec2(mod(UV.x, multiple), mod(UV.y, multiple)); | ||
highp vec2 rounded = UV - rem; //downsample to a 32 * 32 grid for stylistic consistency | ||
|
||
COLOR = 0.3 * texture(noise_0, loopVec(rounded + TIME * 0.1)); | ||
COLOR += 0.3 * texture(noise_0, loopVec(vec2(rounded.x - TIME * 0.1, rounded.y + 0.2 + TIME * 0.1))); | ||
COLOR += 0.3 * texture(noise_2, loopVec(rounded + vec2(0.2, 0.7))); | ||
COLOR += 0.1 * texture(noise_1, loopVec(vec2(rounded.x + sin(rounded.y + TIME * 0.1), rounded.y + cos(rounded.x + TIME * 0.1)))); | ||
COLOR *= colour; | ||
} | ||
|
||
//hate that I have to do this because we can't just | ||
highp vec2 loopVec(highp vec2 toLoop) { | ||
return abs(mod(toLoop, 1));; | ||
} | ||
|
||
//copied out from an error.glsl file so that I can actually edit these | ||
//g because gas :) | ||
highp vec2 gRandom(highp vec2 uv){ | ||
uv = vec2( dot(uv, vec2(127.1,311.7) ), | ||
dot(uv, vec2(269.5,183.3) ) ); | ||
return -1.0 + 2.0 * fract(sin(uv) * 43758.5453123); | ||
} | ||
|
||
highp float gNoise(highp vec2 uv) { | ||
|
||
highp vec2 uv_index = floor(uv); | ||
highp vec2 uv_fract = fract(uv); | ||
|
||
highp vec2 blur = uv_fract * uv_fract * (3.0 - 2.0 * uv_fract); | ||
|
||
return mix( mix( dot( gRandom(uv_index + vec2(0.0,0.0) ), uv_fract - vec2(0.0,0.0) ), | ||
dot( gRandom(uv_index + vec2(1.0,0.0) ), uv_fract - vec2(1.0,0.0) ), blur.x), | ||
mix( dot( gRandom(uv_index + vec2(0.0,1.0) ), uv_fract - vec2(0.0,1.0) ), | ||
dot( gRandom(uv_index + vec2(1.0,1.0) ), uv_fract - vec2(1.0,1.0) ), blur.x), blur.y) * 0.5 + 0.5; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters