UNPKG

xgpu

Version:

XGPU is an extendable library for WebGPU that provides a higher-level, easy-to-use interface for building rendering engines or processing numeric data. It handles automatic data binding, buffer alignment, variable declarations in shaders, and more. XGPU i

17 lines (16 loc) 664 B
// Copyright (c) 2023 Thomas Le Coz. All rights reserved. // This code is governed by an MIT license that can be found in the LICENSE file. export class ShaderType { static Float = { type: "f32" }; static Vec2 = { type: "vec2<f32>" }; static Vec3 = { type: "vec3<f32>" }; static Vec4 = { type: "vec4<f32>" }; static Int = { type: "i32" }; static IVec2 = { type: "vec2<i32>" }; static IVec3 = { type: "vec3<i32>" }; static IVec4 = { type: "vec4<i32>" }; static Uint = { type: "u32" }; static UVec2 = { type: "vec2<u32>" }; static UVec3 = { type: "vec3<u32>" }; static UVec4 = { type: "vec4<u32>" }; }