GLSL (OpenGL Shading Language) is a language that enables developers to directly control the graphics pipeline. We will do GPU programming using GLSL. And I recommend the Shadertoy to easily program it. By using Shadertoy, you can see the results of GLSL programming on the screen without OpenGL. It looks like below.
I made simple mosaic effect. The great thing of this is you can program and take result on the screen in real time. We do not need to write GL code directly :)
But this tool also has some rules.
Because we don't program GL, there are some promised uniform variables. And I'll introduce some important input uniforms.
uniform vec3 iResolution (x,y,z of your screen resolution)
uniform float iTime (current time second info)
uniform float iFrame (current frame number info)
uniform vec4 iMouse (mouse click position)
uniform samplerXX iChanneli (sampler image, video of iChannel0 ~ iChannel4)
uniform float iTime (current time second info)
uniform float iFrame (current frame number info)
uniform vec4 iMouse (mouse click position)
uniform samplerXX iChanneli (sampler image, video of iChannel0 ~ iChannel4)
If you want to see more rules, please go to Shadertoy site.
Comments
Post a Comment