You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
SWRT visualize and reflection pass now write into surface cache feedback buffer like HWRT. This improves surface resolution in reflections and increases update rate on visible surfaces. New CVars for controlling feedback in reflections: * r.Lumen.Reflections.SurfaceCacheFeedback * r.Lumen.Reflections.HiResSurface #fyi Daniel.Wright #preflight 6392c6e3c709c7275607ce8d #jira none [CL 23462766 by Krzysztof Narkowicz in ue5-main branch]
30 lines
671 B
Plaintext
30 lines
671 B
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
struct FRayCone
|
|
{
|
|
float Width;
|
|
float SpreadAngle;
|
|
};
|
|
|
|
FRayCone UnpackRayCone(uint PackedRayCone)
|
|
{
|
|
FRayCone Result;
|
|
Result.Width = f16tof32(PackedRayCone & 0xFFFF);
|
|
Result.SpreadAngle = f16tof32(PackedRayCone >> 16);
|
|
return Result;
|
|
}
|
|
|
|
uint PackRayCone(FRayCone RayCone)
|
|
{
|
|
return f32tof16(RayCone.Width) | (f32tof16(RayCone.SpreadAngle) << 16);
|
|
}
|
|
|
|
FRayCone PropagateRayCone(in FRayCone Cone, in float SurfaceSpreadAngle, in float HitT)
|
|
{
|
|
FRayCone NewCone;
|
|
NewCone.Width = Cone.SpreadAngle * HitT + Cone.Width;
|
|
NewCone.SpreadAngle = Cone.SpreadAngle + SurfaceSpreadAngle;
|
|
return NewCone;
|
|
} |