浏览代码

Fixed SSS shadows

/projects-TheLastStand
John Parsaie 7 年前
当前提交
ff9a2a8c
共有 2 个文件被更改,包括 1 次插入13 次删除
  1. 3
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/Subsurface/Lighting.hlsl
  2. 11
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/Subsurface/LightweightPassLit.hlsl

3
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/Subsurface/Lighting.hlsl


Light mainLight = GetMainLight(inputData.positionWS);
#ifdef _SHADOWS_ENABLED
#endif
MixRealtimeAndBakedGI(mainLight, inputData.normalWS, inputData.bakedGI, half4(0, 0, 0, 0));

color += inputData.vertexLighting * brdfData.diffuse;
color += emission;
return half4(color, alpha);
}

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


half3 viewDir : TEXCOORD6;
half4 fogFactorAndVertexLight : TEXCOORD7; // x: fogFactor, yzw: vertex light
#ifdef _SHADOWS_ENABLED
#endif
float4 clipPos : SV_POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID

inputData.viewDirectionWS = normalize(IN.viewDir);
#endif
#ifdef _SHADOWS_ENABLED
#else
inputData.shadowCoord = float4(0, 0, 0, 0);
#endif
inputData.fogCoord = IN.fogFactorAndVertexLight.x;
inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw;
inputData.bakedGI = SampleGI(IN.lightmapUVOrVertexSH, inputData.normalWS);

half3 vertexLight = VertexLighting(o.posWS, o.normal);
half fogFactor = ComputeFogFactor(o.clipPos.z);
o.fogFactorAndVertexLight = half4(fogFactor, vertexLight);
#ifdef _SHADOWS_ENABLED
#endif
return o;
}

正在加载...
取消
保存