- Home /
Use Skybox material on Cube
I want to use the Skybox shader to render properly on all sides of a cube. The Skybox uses 6 passes but when used on a plain old cube, only the final pass is shown and it's on all sides of the cube. What I would love to do is specify the pass per submesh. I have tried using GetComponent().material.SetPass() in the OnPreRenderer method which didn't work (wasn't really expecting it to).
I've been able to do this manually using GL calls but those draw immediately and I need deferred rendering. And yes, I do realize I can properly UV map a cube to support a single graphic with all sides but I'd prefer not to do this. That way stitching doesn't have to be done every time we bring in a new skybox material from the asset store. Most likely I will be stitching stuff together, I'm just hoping to find a way around it.