MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / CreateShaderFactory

Method CreateShaderFactory

Rtxpt/SampleCommon/SampleBaseApp.cpp:388–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388void SampleBaseApp::CreateShaderFactory()
389{
390 const char* shaderTypeName = donut::app::GetShaderTypeName(m_DeviceManager->GetGraphicsAPI());
391 const std::filesystem::path appDirectory = donut::app::GetDirectoryWithExecutable();
392 std::filesystem::path frameworkShaderPath = appDirectory / "ShaderPrecompiled/framework" / shaderTypeName;
393 std::filesystem::path appShaderPath = appDirectory / "ShaderPrecompiled/Rtxpt" / shaderTypeName;
394 std::filesystem::path nrdShaderPath = appDirectory / "ShaderPrecompiled/nrd" / shaderTypeName;
395 std::filesystem::path ommShaderPath = appDirectory / "ShaderPrecompiled/omm" / shaderTypeName;
396
397 std::shared_ptr<donut::vfs::RootFileSystem> rootFS = std::make_shared<donut::vfs::RootFileSystem>();
398 rootFS->mount("/ShaderPrecompiled/donut", frameworkShaderPath);
399 rootFS->mount("/ShaderPrecompiled/app", appShaderPath);
400 rootFS->mount("/ShaderPrecompiled/nrd", nrdShaderPath);
401 rootFS->mount("/ShaderPrecompiled/omm", ommShaderPath);
402
403 auto device = m_DeviceManager->GetDevice();
404 m_ShaderFactory = std::make_shared<donut::engine::ShaderFactory>(device, rootFS, "/ShaderPrecompiled");
405}
406
407bool SampleBaseApp::IsSERSupported() const
408{

Callers

nothing calls this directly

Calls 1

GetDeviceMethod · 0.45

Tested by

no test coverage detected