Re: Shader help – recreating GL_SPHERE_MAP

Thanks Robert – that seems to have solved it.

The only remaining difference between this shader and @tex_map 2 is that the shader appears to flip the texture along the y axis. I’m getting around this with jit.dimmap but I’m sure it could be done more efficiently in the shader itself.

Is my understanding correct that with @rectangle 0 jit.gl.texture coerces incoming rectangular matrices to be square?

I’m attaching the corrected code in case this is useful to anyone else. Now if only jit.gl.mesh supported multi-texturing I would be a very happy camper!

Attachments:
  1. testshader.jxs
Jan 4, 2011 at 8:23pm #194717