Search Unity

Custom shadow map rendering

Discussion in 'Shaders' started by Ghost of a Werewolf, Feb 27, 2015.

  1. Ghost of a Werewolf

    Ghost of a Werewolf

    Joined:
    Feb 27, 2015
    Posts:
    1
    Hi all

    So I'm working on an esthetic that depends a lot on camera direction for shading parameters, but also involves large scenes with lots of potential shadow casters, and I'm looking for ways to use Unity's light mapping in conjunction with my shader.

    What I'm looking for is a way to access the Beast-generated light map in my surface shader so that I can scale my lights by its brightness to retain the shadows, while still maintaining my view-dependent effects like in-close specular sparkle detail, fresnel and more. The perfect scenario would be a light map that contains nothing but cast shadows and perhaps AO, that I can access in my fragment shader. Is this doable?

    Worth noting that I'm bound to Unity 4.3 for technical reasons.

    Cheers,

    - ANdreas