How can i make a disco ball shader that shines light on scene mesh in vision pro

I am trying to make a shader for a disco ball lighting effect for my app. I want the light to reflect on the scene mesh. i was curious if anyone has pointers on how to do this in shader graph in reality composer pro or writing a surface shader.

The effect rotates the dots as the ball spins.

This is the effect in the apple clips that applies the effect to the scene mesh

Accepted Reply

Hello.

Here is an example of a material to achieve an effect like that:

It uses the position to compute the direction from the light's source to the fragment's position. This direction is then passed into a noise texture, to generate the patterns. The result is also multiplied by the dot product of the light direction and the surface's normal, to make sure that only the front of the objects is lit. Finally, the value is passed to the emissive color of the material.

And you can apply this shader to a mesh created from ARKit's MeshAnchors and make the material transparent:

Replies

Hello.

Here is an example of a material to achieve an effect like that:

It uses the position to compute the direction from the light's source to the fragment's position. This direction is then passed into a noise texture, to generate the patterns. The result is also multiplied by the dot product of the light direction and the surface's normal, to make sure that only the front of the objects is lit. Finally, the value is passed to the emissive color of the material.

And you can apply this shader to a mesh created from ARKit's MeshAnchors and make the material transparent:

This is great thanks! Also very interesting use of noise to create a repeating pattern, I wish they were perfect ellipses though. Would be a nice addition to create shapes in shader graph! I also repeated the pattern and added some offsets and that gave a really nice look! Can't wait to test this on device.