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
Latest
variable fragment2d
import { fragment2d } from "https://deno.land/x/caviar@2.6.9/src/renderers/webgl/shader.ts";

type

` // #version 330 core 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); }; } `