mrdoob/three.js — Issue #1391: Animating a shader material
Author: alexwakeman
Created: 2012-02-24 17:07:05+00:00
State: open

Hey there,

I've been rattling my brains over assigning a fragment shader to a ShaderMaterial.

First off, I have this: http://jsfiddle.net/bpDyS/

Now I'm trying to add a shader: http://jsfiddle.net/TvKch/

Unfortunately the script fails to compile in the second instance. It does compile on my machine (it is different - but can't spot why won't work here), but there is no changes in the colour of the triangles in either case. On my machine, the `color` is always dark, no variance.

Can you please advice me what I'm doing wrong. I've mimicked other sources across the web, and it seems the same here, but refuses to work.

Appreciate the help!