mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-19 14:50:06 +01:00
tidying up some shader stuff (nameing etc)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
//pro-shader
|
||||
//written by Tim Caldwell
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
@@ -8,9 +9,6 @@ uniform sampler2D u_tex0;
|
||||
uniform vec2 u_resolution;
|
||||
uniform float u_time;
|
||||
uniform float u_x0;
|
||||
uniform float u_x1;
|
||||
uniform float u_x2;
|
||||
uniform float u_x3;
|
||||
|
||||
vec3 rgb2grayscale(vec3 c)
|
||||
{
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
varying vec2 v_texcoord;
|
||||
uniform sampler2D u_tex0;
|
||||
uniform vec2 u_resolution;
|
||||
uniform float u_time;
|
||||
|
||||
void main() {
|
||||
vec2 pos = gl_FragCoord.xy;
|
||||
vec4 texColor = texture2D(u_tex0, v_texcoord);
|
||||
|
||||
texColor.r *= (sin(0.05*pos.x - cos(u_time)) + cos(0.05*pos.x/(0.1 + abs(cos(u_time/5.0)))));
|
||||
texColor.r *= (sin(0.05*pos.y - cos(u_time/5.0)) + cos(0.05*pos.y/(0.1 + abs(cos(u_time/5.0)))));
|
||||
|
||||
gl_FragColor = vec4(texColor.b, texColor.r, texColor.g, texColor.a);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//pro-shader
|
||||
|
||||
//written by Tim Caldwell
|
||||
// this is a simple example of how to change incoming textures colour
|
||||
varying vec2 v_texcoord;
|
||||
uniform sampler2D u_tex0;
|
||||
uniform vec2 u_resolution;
|
||||
@@ -7,7 +8,6 @@ uniform float u_time;
|
||||
uniform float u_x0;
|
||||
uniform float u_x1;
|
||||
uniform float u_x2;
|
||||
uniform float u_x3;
|
||||
|
||||
void main() {
|
||||
vec4 texColour = texture2D(u_tex0, v_texcoord);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//pro-shader
|
||||
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
//pro-shader
|
||||
//written by Tim Caldwell
|
||||
//this is a basic example of how to effect input textures position
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//pro-shader
|
||||
//written by Tim Caldwell
|
||||
#ifdef GL_ES
|
||||
precision highp float;
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//pro-shader
|
||||
//written by Tim Caldwell
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
//pro-shader
|
||||
//written by Tim Caldwell
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
@@ -17,8 +18,8 @@ void main(){
|
||||
|
||||
vec2 pos = v_texcoord;
|
||||
//float amp = pos.y * 0.03 + .001;
|
||||
pos.x += 0.05*u_x2*sin( pos.y* 60.0*u_x3 + u_time * 1.0 );
|
||||
pos.y += 0.05*u_x0*sin( pos.x* 60.0*u_x1 + u_time * 1.0);
|
||||
pos.x += 0.07*u_x2*sin( pos.y* 70.0*u_x3 + u_time * 1.0 );
|
||||
pos.y += 0.07*u_x0*sin( pos.x* 70.0*u_x1 + u_time * 1.0);
|
||||
pos.y = mod(pos.y,1.0);
|
||||
pos.x = mod(pos.x,1.0);
|
||||
//if(pos.y > 1.0 || pos.y < 0.0){pos.y = 0.0;}
|
||||
|
||||
Reference in New Issue
Block a user