You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
1. Use `r.SSR.TiledComposite 1` to enable tiled SSR (Default off). 2. Use `r.SSR.TiledComposite.Visualize 1` to visualize the current tiled SSR when SSR is enabled. 3. Add MinSpecular(0.01f) and MaxRoughness(0.3f) to cull tiles. #rb sebastien.hillaire, jeremy.moore [CL 29293956 by tiantian xie in ue5-main branch]
24 lines
843 B
Plaintext
24 lines
843 B
Plaintext
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*================================================================================================
|
|
ScreenSpaceReflectionTileCommons.ush:
|
|
=================================================================================================*/
|
|
#pragma once
|
|
|
|
#ifndef SSR_TILE_SIZE_XY
|
|
#define SSR_TILE_SIZE_XY (8U)
|
|
#endif
|
|
|
|
//#if SSR_TILE_SIZE_XY != 8U
|
|
// #error SSR_TILE_SIZE_XY is currently designed to be 8U.
|
|
//#endif
|
|
|
|
bool IsSSRTileUsed(uint2 PixelPos, uint2 InSSRTiledViewRes, StructuredBuffer<uint> InSSRTileMaskBuffer)
|
|
{
|
|
uint2 SSRTileIndex = PixelPos / SSR_TILE_SIZE_XY;
|
|
uint MaskLinearIndex = InSSRTiledViewRes.x * SSRTileIndex.y + SSRTileIndex.x;
|
|
uint Mask = 1u << (MaskLinearIndex % 32u);
|
|
bool bTileUsed = (InSSRTileMaskBuffer[MaskLinearIndex / 32u] & Mask) != 0;
|
|
|
|
return bTileUsed;
|
|
} |