MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetOutputFormat

Method GetOutputFormat

Source/Engine/Graphics/RenderBuffers.cpp:158–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158PixelFormat RenderBuffers::GetOutputFormat() const
159{
160 auto colorFormat = GraphicsSettings::Get()->RenderColorFormat;
161 // TODO: fix incorrect alpha leaking into reflections on PS5 with R11G11B10_Float
162 if (_useAlpha || PLATFORM_PS5)
163 {
164 // Promote to format when alpha when needed
165 switch (colorFormat)
166 {
167 case GraphicsSettings::RenderColorFormats::R11G11B10:
168 colorFormat = GraphicsSettings::RenderColorFormats::R16G16B16A16;
169 break;
170 }
171 }
172 switch (colorFormat)
173 {
174 case GraphicsSettings::RenderColorFormats::R11G11B10:
175 return PixelFormat::R11G11B10_Float;
176 case GraphicsSettings::RenderColorFormats::R8G8B8A8:
177 return PixelFormat::R8G8B8A8_UNorm;
178 case GraphicsSettings::RenderColorFormats::R16G16B16A16:
179 return PixelFormat::R16G16B16A16_Float;
180 default:
181 return PixelFormat::R32G32B32A32_Float;
182 }
183}
184
185bool RenderBuffers::GetUseAlpha() const
186{

Callers 2

RenderMethod · 0.80
RenderInnerFunction · 0.80

Calls 1

GetFunction · 0.50

Tested by

no test coverage detected