aaa

https://forum.unity3d.com/threads/no-shadows-visible-on-transparency-shaders.9909/

http://aras-p.info/blog/2009/11/04/deferred-cascaded-shadow-maps/

http://catlikecoding.com/unity/tutorials/rendering/part-7/

http://answers.unity3d.com/questions/639023/why-do-shadow-maps-take-three-passes.html

http://blog.theknightsofunity.com/forward-vs-deferred-rendering-paths/


forward rendering:


1. render ambient lighting, and any non-shadowed objects

2. for each shadow casting light:

    a. render shadow map for this light, from the point of view of this light, render all four cascades (render four times), and the entire scene is rendered, and pack them into one shadow map

    b. collect shadow

        Unity will use Hidden/Internal-ScreenSpaceShadows shader to render a single quad that covers the entire view. Each fragment samples from the scene's and light's depth textures, make the comparison, and render the final shadow value to a screen space shadow map.

    c. perform filtering on screen space shadow map, to create soft shadow

        PCF shadowmap filtering

    d. render objects affected by this light. The light colors are multiplied by the values stored in their shadow maps. the shaders do not need to know anything about shadow cascades. Just read pixel from the texture and use it in lighting computation.


deferred rendering:

all lights can have shadows.

forward rendering:

Forward Rendering supports one directional light with shadows.


https://blogs.msdn.microsoft.com/shawnhar/2009/02/18/depth-sorting-alpha-blended-objects/


http://answers.unity3d.com/questions/1096683/transparent-shadow-receiver-in-unity-5.html


你可能感兴趣的:(aaa)