Search Unity

Shader for object-specific ambient light?

Discussion in 'Shaders' started by crandellbr, Apr 2, 2017.

  1. crandellbr

    crandellbr

    Joined:
    Apr 3, 2013
    Posts:
    137
    I'm trying to juggle lighting for various scene elements in my space shooter. The problem is the background nebulas, which are layered quads. They use the Mobile/Particles/Additive shader and are rendered to their own orthographic camera. I'd rather control their brightness using ambient lighting, but increasing the global value throws everything else off. Instead, I tried a directional light pointed straight down, but that creates noticeable rings on some backgrounds.



    Per-object ambient lighting would be my ideal solution - I don't suppose I can get close with a built-in shader? I tried a handful I thought might work, such as Mobile/Particles/Vertex Lit, but that one just killed transparency.
     
    Last edited: Jan 9, 2024