UNPKG

gpu-curtains

Version:

gpu-curtains is a 3D WebGPU rendering engine. It can be used as a standalone 3D engine, but also includes extra classes focused on mapping 3d objects to DOM elements; It allows users to synchronize values such as position, sizing, or scale between them.

22 lines (17 loc) 380 B
const getDefaultVertexShaderCode = ( /* wgsl */ ` struct VSOutput { @builtin(position) position: vec4f, @location(0) uv: vec2f, }; @vertex fn main( attributes: Attributes, ) -> VSOutput { var vsOutput: VSOutput; vsOutput.position = vec4f(attributes.position, 1.0); vsOutput.uv = attributes.uv; return vsOutput; }` ); export { getDefaultVertexShaderCode };