custom transform changes

This commit is contained in:
iwubcode 2024-02-02 17:29:47 -06:00
commit b13f8409c9
2 changed files with 3 additions and 0 deletions

View file

@ -103,6 +103,8 @@ struct alignas(16) VertexShaderConstants
u32 vertex_offset_posmtx;
std::array<u32, 2> vertex_offset_colors;
std::array<u32, 8> vertex_offset_texcoords;
// For custom meshes (TODO: move)
std::array<float4, 4> custom_transform;
};
enum class VSExpand : u32

View file

@ -319,6 +319,7 @@ static const char s_shader_uniforms[] = "\tuint components;\n"
"\tuint vertex_offset_rawcolor0;\n"
"\tuint vertex_offset_rawcolor1;\n"
"\tuint4 vertex_offset_rawtex[2];\n" // std140 is pain
"\tfloat4 custom_transform[4];\n"
"\t#define xfmem_texMtxInfo(i) (xfmem_pack1[(i)].x)\n"
"\t#define xfmem_postMtxInfo(i) (xfmem_pack1[(i)].y)\n"
"\t#define xfmem_color(i) (xfmem_pack1[(i)].z)\n"