idx1, idx2
specify unused TEXCOORD#idx
. (Note that a semicolon is not required at the end of the sentence)
https://forum.unity3d.com/threads/acces-to-unity-final-pass-shader-deferred.221254/
Just want to share what I found. After looking at the compiled code, I found that
SHADOWS_NATIVE seems to use shadow2DEXT to sample the shadow map, in which the calculation whether the current z is in front of the shadow map is done in the hardware directly.
Meanwhile, SHADOWS_SCREEN seems to be the usual shadow map technique, using texture2DProj to sample the shadow map, and then compare the current z to the result in the code.
I am talking from OpenGL point of view, but I think it should be similar for DX as well
https://github.com/candycat1992/Unity_Shaders_Book/issues
https://github.com/candycat1992/Unity_Shaders_Book/issues/35
http://qiita.com/edo_m18/items/21d3b37596da3fd4b32b
http://catlikecoding.com/unity/tutorials/rendering/part-7/
http://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fqiita.com%2Fedo_m18%2Fitems%2F21d3b37596da3fd4b32b
http://translate.googleusercontent.com/translate_c?depth=1&hl=en&rurl=translate.google.com&sl=auto&sp=nmt4&tl=en&u=http://qiita.com/edo_m18/items/4658357683ec253f38ff&usg=ALkJrhgldCOwlHiuSQAgI2zpUP9c2GSw-w
http://translate.googleusercontent.com/translate_c?depth=1&hl=en&rurl=translate.google.com&sl=auto&sp=nmt4&tl=en&u=http://qiita.com/edo_m18/items/ee4b9018e860c11199b0&usg=ALkJrhixfgU6XQzSbupi2oO-pJsBdmMFUw
http://translate.googleusercontent.com/translate_c?depth=1&hl=en&rurl=translate.google.com&sl=auto&sp=nmt4&tl=en&u=http://qiita.com/edo_m18/items/ee4b9018e860c11199b0&usg=ALkJrhixfgU6XQzSbupi2oO-pJsBdmMFUw
http://translate.googleusercontent.com/translate_c?depth=1&hl=en&rurl=translate.google.com&sl=auto&sp=nmt4&tl=en&u=http://unityshader.hatenablog.com/entry/2013/12/14/015247&usg=ALkJrhhEssw2tThnTBf7-lmSBn0PUMR2Bw
https://learnopengl.com/#!Advanced-Lighting/Shadows/Shadow-Mapping
https://learnopengl.com/#!Advanced-OpenGL/Depth-testing
http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Shadow_map.php
http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter09.html
http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-16-shadow-mapping/
https://forum.unity3d.com/threads/what-is-in-float4-_lightshadowdata.165718/
_LightShadowData.x - shadow strength
_LightShadowData.y - Appears to be unused
_LightShadowData.z - 1.0 / shadow far distance
_LightShadowData.w - shadow near distance