Add Graphics.TestValue general purpose utility for A/B testing features and perf in shaders during development
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "Engine/Serialization/MemoryReadStream.h"
|
||||
#include "Engine/Level/LargeWorlds.h"
|
||||
#include "Engine/Renderer/RenderList.h"
|
||||
#include "Engine/Graphics/Graphics.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Graphics/GPUDevice.h"
|
||||
#include "Engine/Graphics/GPUContext.h"
|
||||
@@ -38,6 +39,7 @@ GPU_CB_STRUCT(MaterialShaderDataPerView {
|
||||
Float3 LargeWorldsChunkIndex;
|
||||
float LargeWorldsChunkSize;
|
||||
Float3 ViewPadding0;
|
||||
float TestValue;
|
||||
float ScaledTimeParam;
|
||||
});
|
||||
|
||||
@@ -89,6 +91,7 @@ void IMaterial::BindParameters::BindViewData()
|
||||
cb.TemporalAAJitter = view.TemporalAAJitter;
|
||||
cb.LargeWorldsChunkIndex = LargeWorlds::Enable ? (Float3)Int3(view.Origin / LargeWorlds::ChunkSize) : Float3::Zero;
|
||||
cb.LargeWorldsChunkSize = LargeWorlds::ChunkSize;
|
||||
cb.TestValue = Graphics::TestValue;
|
||||
|
||||
// Update constants
|
||||
GPUContext->UpdateCB(PerViewConstants, &cb);
|
||||
|
||||
Reference in New Issue
Block a user