Open makc opened 8 years ago
Bump! This is very cool. would love to see this merged.
Should they be upside down though or do I just not understand sampler 2D?
precision mediump float;
uniform vec2 resolution;
uniform sampler2D rings; // http://i.imgur.com/tVVAVLL.jpg
void main( void ) {
gl_FragColor = texture2D( rings, ( gl_FragCoord.xy / resolution.xy ) );
}
This example makes the upside down thing more obvious
you can do gl.pixelStorei (gl.UNPACK_FLIP_Y_WEBGL, xxx) to flip it the way you want to.
actually, why not add it, indeed...
ok done, but... crap:
This branch has conflicts that must be resolved
ha, so github does understand forced push )
I guess @mrdoob would merge this way faster if I did not use dick pic as example :wink:
Just use some other picture: head
@hermanbanken well, maybe @mrdoob hates the idea any way. you know, like in old demoscene days, using bitmaps instead of code was frowned upon
Maybe @mrdoob doesn't want glslsandbox to turn into Shader Toy. Also links to images could go dead meaning more broken shaders.
PS: Would be cool to see some shaders that mimic oldskool demoscene stuff.
Hmm, the issue is that this wouldn't scale and it would increase the shader size considerably...
@mrdoob if you use data url, yes. but, as you see, imgur url works just as good
@mrdoob and, in fact, any other host that allows cross-domain access
subj :)