UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

18 lines (17 loc) 517 B
var cookie_blit_cube_default = ` varying uv0: vec2f; uniform invViewProj: mat4x4<f32>; var blitTexture: texture_cube<f32>; var blitTextureSampler : sampler; @fragment fn fragmentMain(input : FragmentInput) -> FragmentOutput { var output: FragmentOutput; var projPos = vec4f(input.uv0 * 2.0 - 1.0, 0.5, 1.0); var worldPos = uniform.invViewProj * projPos; output.color = textureSample(blitTexture, blitTextureSampler, worldPos.xyz); return output; } `; export { cookie_blit_cube_default as default };