1$input v_texcoord0, v_color0
2
3/*
4 * Copyright 2011-2019 Branimir Karadzic. All rights reserved.
5 * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
6 */
7
8#include "common.sh"
9
10SAMPLERCUBE(s_texColor, 0);
11uniform mat4 u_mtx;
12
13void main()
14{
15	vec3 dir = vec3( (v_texcoord0.xy*2.0 - 1.0) * vec2(1.0, -1.0), 1.0);
16	dir = normalize(mul(u_mtx, vec4(dir, 0.0) ).xyz);
17
18	vec4 color = textureCubeLod(s_texColor, dir, u_textureLod);
19	color.xyz = applyExposure(color.xyz);
20	color *= v_color0;
21
22	gl_FragColor = toOutput(color, u_outputFormat, u_sdrWhiteNits);
23}
24