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.

14 lines (12 loc) 570 B
//#region src/core/shaders/full/fragment/get-default-shader-pass-fragment-code.ts /** Default fragment shader code to use with {@link core/renderPasses/ShaderPass.ShaderPass | ShaderPass} that outputs the content of the pass `renderTexture` as is. */ const getDefaultShaderPassFragmentCode = ` struct VSOutput { @builtin(position) position: vec4f, @location(0) uv: vec2f, }; @fragment fn main(fsInput: VSOutput) -> @location(0) vec4f { return textureSample(renderTexture, defaultSampler, fsInput.uv); }`; //#endregion export { getDefaultShaderPassFragmentCode };