Introducing: ShaderPad(rileyjshaw.com) |
Introducing: ShaderPad(rileyjshaw.com) |
<shader-doodle> is one: https://github.com/halvves/shader-doodle but it hasn't been updated in a long time and I think builds to UMD
<shaderview> is a newer one with a nice site, but I haven't used it: https://keithclark.github.io/shaderview/
<shader-pad style="width: 320px; height: 480px">
<img src="/trees.jpg" data-texture="u_trees" />
<script type="x-shader/x-fragment">
#version 300 es
precision highp float;
in vec2 v_uv;
uniform float u_time;
uniform sampler2D u_trees;
out vec4 outColor;
void main() {
vec2 p = 2.0 * (v_uv - 0.5);
float r = length(p);
vec2 uv = 0.15 + v_uv * 0.7 + p * (0.1 + 0.025 * sin(u_time * 2.0)) * r;
outColor = texture(u_trees, uv);
}
</script>
</shader-pad>
Let me know if you have any feedback, or if you make something cool with it!---
[1]: https://misery.co/shaderpad/docs/components/web-component/
Give me a few days and check back in.
I’ve been doing something very similar recently[0] with slightly different goals (still a tiny bundle size, but fully typed uniforms, deeper control over buffer bytes and layout, and less setup than raw gl).
Some in the comments seem to think GL is dead, but for me I think it’s just an easier shader language for beginners and that’s most important for dabbling and many small web use cases.
working link: https://misery.co/shaderpad/docs/getting-started/examples/
What are your thoughts on supporting other languages? Or did I miss that in the docs?
> It is 12:56am. Do you still want to be on the internet? Yes No
Lol. Nice touch.
> No -> "Okay", fade to black.
If you're talking about open source projects or decisions by some consortium, that's not always true...or at least one business is pushing their concerns at the expense of others.
An easily remembered example is what happened (at least from Pieter Hintjens' perspective, as he wrote/complained at length about) between AMQP 0.9.1 and 1.0