35 lines
1.1 KiB
Zig
35 lines
1.1 KiB
Zig
pub const shaderTypes = @import("shaderTypes");
|
|
|
|
pub const int = shaderTypes.int;
|
|
pub const uint = shaderTypes.uint;
|
|
|
|
pub const vec2 = shaderTypes.vec2;
|
|
pub const u8vec4 = shaderTypes.u8vec4;
|
|
pub const vec3 = shaderTypes.vec3;
|
|
pub const vec4 = shaderTypes.vec4;
|
|
pub const mat4 = shaderTypes.mat4;
|
|
pub const float = shaderTypes.float;
|
|
|
|
pub const BufferInfo = shaderTypes.BufferInfo;
|
|
pub const Uniforms = struct {
|
|
time: float,
|
|
|
|
pub const FieldDetails: []shaderTypes.FieldDetail = &.{
|
|
.{ .name = "time", .size = 4, .offset = 0 },
|
|
};
|
|
|
|
pub const Buffer: BufferInfo = .{ .uniform = 0 };
|
|
};
|
|
|
|
// Compile-time validation check
|
|
comptime {
|
|
shaderTypes.ValidateGeneratedStruct(Uniforms);
|
|
}
|
|
|
|
pub const LoadArgs = shaderTypes.ShaderLoadArgs{
|
|
.num_samplers = 1, // The number of samplers defined in the shader.
|
|
.num_storage_textures = 0, // The number of storage textures defined in the shader.
|
|
.num_storage_buffers = 0, // The number of storage buffers defined in the shader.
|
|
.num_uniform_buffers = 1, // The number of uniform buffers defined in the shader.
|
|
};
|