-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
325 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifdef GL_ES | ||
precision highp float; | ||
#endif | ||
|
||
uniform sampler2D u_texture; // 0 | ||
uniform vec2 center; // Mouse position | ||
//uniform vec3 shockParams; // 10.0, 0.8, 0.1 | ||
|
||
varying vec2 v_texCoords; | ||
|
||
void main() | ||
{ | ||
|
||
// pass through | ||
gl_FragColor = texture2D(u_texture, v_texCoords); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
attribute vec4 a_position; | ||
attribute vec4 a_color; | ||
attribute vec2 a_texCoord0; | ||
|
||
uniform mat4 u_projTrans; | ||
|
||
uniform float time; | ||
|
||
uniform float yseed; | ||
uniform float xseed; | ||
|
||
varying vec4 v_color; | ||
varying vec2 v_texCoords; | ||
|
||
float rand(vec2 co){ | ||
return fract(sin(dot(co, vec2(12.9898, 78.233))) * 43758.5453); | ||
} | ||
|
||
void main() { | ||
v_color = a_color; | ||
v_texCoords = a_texCoord0; | ||
|
||
vec2 seedx; | ||
|
||
seedx.x = xseed; | ||
seedx.y = xseed; | ||
|
||
vec2 seedy; | ||
seedy.x = yseed; | ||
seedy.y = yseed; | ||
|
||
a_position.x += rand(seedx); | ||
a_position.y += rand(seedy); | ||
|
||
gl_Position = u_projTrans * (a_position); | ||
|
||
} |
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.