浏览代码

Fix issue with shader graph - wasn't compiling

/main
sebastienlagarde 7 年前
当前提交
b55f5754
共有 4 个文件被更改,包括 9 次插入1 次删除
  1. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRPass.template
  2. 3
      com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl
  3. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/MaterialUtilities.hlsl
  4. 3
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.hlsl

2
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRPass.template


$SurfaceDescription.Normal: normalTS = surfaceDescription.Normal;
// compute world space normal
GetNormalWS(fragInputs, V, normalTS, surfaceData.normalWS);
GetNormalWS(fragInputs, normalTS, surfaceData.normalWS);
// TODO: use surfaceDescription tangent definition for anisotropy
surfaceData.tangentWS = normalize(fragInputs.worldToTangent[0].xyz); // The tangent is not normalize in worldToTangent for mikkt. TODO: Check if it expected that we normalize with Morten. Tag: SURFACE_GRADIENT

3
com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl


// bake lighting function
//-----------------------------------------------------------------------------
// This define allow to say that we implement a ModifyBakedDiffuseLighting function to be call in PostInitBuiltinData
#define MODIFY_BAKED_DIFFUSE_LIGHTING
// This function allow to modify the content of (back) baked diffuse lighting when we gather builtinData
// This is use to apply lighting model specific code, like pre-integration, transmission etc...
// It is up to the lighting model implementer to chose if the modification are apply here or in PostEvaluateBSDF

2
com.unity.render-pipelines.high-definition/HDRP/Material/MaterialUtilities.hlsl


else
#endif
{
#ifdef MODIFY_BAKED_DIFFUSE_LIGHTING
#endif
}
}

3
com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.hlsl


// bake lighting function
//-----------------------------------------------------------------------------
// This define allow to say that we implement a ModifyBakedDiffuseLighting function to be call in PostInitBuiltinData
#define MODIFY_BAKED_DIFFUSE_LIGHTING
void ModifyBakedDiffuseLighting(float3 V, PositionInputs posInput, SurfaceData surfaceData, inout BuiltinData builtinData)
{
// To get the data we need to do the whole process - compiler should optimize everything

正在加载...
取消
保存