浏览代码

Fixed truncation warnings

/feature-infinite-sea
Andre McGrail 3 年前
当前提交
ea2f6612
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 6
      Packages/com.verasl.water-system/Shaders/WaterCommon.hlsl

6
Packages/com.verasl.water-system/Shaders/WaterCommon.hlsl


inputData.normalWS = input.normalWS;
// Detail waves
DetailNormals(inputData.normalWS, input.uv, inputData.waterFX, depth);
DetailNormals(inputData.normalWS, input.uv, inputData.waterFX, depth.x);
inputData.viewDirectionWS = input.viewDirectionWS.xyz;

// Lighting
Light mainLight = GetMainLight(TransformWorldToShadowCoord(IN.positionWS));
half shadow = SoftShadows(screenUV, IN.positionWS, IN.viewDirectionWS.xyz, depth.x);
half shadow = SoftShadows(screenUV.xy, IN.positionWS, IN.viewDirectionWS.xyz, depth.x);
half3 GI = SampleSH(IN.normalWS);
// SSS

BRDFData brdfData;
half a = 1;
InitializeBRDFData(half3(0, 0, 0), 0, half3(1, 1, 1), 0.95, a, brdfData);
half3 spec = DirectBDRF(brdfData, IN.normalWS, mainLight.direction, IN.viewDirectionWS) * shadow * mainLight.color;
half3 spec = DirectBDRF(brdfData, IN.normalWS, mainLight.direction, IN.viewDirectionWS.xyz) * shadow.xxx * mainLight.color;
#ifdef _ADDITIONAL_LIGHTS
uint pixelLightCount = GetAdditionalLightsCount();
for (uint lightIndex = 0u; lightIndex < pixelLightCount; ++lightIndex)

正在加载...
取消
保存