Shaders inside objects

Mar 6, 2013 at 4:51pm

Shaders inside objects

Dear all,

I’ve started to use shaders with objects in Jitter, but I cannot find a way to shade the “inside” of an object… don’t know if that makes sense, but whenever I use the shader it applies to the exterior face of the object. I’m trying to create an environment for a scene (a skybox). How do I apply the shader to the inside of say, a giant sphere?

Thanks!

#66902
Mar 6, 2013 at 10:30pm

hi dbm.
it depends on the particular shader, but most are written for front-facing polygons.
so you won’t have much success with this technique i’m afraid, unless you’re writing your own custom shaders.

if you want to see the back faces (inside) of a sphere, you can simply set @cull_face 2 on your jit.gl.gridshape.

but you should also check out the jit.gl.skybox object, which may satisfy your needs.

#240818

You must be logged in to reply to this topic.