mkxp-z/shader/simpleMatrix.pgl.h
刘皓 2cd8202af3
Convert GLSL shaders to PortableGL's shader format
PortableGL supports shaders, but requires them to be compiled
ahead-of-time to C or C++.

I'll write a compiler later to translate from GLSL to this format
automatically at build time.
2025-03-13 16:16:17 -04:00

33 lines
552 B
C

#include <portablegl.h>
#ifdef __cplusplus
extern "C" {
#endif
struct SimpleMatrixUniforms
{
pgl_mat4 projMat;
pgl_mat4 matrix;
pgl_vec2 texSizeInv;
GLuint texture;
};
struct SimpleMatrixAttribs
{
pgl_vec2 position;
pgl_vec2 texCoord;
pgl_vec4 color;
};
struct SimpleMatrixVarying
{
pgl_vec2 v_texCoord;
pgl_vec4 v_color;
};
void mkxpSimpleMatrixVS(float *output, pgl_vec4 *attribs, Shader_Builtins *builtins, void *uniforms);
void mkxpSimpleMatrixFS(float *input, Shader_Builtins *builtins, void *uniforms);
#ifdef __cplusplus
}
#endif