18 lines
517 B
Plaintext
18 lines
517 B
Plaintext
shader_type canvas_item;
|
|
|
|
// Snippets of code drawn from https://gist.github.com/Bleuje/1e497df4505ca24c39ab3930a95700b3
|
|
|
|
uniform sampler2D sim_texture;
|
|
|
|
float gn(in vec2 coordinate, in float seed){
|
|
return fract(tan(distance(coordinate*(seed+0.118446744073709551614), vec2(0.118446744073709551614, 0.314159265358979323846264)))*0.141421356237309504880169);
|
|
}
|
|
|
|
void fragment() {
|
|
vec3 orig = texture(sim_texture, UV).rgb;
|
|
float agent = orig.r;
|
|
float trail = orig.g;
|
|
|
|
COLOR = vec4(agent, trail, orig.b, 1.0);
|
|
}
|