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

Feature Request Apply Bloom FX only to specific layers, sorting layers, materials or whatever

Discussion in '2D Experimental Preview' started by AlexVillalba, Apr 24, 2021.

  1. AlexVillalba

    AlexVillalba

    Joined:
    Feb 7, 2017
    Posts:
    347
    Hi everybody,

    AFAIK in the URP and its 2DRenderer the post-processing FXs are applied to all the geometry rendered by one camera. However it's very common that one needs to apply the Bloom FX to only a subset of them, without using different cameras (to avoid problems with sorting). Possible ways to select which pixels are added to the Bloom FX texture:
    • Emissive color: Only the emissive output would be written to a temporary texture. Every non-emissive pixel that has lower Z would erase existing pixels in such texture.
    • Layer: All the geometry in a specific layer would be rendered to the temporary texture, using a Threshold.
    • Sorting layer: The same as previous but using 2D sorting layers.
    • Type of shader: Like "Sprite-Emissive-Lit".
    • Checkbox in material.
    • Special Renderer component: Like "SpriteRendererEmissive".
    If you don't plan to implement anything like this in the future, at least I would like to know about alternatives. I think it's impossible to do this in the URP / 2DRenderer at the moment.
     
    MousePods, xiao-xxl and NotaNaN like this.
  2. xiao-xxl

    xiao-xxl

    Joined:
    Nov 16, 2018
    Posts:
    49