-
Notifications
You must be signed in to change notification settings - Fork 363
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
nekocode
committed
Aug 7, 2016
1 parent
e2be951
commit f795e28
Showing
10 changed files
with
58 additions
and
38 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
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
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 |
---|---|---|
@@ -1,20 +1,17 @@ | ||
#extension GL_OES_EGL_image_external : require | ||
#extension GL_OES_standard_derivatives : enable | ||
#define PIXEL_SIZE 10.0 | ||
precision mediump float; | ||
|
||
uniform vec3 iResolution; | ||
uniform samplerExternalOES sTexture; | ||
varying vec2 texCoord; | ||
|
||
void main() { | ||
vec2 uv = texCoord.xy; | ||
|
||
float dx = PIXEL_SIZE / 500.0; | ||
float dy = PIXEL_SIZE / 275.0; | ||
void mainImage(out vec4 f,vec2 u) | ||
{ | ||
vec2 r = iResolution.xy; | ||
f = texture2D(sTexture,ceil(u / (r.x/1e2)) * r.x/1e2 / r); | ||
} | ||
|
||
uv.x = dx * floor(uv.x / dx); | ||
uv.y = dy * floor(uv.y / dy); | ||
|
||
gl_FragColor = texture2D(sTexture, uv); | ||
void main() { | ||
mainImage(gl_FragColor, texCoord*iResolution.xy); | ||
} |
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