Skip to content

Commit

Permalink
Improve reflections on water
Browse files Browse the repository at this point in the history
  • Loading branch information
Hozar2002 authored and Drombeys committed Oct 28, 2024
1 parent c9957c8 commit e76b36e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gamedata/shaders/d3d11/reflections.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ float4 ScreenSpaceLocalReflections(float3 Point, float3 Reflect)
float L = 0.025f, DeltaL = 0.0f;

float Fade = saturate(dot(Reflect, normalize(Point)) * 4.0f);

Reflect.xyz /= abs(Reflect.z) + 0.00001f;

if (Fade < 0.001f)
{
Expand All @@ -46,7 +44,7 @@ float4 ScreenSpaceLocalReflections(float3 Point, float3 Reflect)
HitPos = gbuf_unpack_position(ReflUV);
if (all(min(min(1.f - ReflUV.x, ReflUV.x), min(1.f - ReflUV.y, ReflUV.y))))
{
L = abs(Point.z - HitPos.z);
L = length(Point - HitPos);
}
else
{
Expand Down

0 comments on commit e76b36e

Please sign in to comment.