Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question How to render certain objects in lower resolution than others?

Discussion in 'Universal Render Pipeline' started by wsxmax, Mar 5, 2024.

  1. wsxmax


    Sep 8, 2021
    I'm now working on an XR project which requires some volumatic cloud effect. The device however, is not powerful enough to run the ray marching shader in native full resolution of itself. So I'm looking for a way to render only the cloud in a lower resolution with other part of the scene still in full resolution.

    I tried to use different camera with cull mask targeting to different render texture simply at first. But in compositing I found them not able to share depth texture, which is needed in ray marching shader in tranparent pass, and should come from opaque render pass. so I guess the rendering must happen in the same context, and the only way I know is to use scriptable render pipeline.

    I've then read some of the tutorials about scriptable render pipeline, but am sitll not very clear in the whole solution.
    What I understood was like: I need to override the part or rendering the opaque and transparent objects, change the target to corresponsive render textures, or RTHandles, save the textures, and in final part composite them togather, where, I set the tranparent texture in a lower resolution.

    I'm not sure if this is a rational idea, also have big difficulty in learning scriptable render pipeline in system, is their any tutorial or document in overriding certain exsiting part of renderpipeline?(especially how to limit change in certain part of the scene in pipline, like how to tell pipeline to render one single object or single cull masked layer, but still using exsiting depth buffer?)