#version 300 es // Samples the software-rendered scene image (the WebGL port of scene.frag). precision highp float; precision highp sampler2D; uniform sampler2D u_scene; in vec2 v_uv; out vec4 frag_color; void main() { if (v_uv.x < 0.0 || v_uv.x > 1.0 || v_uv.y < 0.0 || v_uv.y > 1.0) discard; // The engine stores 0xAARRGGBB (BGRA in memory), uploaded as GL_RGBA. frag_color = texture(u_scene, v_uv).bgra; }