shaderbasis

command
v0.0.0-...-163d9d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README

ShaderBasis Example

Same example from https://github.com/DangerCenter/shaderbasis

ShaderBasis

Shader

void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
	vec2 position = 2. * (fragCoord.xy / iResolution.xy) - 1.;
	vec3 colour = vec3(0.0);
	float density = 0.15;
	float amplitude = 0.3;
	float frequency = 5.0;
	float scroll = 0.4;
    
	colour += vec3(0.1, 0.05, 0.05) * (1.0 / abs((position.y + (amplitude * sin(((position.x-0.0) + iTime * scroll) *frequency)))) * density);
	colour += vec3(0.05, 0.1, 0.05) * (1.0 / abs((position.y + (amplitude * sin(((position.x-0.3) + iTime * scroll) *frequency)))) * density);
	colour += vec3(0.05, 0.05, 0.1) * (1.0 / abs((position.y + (amplitude * sin(((position.x-0.6) + iTime * scroll) *frequency)))) * density);
    //
	fragColor = vec4( colour, 1.0 );
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL