Port of “An introduction to Shader Art Coding” by kishimisu

Straight port of the work from kishimisu’s on the video “An introduction to Shader Art Coding”

Original video: https://www.youtube.com/watch?v=f4s1h2YETNY

Shadertoy: https://www.shadertoy.com/view/mtyGWy

Tested on Godot 3.5.

Shader code
shader_type canvas_item;

vec3 palette(float t) {
	vec3 a = vec3(0.5, 0.5, 0.5);
	vec3 b = vec3(0.5, 0.5, 0.5);
	vec3 c = vec3(1.0, 1.0, 1.0);
	vec3 d = vec3(0.263, 0.416, 0.557);
	return a + b * cos(6.28318*(c*t+d));
}

void fragment() {
	vec2 uv = UV * 2.0 - 1.0;
	vec2 uv0 = uv;
	vec3 finalColor = vec3(0.0);
	
	for (float i = 0.0; i < 4.0; i++) {
		vec3 col = palette(length(uv0) + i*.4 + TIME*.4);
		
		uv = fract(uv * 1.5) - 0.5;
		
		float d = length(uv) * exp(-length(uv0));
		d = sin(d*8. + TIME)/8.;
		d = abs(d);
		d = pow(0.01 / d, 1.2);
		
		finalColor += col * d;
	}
	
	COLOR = vec4(finalColor, 1.0);
}
Tags
art, coding, introduction, kishimisu
This shader is a port from an existing Shadertoy project. Shadertoy shaders are by default protected under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) license unless anything else has been stated by the author. For more info, see our License terms.

Related shaders

RotSprite-Like Algorithm for Cleaner Pixel Art Rotation

Pixel art trail

Pixel Art Water

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments