You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
28 lines
1019 B
Plaintext
28 lines
1019 B
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================================
|
|
RayTracingReflectionsCommon.ush: Common functions for ray traced Reflections
|
|
===============================================================================================*/
|
|
|
|
#pragma once
|
|
|
|
#include "../Common.ush"
|
|
|
|
// Note that the values stored in this will be accumulations across all valid samples and will not be normalized or averaged
|
|
// until after splitting into their own individual textures
|
|
struct FImaginaryReflectionGBufferData
|
|
{
|
|
float3 WorldNormal;
|
|
// Not DeviceZ so that it can be linearly interpolated in world space
|
|
float SceneDepth;
|
|
float2 Velocity;
|
|
// Required for averaging to account for the fact that not all samples may hit a valid imaginary surface
|
|
uint ValidSamples;
|
|
};
|
|
|
|
float GetRoughnessFade(float Roughness, float MaxRoughness)
|
|
{
|
|
float RoughnessMaskScale = -2.0 / MaxRoughness;
|
|
return saturate(Roughness * RoughnessMaskScale + 2.0);
|
|
}
|