xash3d-fwgs/ref_vk/shaders/ray_interop.h

41 lines
622 B
C
Raw Normal View History

// Common definitions for both shaders and native code
#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
#define GEOMETRY_BIT_ANY 0x01
#define GEOMETRY_BIT_OPAQUE 0x02
struct Kusok {
uint index_offset;
uint vertex_offset;
uint triangles;
// Material
uint texture;
2021-09-06 14:14:24 -07:00
vec4 color;
vec3 emissive;
2021-09-06 14:14:24 -07:00
//PAD(1)
2021-09-06 14:14:24 -07:00
float roughness;
};
#ifndef GLSL
#undef uint
#undef vec3
#undef vec4
#undef TOKENPASTE
#undef TOKENPASTE2
#undef PAD
#endif