I’m rendering planes (jit.gl.gridshape) in jitter using sketch, and I want
to know if I’m looking at the front or the back of a plane. Therefor I guess
I need the planes normal vector and the eye vector. Are these available some
way using sketch/js?
I’d like to texture back and front differently, without rendering 2 textures
and 2 planes all the time.
I believe you can do this with a shader and a multitextured plane. You
would do something like the following.
use gl_Normal to compare normal direction with the eye vector and
store in a varying variable
use that varying variable to pick color either from Tex0 or Tex1 and
assign to the fragment color.
thanks wes. i’ll go for the shader.
C74 RSS Feed | © Copyright Cycling '74