uRaymarching
uRaymarching copied to clipboard
Cube map is black!
I'm trying to make a Cube map from raymarched scene but It is black! https://docs.unity3d.com/ScriptReference/Camera.RenderToCubemap.html
https://lmhpoly.com/how-to-generate-the-environment-cubemap-in-unity/
If you use RaymarchingRenderer
, please replace it with a large-scale cube which uses the same distance function (please refer to Mod World for VR
as an example or the No lighting with RaymarchingRenderer in forward path section in readme). RaymarchingRenderer
uses CommandBuffer
to render raymarched objects but this does not affect the camera created by RenderCubemapWizard
.
thanks it works like charm I could make a cube map! can you explain what you used to fix this issue because I have same issue in this shader:
https://github.com/Flafla2/Generic-Raymarch-Unity
Generic-Raymarch-Unity uses ImageEffect to render raymarch objects. The cameras which create a cubemap doesn't use ImageEffect to get clear images (please think about that bloom or depth-of-field shouldn't be used for these images). On the other hand, The above method of uRaymarching uses just polygons to render raymarch objects. So cubemap cameras can see these objects.
To fix this problem in Generic-Raymarch-Unity, you have to customize the shader to use a full-screen quad mesh to render raymarched objects instead of ImageEffect.