Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/caviar/src/renderers/webgl/shader.ts>vertex2d

⚡ Blazing fast, modern, Game Engine powered by WebGPU for Deno and the browser
Go to Latest
variable vertex2d
import { vertex2d } from "https://deno.land/x/caviar@2.1.7/src/renderers/webgl/shader.ts";

type

` attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform float uShaderUsage; uniform vec4 uVertexColor; uniform vec2 uTransformMatrix; varying lowp float vShaderUsage; varying lowp vec4 vColor; varying highp vec2 vTextureCoord; void main(void) { gl_Position = vec4(aVertexPosition + uTransformMatrix, 1, 1); if (uShaderUsage == 0.0) { vColor = uVertexColor; } else { vTextureCoord = aTextureCoord; } vShaderUsage = uShaderUsage; } `