jit.gl.cubemap to gridshape to matrix?
Hi all -
I've adapted the jit.gl.cubemap example to include a matrixoutput of jit.gl.gridshape, so that I can manipulate the geometry in jit.gl.mesh. But sadly, the jit.gl.cubemap does not seem to work.
I feel like there is something important I am misunderstanding about textures here - if anyone has help to the problem, that would be great- but also, if there are any resources to better understand why this isn't working, I would be curious.
Thanks!
It is not explicitely stated in the help file but the reason why the cubemap gets applied to the gridshape is because of its @texture cmap
attribute. Because you use @matrixoutput 1
, the gridshape is now only used to output matrices (more precisely a 12 planes matrix, including vertices position, normal map, texture coordinates and color).
The 3D object itself is now rendered by [jit.gl.mesh], so you need to pass the few rendering-related attributes from the gridshape to the mesh, which includes @lighting_enable 1 @smooth_shading 1 @texture cmap
Alternatively you could apply the cubemap through [jit.gl.pbr]:
Thank you - this helps tremendously.