minor progress on background shader
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#extension GL_OES_standard_derivatives : enable
|
||||
|
||||
varying float vTime;
|
||||
varying vec2 vResolution;
|
||||
#define M_PI 3.1415926535897932384626433832795
|
||||
varying vec2 vTexCoord;
|
||||
|
||||
//#define vTime (vTime * vTime * 0.05)
|
||||
|
||||
@@ -42,10 +42,7 @@ float stars(in vec2 x, float numCells, float size, float br)
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
float res = max(vResolution.y, vResolution.y);
|
||||
|
||||
vec2 coord = gl_FragCoord.xy / vResolution;
|
||||
vec2 coord = vTexCoord;
|
||||
|
||||
vec2 tmp = coord;
|
||||
|
||||
@@ -64,7 +61,8 @@ void main()
|
||||
|
||||
|
||||
|
||||
gl_FragColor = vec4(result,1.);
|
||||
gl_FragColor = vec4(result, 1.0);
|
||||
// gl_FragColor = vec4(1.0*(vTexCoord.x/vResolution.x), 0.0, 0.0, 1.0);
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +70,4 @@ void main()
|
||||
// vec2 bl = gl_FragCoord.xy / vResolution.xy;
|
||||
|
||||
// if(bl.y>.50-min(vTime/20.,0.4) ^^ bl.y<0.50+min(vTime/20.0,.4)) gl_FragColor = vec4(0.0,sqrt(coord.y+0.1),0.3,1.0);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@@ -4,17 +4,14 @@ attribute vec2 a_texCoord0;
|
||||
|
||||
uniform mat4 u_projTrans;
|
||||
uniform float time;
|
||||
uniform vec2 resolution;
|
||||
|
||||
varying vec4 vColor;
|
||||
varying vec2 vTexCoord;
|
||||
varying float vTime;
|
||||
varying vec2 vResolution;
|
||||
void main() {
|
||||
vColor = a_color;
|
||||
vTexCoord = a_texCoord0;
|
||||
vTime = time;
|
||||
vResolution = resolution;
|
||||
|
||||
gl_Position = u_projTrans * a_position;
|
||||
}
|
||||
|
Reference in New Issue
Block a user