Select Git revision
mpi_job_2nodes.sh
-
Jannis Klinkenberg authoredJannis Klinkenberg authored
OptiXContextManager.cpp 33.52 KiB
//#undef UpdateResource
#include "OptiXContextManager.h"
#include "OptiXModule.h"
#include "OptiXBuffer.h"
#include "RenderCore.h"
#include "EngineUtils.h"
#include <Runtime/Engine/Classes/Engine/Engine.h>
#include "Runtime/Engine/Public/SceneView.h"
#include "Runtime/Engine/Classes/Materials/MaterialInstanceDynamic.h"
#include "Runtime/Engine/Classes/Engine/TextureCube.h"
#include "Runtime/Engine/Public/TextureResource.h"
#include "Runtime/Engine/Classes/Engine/TextureRenderTarget2D.h"
#include "Runtime/Engine/Classes/Engine/TextureRenderTargetCube.h"
// VR
#include "Runtime/HeadMountedDisplay/Public/IHeadMountedDisplay.h"
#include "Runtime/HeadMountedDisplay/Public/IXRTrackingSystem.h"
#include "Runtime/HeadMountedDisplay/Public/IXRCamera.h"
#include "Runtime/Engine/Classes/GameFramework/GameUserSettings.h"
#include "Async.h"
// Console variables todo
static TAutoConsoleVariable<int32> CVarDisableTrace(
TEXT("optix.DisableTrace"),
0,
TEXT("Defines if Optix should perform a constant trace.\n"),
ECVF_Scalability | ECVF_RenderThreadSafe);
static TAutoConsoleVariable<int32> CVarDisableLaserTrace(
TEXT("optix.DisableLaserTrace"),
0,
TEXT("Defines if Optix should perform a constant trace.\n"),
ECVF_Scalability | ECVF_RenderThreadSafe);
FOptiXContextManager::FOptiXContextManager(const FAutoRegister& AutoRegister)
: FSceneViewExtensionBase(AutoRegister)
{
UE_LOG(LogTemp, Display, TEXT("FOptiXContextManager, is in rendering thread: %i"), static_cast<int32>(IsInRenderingThread()));
RTXOn = 0;
LaserMaxDepth = 20;
LaserEntryPoint = 1; // Default, will be overwritten anyway
LaserBufferWidth = 50 * 50;
LaserBufferHeight = LaserMaxDepth * 2;
LaserBufferSize = LaserBufferHeight * LaserBufferWidth;
bValidCubemap.AtomicSet(false);
OnSceneChangedDelegate.AddRaw(this, &FOptiXContextManager::SceneChangedCallback);
}
void FOptiXContextManager::SetupViewFamily(FSceneViewFamily & InViewFamily)
{
//UE_LOG(LogTemp, Warning, TEXT("SetupViewFamily"));
}