2021-08-26 10:41:35 -07:00
|
|
|
// Common definitions for both shaders and native code
|
|
|
|
|
2021-09-04 12:36:30 -07:00
|
|
|
#ifndef GLSL
|
|
|
|
#define uint uint32_t
|
|
|
|
#define vec3 vec3_t
|
|
|
|
#define vec4 vec4_t
|
|
|
|
#define TOKENPASTE(x, y) x ## y
|
|
|
|
#define TOKENPASTE2(x, y) TOKENPASTE(x, y)
|
|
|
|
#define PAD(x) float TOKENPASTE2(pad_, __LINE__)[x];
|
|
|
|
#else
|
|
|
|
#define PAD(x)
|
|
|
|
#endif
|
|
|
|
|
2021-09-06 11:57:23 -07:00
|
|
|
#define GEOMETRY_BIT_ANY 0x01
|
|
|
|
#define GEOMETRY_BIT_OPAQUE 0x02
|
|
|
|
|
2021-09-04 12:36:30 -07:00
|
|
|
struct Kusok {
|
|
|
|
uint index_offset;
|
|
|
|
uint vertex_offset;
|
|
|
|
uint triangles;
|
|
|
|
|
|
|
|
// Material
|
|
|
|
uint texture;
|
|
|
|
|
2021-09-06 14:14:24 -07:00
|
|
|
vec4 color;
|
2021-09-04 12:36:30 -07:00
|
|
|
|
|
|
|
vec3 emissive;
|
2021-09-06 14:14:24 -07:00
|
|
|
//PAD(1)
|
2021-09-04 12:36:30 -07:00
|
|
|
|
2021-09-06 14:14:24 -07:00
|
|
|
float roughness;
|
2021-09-04 12:36:30 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifndef GLSL
|
|
|
|
#undef uint
|
|
|
|
#undef vec3
|
|
|
|
#undef vec4
|
|
|
|
#undef TOKENPASTE
|
|
|
|
#undef TOKENPASTE2
|
|
|
|
#undef PAD
|
|
|
|
#endif
|