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

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

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

type

` varying vec4 vColor; varying highp vec2 vTextureCoord; varying lowp float vShaderUsage; uniform sampler2D uSampler; void main(void) { if (vShaderUsage == 0.0) { gl_FragColor = vColor; } else { gl_FragColor = texture2D(uSampler, vTextureCoord); }; } `