MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / GetFramebufferInfo

Method GetFramebufferInfo

src/engine/FramebufferFactory.cpp:55–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55nvrhi::FramebufferInfo FramebufferFactory::GetFramebufferInfo()
56{
57 nvrhi::FramebufferInfo info;
58
59 for (auto rt : RenderTargets)
60 {
61 info.addColorFormat(rt->getDesc().format);
62 }
63
64 if (DepthTarget)
65 info.setDepthFormat(DepthTarget->getDesc().format);
66
67 // Assume all textures have the same sample count
68 if (!RenderTargets.empty())
69 {
70 info.setSampleCount(RenderTargets[0]->getDesc().sampleCount);
71 info.setSampleQuality(RenderTargets[0]->getDesc().sampleQuality);
72 }
73 else if (DepthTarget)
74 {
75 info.setSampleCount(DepthTarget->getDesc().sampleCount);
76 info.setSampleQuality(DepthTarget->getDesc().sampleQuality);
77 }
78
79 return info;
80}

Callers 4

ToneMappingPassMethod · 0.80
EnvironmentMapPassMethod · 0.80
SkyPassMethod · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected