matrix-engine-wgpu
Version:
obj sequence anim +HOTFIX raycast, webGPU powered pwa application. Crazy fast rendering with AmmoJS physics support. Simple raycaster hit object added.
20 lines (17 loc) • 455 B
JavaScript
export let vertexShadowWGSL = `struct Scene {
lightViewProjMatrix: mat4x4f,
cameraViewProjMatrix: mat4x4f,
lightPos: vec3f,
}
struct Model {
modelMatrix: mat4x4f,
}
var<uniform> scene : Scene;
var<uniform> model : Model;
fn main(
position: vec3f
) -> vec4f {
return scene.lightViewProjMatrix * model.modelMatrix * vec4(position, 1);
}
`