2021-12-30 19:38:18 -05:00
|
|
|
|
|
|
|
#include "common/dma/dma_chain_read.h"
|
2022-06-22 23:37:46 -04:00
|
|
|
|
2021-12-30 19:38:18 -05:00
|
|
|
#include "game/graphics/opengl_renderer/BucketRenderer.h"
|
|
|
|
#include "game/graphics/opengl_renderer/SkyBlendCommon.h"
|
2022-06-22 23:37:46 -04:00
|
|
|
#include "game/graphics/pipelines/opengl.h"
|
2021-12-30 19:38:18 -05:00
|
|
|
|
|
|
|
class SkyBlendGPU {
|
|
|
|
public:
|
|
|
|
SkyBlendGPU();
|
|
|
|
~SkyBlendGPU();
|
2023-03-25 16:34:03 -04:00
|
|
|
void init_textures(TexturePool& tex_pool, GameVersion version);
|
2021-12-30 19:38:18 -05:00
|
|
|
SkyBlendStats do_sky_blends(DmaFollower& dma,
|
|
|
|
SharedRenderState* render_state,
|
|
|
|
ScopedProfilerNode& prof);
|
|
|
|
|
|
|
|
private:
|
|
|
|
GLuint m_framebuffers[2]; // sky, clouds
|
|
|
|
GLuint m_textures[2]; // sky, clouds
|
|
|
|
int m_sizes[2] = {32, 64};
|
|
|
|
GLuint m_gl_vertex_buffer;
|
|
|
|
|
|
|
|
struct Vertex {
|
|
|
|
float x = 0;
|
|
|
|
float y = 0;
|
|
|
|
float intensity = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
Vertex m_vertex_data[6];
|
2022-03-04 18:22:01 -05:00
|
|
|
|
|
|
|
struct TexInfo {
|
|
|
|
GpuTexture* tex;
|
|
|
|
u32 tbp;
|
|
|
|
} m_tex_info[2];
|
2021-12-30 19:38:18 -05:00
|
|
|
};
|