half4 fragForwardBase (VertexOutputForwardBase i) : SV_Target | |
{ | |
FRAGMENT_SETUP(s) | |
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