-
-
Save toxicFork/2f90ae80f59bc04e3962 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
half4 fragForwardBase (VertexOutputForwardBase i) : SV_Target | |
{ | |
FRAGMENT_SETUP(s) | |
PLANE_CLIP(s.posWorld) | |
UnityLight mainLight = MainLight (s.normalWorld); | |
half atten = SHADOW_ATTENUATION(i); | |
half occlusion = Occlusion(i.tex.xy); | |
UnityGI gi = FragmentGI ( | |
s.posWorld, occlusion, i.ambientOrLightmapUV, atten, s.oneMinusRoughness, s.normalWorld, s.eyeVec, mainLight); | |
half4 c = UNITY_BRDF_PBS (s.diffColor, s.specColor, s.oneMinusReflectivity, s.oneMinusRoughness, s.normalWorld, -s.eyeVec, gi.light, gi.indirect); | |
c.rgb += UNITY_BRDF_GI (s.diffColor, s.specColor, s.oneMinusReflectivity, s.oneMinusRoughness, s.normalWorld, -s.eyeVec, occlusion, gi); | |
c.rgb += Emission(i.tex.xy); | |
UNITY_APPLY_FOG(i.fogCoord, c.rgb); | |
return OutputForward (c, s.alpha); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment