How do I set a custom input node on a RealityKit shader graph?

Asked on 07/26/2024

1 search

To set a custom input node on a RealityKit shader graph, you can follow these steps:

  1. Open Reality Composer Pro: Start by opening your project in Reality Composer Pro.

  2. Select Your Material: Choose the material you want to customize in the shader graph.

  3. Promote to Input: Right-click on the file references or parameters you want to expose as inputs and select "Promote to Input." This will make those inputs accessible in the panel on the right.

  4. Create Material Instances: Once you have promoted the necessary inputs, you can create material instances. Right-click on your main material and select "Create Material Instance." This allows you to reuse the logic of one material while being able to change exposed parameters, which is efficient for both setup and performance.

For more detailed guidance, you can refer to the session Optimize your 3D assets for spatial computing (11:12).

If you need a primer on setting up materials and shader graphs, the session "Explore materials in Reality Composer Pro" from 2023 is highly recommended.