浏览代码

updated shaders after the 5.4 merge

/main
vlad-andreev 8 年前
当前提交
9854fa87
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2
      Assets/ScriptableRenderLoop/fptl/Internal-DeferredReflections.shader
  2. 4
      Assets/ScriptableRenderLoop/fptl/Internal-DeferredShading.shader

2
Assets/ScriptableRenderLoop/fptl/Internal-DeferredReflections.shader


v2f vert (float4 vertex : POSITION, float2 texcoord : TEXCOORD0)
{
v2f o;
o.vertex = UnityObjectToClipPosMono(vertex);
o.vertex = UnityObjectToClipPos(vertex);
o.texcoord = texcoord.xy;
return o;
}

4
Assets/ScriptableRenderLoop/fptl/Internal-DeferredShading.shader


v2f vert (float4 vertex : POSITION, float2 texcoord : TEXCOORD0)
{
v2f o;
o.vertex = UnityObjectToClipPosMono(vertex);
o.vertex = UnityObjectToClipPos(vertex);
o.texcoord = texcoord.xy;
return o;
}

UnityLight light;
light.color.xyz = lgtDat.vCol.xyz*atten;
light.dir.xyz = mul((float3x3) g_mViewToWorld, vL).xyz; //unity_CameraToWorld
light.ndotl = LambertTerm(data.normalWorld, light.dir.xyz);
ints += UNITY_BRDF_PBS (data.diffuseColor, data.specularColor, oneMinusReflectivity, data.smoothness, data.normalWorld, vWSpaceVDir, light, ind);

UnityLight light;
light.color.xyz = lgtDat.vCol.xyz*atten;
light.dir.xyz = vLw;
light.ndotl = LambertTerm(data.normalWorld, vLw);
ints += UNITY_BRDF_PBS (data.diffuseColor, data.specularColor, oneMinusReflectivity, data.smoothness, data.normalWorld, vWSpaceVDir, light, ind);

正在加载...
取消
保存