Files
UnrealEngineUWP/Engine/Shaders/Shared/StrataDefinitions.h
Sebastien Hillaire 0f480e8e08 Strata more optimisation and decoupling from GBuffer
- added a simple and fast clear path of the material buffer
- light and env light passes now reads AO and isStrataMaterial from the StrataHeader. No longer reads the classification or gbuffer data.
- Handle the max BSDF count case from the compiler.

Clear est 0.1ms at 1080p
SkyEnv pass cost 0.7->0.6ms et occupancy 60->70%

#rb Charles.deRousiers

[CL 15364191 by Sebastien Hillaire in ue5-main branch]
2021-02-09 04:08:35 -04:00

35 lines
1.3 KiB
C

// Copyright Epic Games, Inc. All Rights Reserved.
/*================================================================================================
StrataDefinitions.ush: used in ray tracing shaders and C++ code to define common constants
!!! Changing this file requires recompilation of the engine !!!
=================================================================================================*/
#pragma once
// Change this to force recompilation of all strata dependent shaders (use https://www.random.org/cgi-bin/randbyte?nbytes=4&format=h)
#define STRATA_SHADER_VERSION 0xc9624d0e
#define STRATA_MAX_BSDF_COUNT_PER_LAYER 4
#define STRATA_MAX_LAYER_COUNT 4
#define STRATA_MAX_BSDF_COUNT 15
// It this is changed, STATE_BITS_SHAREDNORMAL also needs to be updated
#define STRATA_MAX_SHARED_NORMAL_REGISTERS 4
#define STRATA_PACKED_NORMAL_STRIDE_BYTES 4
#define STRATA_BSDF_TYPE_SLAB 0
#define STRATA_BSDF_TYPE_SHEEN 1
#define STRATA_BSDF_TYPE_VOLUMETRICFOGCLOUD 2
#define STRATA_BSDF_TYPE_UNLIT 3
#define STRATA_BSDF_TYPE_HAIR 4
#define STRATA_BSDF_TYPE_SINGLELAYERWATER 5
// When more than 8 BSDF must exists, please update STATE_BITS_BSDF and FStrataClassification.ShadingModels packing in Strata.ush
#define STRATA_DATA_TILE_SIZE 8
#define STRATA_DATA_TILE_SIZE_DIV_AS_SHIFT 3