浏览代码

Merge remote-tracking branch 'refs/remotes/origin/master' into Update-SSS

/RenderPassXR_Sandbox
Sebastien Lagarde 8 年前
当前提交
a665de22
共有 3 个文件被更改,包括 4 次插入5 次删除
  1. 6
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
  2. 1
      Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawTransmittanceGraph.shader
  3. 2
      Assets/ScriptableRenderPipeline/ShaderLibrary/BSDF.hlsl

6
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl


[branch] if (bsdfData.enableTransmission)
{
// Use the reversed normal from the front for the back of the object.
illuminance = F_Transm_Schlick(bsdfData.fresnel0, saturate(-NdotL));
illuminance = F_Transm_Schlick(bsdfData.fresnel0.x, saturate(-NdotL)); // Transmission is only valid for dielectric
// For low thickness, we can reuse the shadowing status for the back of the object.
shadow = bsdfData.useThinObjectMode ? shadow : 1;

[branch] if (bsdfData.enableTransmission)
{
// Use the reversed normal from the front for the back of the object.
illuminance = F_Transm_Schlick(bsdfData.fresnel0, saturate(-NdotL)) * attenuation;
illuminance = F_Transm_Schlick(bsdfData.fresnel0.x , saturate(-NdotL)) * attenuation; // Transmission is only valid for dielectric
// For low thickness, we can reuse the shadowing status for the back of the object.
shadow = bsdfData.useThinObjectMode ? shadow : 1;

[branch] if (bsdfData.enableTransmission)
{
// Use the reversed normal from the front for the back of the object.
illuminance = F_Transm_Schlick(bsdfData.fresnel0, saturate(-NdotL)) * clipFactor;
illuminance = F_Transm_Schlick(bsdfData.fresnel0.x, saturate(-NdotL)) * clipFactor; // Transmission is only valid for dielectric
// For low thickness, we can reuse the shadowing status for the back of the object.
shadow = bsdfData.useThinObjectMode ? shadow : 1;

1
Assets/ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawTransmittanceGraph.shader


//-------------------------------------------------------------------------------------
float4 _VolumeAlbedo, _VolumeShapeParam, _ThicknessRemap;
float _ScatteringDistance; // See 'SubsurfaceScatteringProfile'
//-------------------------------------------------------------------------------------
// Implementation

2
Assets/ScriptableRenderPipeline/ShaderLibrary/BSDF.hlsl


float F_Transm_Schlick(float f0, float u)
{
return F_Schlick(f0, 1.0, u); // sub mul mul mul sub mad
return F_Transm_Schlick(f0, 1.0, u); // sub mul mul mul sub mad
}
float3 F_Schlick(float3 f0, float f90, float u)

正在加载...
取消
保存