浏览代码

HDRenderPipeline: move InfluenceFadeNormalWeight to shader library

/main
Sebastien Lagarde 7 年前
当前提交
ef3442e8
共有 3 个文件被更改,包括 8 次插入18 次删除
  1. 8
      ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/ImageBasedLighting.hlsl
  2. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl
  3. 8
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/030_Shader_RenderOrder.meta

8
ScriptableRenderPipeline/Core/CoreRP/ShaderLibrary/ImageBasedLighting.hlsl


return real4(lightInt / cbsdfInt, 1.0);
}
// Little helper to share code between sphere and box reflection probe.
// This function will fade the mask of a reflection volume based on normal orientation compare to direction define by the center of the reflection volume.
float InfluenceFadeNormalWeight(float3 normal, float3 centerToPos)
{
// Start weight from 0.6f (1 fully transparent) to 0.2f (fully opaque).
return saturate((-1.0f / 0.4f) * dot(normal, centerToPos) + (0.6f / 0.4f));
}
#endif // UNITY_IMAGE_BASED_LIGHTING_INCLUDED

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl


return positionWS + rayWS * hitDistanceFromPosition;
}
//------------------------------------------------------------------------------------
// Little helper to share code between sphere and box.
// These function will fade the mask of a reflection volume based on normal orientation compare to direction define by the center of the reflection volume.
//-----------------------------------------------------------------------------
float InfluenceFadeNormalWeight(float3 normal, float3 centerToPos)
{
// Start weight from 0.6f (1 fully transparent) to 0.2f (fully opaque).
return saturate((-1.0f / 0.4f) * dot(normal, centerToPos) + (0.6f / 0.4f));
}
//-----------------------------------------------------------------------------
// Ligth and material classification for the deferred rendering path
// Configure what kind of combination is supported

8
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/030_Shader_RenderOrder.meta


fileFormatVersion: 2
guid: f78229abd339e4d49b6e0e29fd79df0c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存