浏览代码

Removed variable 'loop' as itwas causing issues for PS4 compiling (#129)

/main
GitHub 4 年前
当前提交
fddccbb4
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 9
      Packages/com.verasl.water-system/Shaders/WaterLighting.hlsl

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


#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#define SHADOW_ITERATIONS 4
half CalculateFresnelTerm(half3 normalWS, half3 viewDirectionWS)
{
return saturate(pow(1.0 - dot(normalWS, viewDirectionWS), 5));//fresnel TODO - find a better place

{
half2 jitterUV = screenUV.xy * _ScreenParams.xy * _DitherPattern_TexelSize.xy;
half shadowAttenuation = 0;
uint loop = 4;
float loopDiv = 1.0 / loop;
for (uint i = 0u; i < loop; ++i)
float loopDiv = 1.0 / SHADOW_ITERATIONS;
for (uint i = 0u; i < SHADOW_ITERATIONS; ++i)
{
#ifndef _STATIC_WATER
jitterUV += frac(half2(_Time.x, -_Time.z));

正在加载...
取消
保存