Functional Shaders: A Colorful Intro-Part2 Add An Image

Rupert
2 min readSep 20, 2020

In this part we will learn how to add an image.

Missed Part1?

Open ShaderToy new project https://www.shadertoy.com/new
Click iChannel0
Select Textures
Go to page 2 (feel free to select another image if you prefer)
Select London Image (feel free to select another image if you prefer)
Close iChannel0 Window
Select Original Code

Select

// Time varying pixel color
vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));

Paste In

// get pixel information from uv location    
vec4 texColor = texture(iChannel0, uv);

Select

// Output to screen
fragColor = vec4(col,1.0);

Paste In

// Output to screen    
fragColor = vec4(texColor);
Hold ALT Key And Press Enter to Run

Now we have an image to start filtering. In Part 3 we will Invert the colors.

--

--