Struggling to set distinct colors for instances using MeshRefractionMaterial #2018
Replies: 2 comments
-
Just found a really similar example that sets different colors on each instance successfully with older versions of drei/three/fiber: https://codesandbox.io/p/sandbox/instanced-refraction-fl1j5l?file=%2Fsrc%2FApp.js%3A44%2C26 But still, my diamonds are all transparent even I tried to apply the same code from the above codesandbox... |
Beta Was this translation helpful? Give feedback.
0 replies
-
This issue was fixed in release 9.108.3, thanks to @CodyJasonBennett ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to extend from the Diamonds example on the three-fiber documentation site, the diamonds on the ring are instances of an instancedMesh component. I've been banging my head for a day but couldn't figure out how to set a different color for say the 3 biggest stones. I tried to replace the MeshRefractionMaterial with just meshBasicMaterial/meshPhysicalMaterial, and then the
setColorAt
code in useFrame would work nicely, but it fails to set new colors with MeshRefractionMaterial.My code for the Ring component:
Beta Was this translation helpful? Give feedback.
All reactions