浏览代码

Fix warning and profile issue

/iridesence
sebastienlagarde 7 年前
当前提交
86b8e3ad
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDRenderPipelineMenuItems.cs
  2. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/Lit.hlsl

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDRenderPipelineMenuItems.cs


if (mat.HasProperty("_SubsurfaceProfile"))
{
CheckOutFile(VSCEnabled, mat);
float value = mat.GetInt("_DiffusionProfile");
mat.SetInt("_DiffusionProfile", 0);
//float value = mat.GetInt("_DiffusionProfile");
//mat.SetInt("_DiffusionProfile", 0);
EditorUtility.SetDirty(mat);
}

if (mat.HasProperty("_SubsurfaceProfile" + x))
{
CheckOutFile(VSCEnabled, mat);
float value = mat.GetInt("_DiffusionProfile" + x);
mat.SetInt("_DiffusionProfile" + x, 0);
//float value = mat.GetInt("_DiffusionProfile" + x);
//mat.SetInt("_DiffusionProfile" + x, 0);
EditorUtility.SetDirty(mat);
}

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


bsdfData.fresnel0 = bsdfData.enableSpecularColor ? surfaceData.specularColor : ComputeFresnel0(surfaceData.baseColor, surfaceData.metallic, DEFAULT_SPECULAR_VALUE);
// Always assign even if not used, DIFFUSION_NEUTRAL_PROFILE_ID is 0
bsdfData.diffusionProfile == surfaceData.diffusionProfile;
bsdfData.diffusionProfile = surfaceData.diffusionProfile;
// Note: we have ZERO_INITIALIZE the struct so bsdfData.anisotropy == 0.0
// In forward everything is statically know and we could theorically cumulate all the material features. So the code reflect it.

bsdfData.normalWS = UnpackNormalOctEncode(float2(inGBuffer1.r, inGBuffer1.g));
// metallic15 is range [0..12] if mettallic data is needed
float metallic = (metallic15 <= GBUFFER_LIT_ANISOTROPIC_UPPER_BOUND) ? metallic15 / GBUFFER_LIT_ANISOTROPIC_UPPER_BOUND : 0.0;
float metallic = (metallic15 <= GBUFFER_LIT_ANISOTROPIC_UPPER_BOUND) ? metallic15 * (1.0 / GBUFFER_LIT_ANISOTROPIC_UPPER_BOUND) : 0.0;
bsdfData.diffuseColor = ComputeDiffuseColor(baseColor, metallic);
bsdfData.fresnel0 = bsdfData.enableSpecularColor ? inGBuffer2.rgb : ComputeFresnel0(baseColor, metallic, DEFAULT_SPECULAR_VALUE);

正在加载...
取消
保存