Apply choice of textures to object upon which shadows are cast

    Mar 15 2019 | 12:08 am
    I am new to shadows and lighting in Jitter. My goal is to be able to apply a choice of textures to an object upon which other objects cast shadows. I need to be able to do this without directly connecting the texture of choice to the first inlet of, as my textures are generated in another subpatch, and there are a lot of them.
    I am trying to figure out how to attach something to that will be the texture of my choice, while remaining in GL world. I feel like I am missing something simple.
    Max Patcher
    In Max, select New From Clipboard.

    • Mar 15 2019 | 12:36 pm
      You can send messages to like e.g. "diffuse_texture t1" or "diffuse_texture t2". Bang these messages to change the texture to be applied to the plane or use [prepend].
      Have a look at the reference of - there are several texture targets available like jit_gl_texture heightmap_texture etc. If you use another patch to create your textures make sure all textures and world objects belong to the same rendering context. This can be assured by explicitly naming the context in all objects e.g. [ myWorld], [ myWorld] etc.
    • Mar 15 2019 | 8:00 pm
      Awesome, thank you! Works perfectly.