Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved RenderStateBlock, how do I set a ColorMask?

Discussion in 'High Definition Render Pipeline' started by bitinn, Jul 28, 2021.

  1. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    958
    I would like to set Stencil, Depth and ColorMask states during a custom pass render.

    My old way involve using a replacement material, but we would like to do it different: using each object's own material but somehow set Stencil, Depth and ColorMask states.

    I have managed make RenderStateBlock work with custom Stencil & Depth, but ColorMask I have no clue.

    Maybe there is another way? Like specify DepthOnly pass using existing material??
     
  2. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    958
    I forgot the good old SetRenderTarget :)