tests/manual/rhi/hdr/hdrtexture.vert
raw| 1 | #version 440 |
| 2 | |
| 3 | layout(location = 0) in vec4 position; |
| 4 | layout(location = 1) in vec2 texcoord; |
| 5 | |
| 6 | layout(location = 0) out vec2 v_texcoord; |
| 7 | |
| 8 | layout(std140, binding = 0) uniform buf { |
| 9 | mat4 mvp; |
| 10 | int flip; |
| 11 | int sdr; |
| 12 | float tonemapInMaxNits; |
| 13 | float tonemapOutMaxNits; |
| 14 | }; |
| 15 | |
| 16 | void main() |
| 17 | { |
| 18 | v_texcoord = vec2(texcoord.x, texcoord.y); |
| 19 | if (flip != 0) |
| 20 | v_texcoord.y = 1.0 - v_texcoord.y; |
| 21 | gl_Position = mvp * position; |
| 22 | } |