2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-18 00:45:22 +00:00

Fix more things that didn't commit for some reason

This commit is contained in:
2020-10-07 20:06:35 -04:00
parent 036e769210
commit c7f87333af
13 changed files with 66 additions and 70 deletions

View File

@@ -6,6 +6,8 @@
#include "zeus/CMatrix4f.hpp"
#include "zeus/CRectangle.hpp"
#include "hsh/hsh.h"
namespace urde {
class CTexture;
@@ -13,8 +15,7 @@ enum class EFilterShape;
enum class EFilterType;
class CColoredQuadFilter {
template <EFilterType Type>
friend struct CColoredQuadFilterPipeline;
public:
struct Uniform {
hsh::float4x4 m_matrix;
hsh::float4 m_color;
@@ -22,6 +23,8 @@ class CColoredQuadFilter {
struct Vert {
hsh::float3 m_pos;
};
private:
hsh::owner<hsh::vertex_buffer<Vert>> m_vbo;
hsh::dynamic_owner<hsh::uniform_buffer<Uniform>> m_uniBuf;
hsh::binding m_dataBind;

View File

@@ -7,16 +7,18 @@
#include "zeus/CRectangle.hpp"
#include "zeus/CVector4f.hpp"
#include "hsh/hsh.h"
namespace urde {
class CFogVolumePlaneShader {
template <size_t I>
friend struct CFogVolumePlanePipeline;
public:
struct Vert {
hsh::float4 pos;
Vert(hsh::float4 pos) : pos(pos) {}
};
private:
hsh::dynamic_owner<hsh::vertex_buffer<Vert>> m_vbo;
std::array<hsh::binding, 4> m_dataBinds;
std::vector<Vert> m_verts;

View File

@@ -25,7 +25,7 @@ template struct CWorldShadowShaderPipeline<false>;
CWorldShadowShader::CWorldShadowShader(u32 w, u32 h) : m_w(w), m_h(h) {
m_vbo = hsh::create_dynamic_vertex_buffer<Vert>(4);
m_uniBuf = hsh::create_dynamic_uniform_buffer<Uniform>();
m_tex = hsh::create_render_texture2d({m_w, m_h}, hsh::RGBA8_UNORM, 1, 0);
m_tex = hsh::create_render_texture2d({m_w, m_h}, 1, 0);
// FIXME hsh bug: can't bind all constant values
bool depth = false;