0

enter image description here

Hi, I just want to render a plane inside a 3D cube. The problem is that it has to render only inside a cube, not outside. is there any way to solve this problem?

https://www.youtube.com/watch?v=6l60g-G5RqU I did watch this tutorial for it, but cannot go further.

Mr.daq
  • 33
  • 4
  • The proper way would be to render to a texture and use that texture as your cube's texture. – Gusman Oct 26 '20 at 12:44
  • Does this answer your question? [Unity Shader highlighting overlaps](https://stackoverflow.com/questions/35574227/unity-shader-highlighting-overlaps). Basically you detect the overlapping and render your plane only where the cube wrote into the stencil buffer. – Thomas Oct 26 '20 at 12:54
  • Thanks for the comments! I tried to do with the overlaps shader, but it looks like you can see outside meshes with the 3d cube, just like a window. – Mr.daq Oct 27 '20 at 04:46
  • Do you want to use a cube only or some arbitraty mesh? – Thomas Oct 27 '20 at 08:50
  • Cube only. I found this one. https://stackoverflow.com/questions/64549754/rendering-only-point-cloud-data-inside-a-box but, I try to render point cloud not surface. So, I upload a question again. https://stackoverflow.com/questions/64549754/rendering-only-point-cloud-data-inside-a-box – Mr.daq Oct 27 '20 at 09:06

0 Answers0