浏览代码

Updated shaders for new API

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

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


half fresnelTerm = CalculateFresnelTerm(lerp(IN.normal, half3(0, 1, 0), 0.5), IN.viewDir.xyz);
// Shadows
half shadow = DirectionalLightRealtimeShadow(TransformWorldToShadowCoord(IN.posWS));
half shadow = MainLightRealtimeShadow(TransformWorldToShadowCoord(IN.posWS));
Light mainLight = GetDirectionalLight();
Light mainLight = GetMainLight();
half3 ambient = SampleSHPixel(IN.lightmapUVOrVertexSH, IN.normal) * (mainLight.color * mainLight.distanceAttenuation) * 0.5;
// Reflections

2
Packages/com.verasl.water-system/Shaders/WaterLighting.hlsl


//specular
half3 Highlights(half3 positionWS, half roughness, half3 normalWS, half3 viewDirectionWS)
{
Light mainLight = GetDirectionalLight();
Light mainLight = GetMainLight();
half roughness2 = roughness * roughness;
half3 halfDir = SafeNormalize(mainLight.direction + viewDirectionWS);

正在加载...
取消
保存