浏览代码

Simplify the preprocessed code

/Branch_Batching2
Evgenii Golubev 8 年前
当前提交
52d4f035
共有 1 个文件被更改,包括 8 次插入10 次删除
  1. 18
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl

18
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl


{
ppdParam.uv = layerTexCoord.base.uv; // For planar it is uv too, not uvXZ
#ifdef SURFACE_GRADIENT
float3x3 worldToTangent = input.worldToTangent;
#ifdef SURFACE_GRADIENT
float3x3 worldToTangent = input.worldToTangent;
#else
float3x3 worldToTangent = input.worldToTangent;
#endif
#endif
float3 viewDirTS = isPlanar ? float3(uvXZ, V.y) : TransformWorldToTangent(V, worldToTangent);
NdotV = viewDirTS.z;

ppdParam.uv[2] = layerTexCoord.base2.uv;
ppdParam.uv[3] = layerTexCoord.base3.uv;
#ifdef SURFACE_GRADIENT
float3x3 worldToTangent = input.worldToTangent;
#ifdef SURFACE_GRADIENT
float3x3 worldToTangent = input.worldToTangent;
#else
float3x3 worldToTangent = input.worldToTangent;
#endif
#endif
// For planar the view vector is the world view vector (unless we want to support object triplanar ? and in this case used TransformWorldToObject)
// TODO: do we support object triplanar ? See ComputeLayerTexCoord

正在加载...
取消
保存