A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
#pragma shader "Opaque Unlit"
#pragma version 300 es
#pragma domain Unlit
// Fragment-only on purpose: the vertex stage is the one ShaderParser injects, so
// this scene also proves that the INHERITED stage carries z. A material that
// declared its own stage would be testing its own copy instead.
#pragma fragment
precision mediump float;
in vec4 v_color;
in vec2 v_texCoord;
uniform sampler2D u_textures[8];
out vec4 fragColor;
void main() {
fragColor = texture(u_textures[0], v_texCoord) * v_color;
}
#pragma end