浏览代码

Removing low mipped normal sample for detail scattering.

/projects-TheLastStand
John Parsaie 6 年前
当前提交
979ba2d2
共有 1 个文件被更改,包括 0 次插入7 次删除
  1. 7
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/Subsurface/LightweightPassLit.hlsl

7
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/Subsurface/LightweightPassLit.hlsl


float2 texcoord : TEXCOORD0;
float2 lightmapUV : TEXCOORD1;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct LightweightVertexOutput

InputData inputData;
InitializeInputData(IN, surfaceData.normalTS, inputData);
half3 normalLowWS = UnpackNormalScale(SAMPLE_TEXTURE2D_LOD(_BumpMap, sampler_BumpMap, IN.uv, 3), _BumpScale);
#ifdef _NORMALMAP
normalLowWS = TangentToWorldNormal(normalLowWS, IN.tangent, IN.binormal, IN.normal);
#endif
float curvature = ( (length(fwidth(IN.normal))) /
(length(fwidth(inputData.positionWS))) * _Curvature );

正在加载...
取消
保存