https://www.youtube.com/watch?v=f4s1h2YETNY

This is a pretty good introduction to how to build fragment shaders.

Shader programming has some significant similarities to J programming.
However, it's also constrained in some ways that J is not, and also
borrows from scalar programming in some other ways. Since shaders are
"close to hardware", shader programming has some seemingly "arbitrary"
constraints.

Anyways, this video is based on the simplifications provided by
shadertoy, which are:

(1) No opengl vector shaders, only a fragment shader - the shader
builds pixels for a rectangle covering the entire display area.

(2) No main() routine -- shadertoy's api provides that. Instead,
someone provides a mainImage() function, which is called by main().

(3) easily comprehensible "constants" (opengl "uniforms") which expose
useful concepts to the shader. iResolution, iTime and iMouse are
probably the most interesting of these, but
https://www.shadertoy.com/howto provides more detail.

Also, this is just an introduction. There's a lot of detail that it
sort of glosses over / hopes the reader can pick up quickly.

But within these limitations (and with maybe a few odd uses of
terminology), I think it does a pretty good job of making the subject
accessible to motivated and patient "beginners".

FYI,

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to