matrix-engine-wgpu
Version:
Networking implemented - based on kurento openvidu server. fix arcball camera,instanced draws added also effect pipeline blend with instancing option.Normalmap added, Fixed shadows casting vs camera/video texture, webGPU powered pwa application. Crazy fas
20 lines (17 loc) • 456 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);
}
`;