浏览代码

Revert unnecessary changes.

/main
Yao Xiaoling 7 年前
当前提交
b6cb6283
共有 2 个文件被更改,包括 9 次插入17 次删除
  1. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/BaseLitUI.cs
  2. 24
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitDataIndividualLayer.hlsl

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/BaseLitUI.cs


protected MaterialProperty supportDBuffer = null;
protected const string kSupportDBuffer = "_SupportDBuffer";
protected virtual MaterialId defaultMaterialID { get { return MaterialId.LitStandard; } }
protected override void FindBaseMaterialProperties(MaterialProperty[] props)
{
base.FindBaseMaterialProperties(props);

24
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Lit/LitDataIndividualLayer.hlsl


{
float alpha = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)).a * ADD_IDX(_BaseColor).a;
#ifndef ALPHA_USED_AS_SMOOTHNESS
#if defined(_ALPHATEST_ON) && !defined(LAYERED_LIT_SHADER)
float alphaCutoff = _AlphaCutoff;
#ifdef CUTOFF_TRANSPARENT_DEPTH_PREPASS
alphaCutoff = _AlphaCutoffPrepass;
#elif defined(CUTOFF_TRANSPARENT_DEPTH_POSTPASS)
alphaCutoff = _AlphaCutoffPostpass;
#endif
DoAlphaTest(alpha, alphaCutoff);
#if defined(_ALPHATEST_ON) && !defined(LAYERED_LIT_SHADER)
float alphaCutoff = _AlphaCutoff;
#ifdef CUTOFF_TRANSPARENT_DEPTH_PREPASS
alphaCutoff = _AlphaCutoffPrepass;
#elif defined(CUTOFF_TRANSPARENT_DEPTH_POSTPASS)
alphaCutoff = _AlphaCutoffPostpass;
surfaceData.perceptualSmoothness = 1;
#else
surfaceData.perceptualSmoothness = alpha;
alpha = 1;
DoAlphaTest(alpha, alphaCutoff);
#endif
float3 detailNormalTS = float3(0.0, 0.0, 0.0);

bentNormalTS = ADD_IDX(GetBentNormalTS)(input, layerTexCoord, normalTS, detailNormalTS, detailMask);
#if defined(_MASKMAP_IDX)
surfaceData.perceptualSmoothness *= SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).a;
surfaceData.perceptualSmoothness = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_MaskMap), SAMPLER_MASKMAP_IDX, ADD_IDX(layerTexCoord.base)).a;
surfaceData.perceptualSmoothness *= ADD_IDX(_Smoothness);
surfaceData.perceptualSmoothness = ADD_IDX(_Smoothness);
#endif
#ifdef _DETAIL_MAP_IDX

正在加载...
取消
保存