| 156 | } |
| 157 | |
| 158 | PixelFormat 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 | |
| 185 | bool RenderBuffers::GetUseAlpha() const |
| 186 | { |
no test coverage detected