浏览代码

Fix old subscripts for FastBlinn

/main
Matt Dean 7 年前
当前提交
726b1d96
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 2
      MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/CGIncludes/LightweightCore.cginc
  2. 2
      MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/CGIncludes/LightweightFastBlinn.cginc
  3. 4
      MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightFastBlinn.shader

2
MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/CGIncludes/LightweightCore.cginc


half3 lightDirection;
half atten = ComputeLightAttenuationVertex(lightInput, o.normal, worldPos, lightDirection);
o.fogCoord.yzw += LightingLambert(diffuse, lightDirection, normal, atten);
o.fogCoord.yzw += LightingLambert(diffuse, lightDirection, o.normal, atten);
}
#endif

2
MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/CGIncludes/LightweightFastBlinn.cginc


color += o.Emission;
#if defined(LIGHTMAP_ON)
color += (DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, i.uv01.zw)) + i.fogCoord.yzw) * o.Diffuse;
color += (DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, i.meshUV0.zw)) + i.fogCoord.yzw) * o.Diffuse;
#elif defined(_VERTEX_LIGHTS) || defined(_LIGHT_PROBES_ON)
color += i.fogCoord.yzw * o.Diffuse;
#endif

4
MaterialGraphProject/Assets/SRP/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightFastBlinn.shader


s.Diffuse = LIGHTWEIGHT_GAMMA_TO_LINEAR(c.rgb) * _Color.rgb;
// Specular
#ifdef _SPECGLOSSMAP
half4 specularMap = tex2D(_SpecGlossMap, i.uv01.xy);
half4 specularMap = tex2D(_SpecGlossMap, i.meshUV0.xy);
#if defined(UNITY_COLORSPACE_GAMMA) && defined(LIGHTWEIGHT_LINEAR)
s.Specular = LIGHTWEIGHT_GAMMA_TO_LINEAR(specularGloss.rgb);
#endif

#ifndef _EMISSION
s.Emission = _EmissionColor.rgb;
#else
s.Emission = LIGHTWEIGHT_GAMMA_TO_LINEAR(tex2D(_EmissionMap, uv).rgb) * _EmissionColor.rgb;
s.Emission = LIGHTWEIGHT_GAMMA_TO_LINEAR(tex2D(_EmissionMap, i.meshUV0.xy).rgb) * _EmissionColor.rgb;
#endif
// Alpha
#ifdef _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A

正在加载...
取消
保存