GPU: Two-pass rendering for B-F transparency

This commit is contained in:
Connor McLaughlin
2019-10-06 13:09:03 +10:00
parent 7254d48835
commit 5627955900
5 changed files with 65 additions and 47 deletions

View File

@ -51,9 +51,9 @@ private:
void CreateVertexBuffer();
bool CompilePrograms();
bool CompileProgram(GL::Program& prog, bool transparent, bool textured, TextureColorMode texture_color_mode,
bool blending);
void SetDrawState();
bool CompileProgram(GL::Program& prog, TransparencyRenderMode transparent, bool textured,
TextureColorMode texture_color_mode, bool blending);
void SetDrawState(TransparencyRenderMode render_mode);
// downsample texture - used for readbacks at >1xIR.
std::unique_ptr<GL::Texture> m_vram_texture;
@ -71,11 +71,9 @@ private:
GLuint m_attributeless_vao_id = 0;
bool m_vram_read_texture_dirty = true;
bool m_last_transparency_enable = false;
TransparencyMode m_last_transparency_mode = TransparencyMode::BackgroundMinusForeground;
bool m_drawing_area_changed = true;
std::array<std::array<std::array<std::array<GL::Program, 2>, 3>, 2>, 2> m_render_programs;
std::array<std::array<std::array<std::array<GL::Program, 2>, 3>, 2>, 4> m_render_programs;
GL::Program m_reinterpret_rgb8_program;
GLStats m_stats = {};