UNPKG

pex-renderer

Version:

Physically Based Renderer for Pex

18 lines (13 loc) 317 B
module.exports = /* glsl */ ` precision highp float; varying vec2 vTexCoord; uniform float uLevelSize; uniform sampler2D uSource; uniform float uSourceSize; uniform float uSourceRegionSize; void main() { vec2 uv = vTexCoord; uv *= uSourceRegionSize / uSourceSize; gl_FragColor = texture2D(uSource, uv); } `