-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathFFNx.blit.vert
32 lines (26 loc) · 1.33 KB
/
FFNx.blit.vert
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/****************************************************************************/
// Copyright (C) 2023 Cosmos //
// //
// This file is part of FFNx //
// //
// FFNx is free software: you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation, either version 3 of the License //
// //
// FFNx is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
/****************************************************************************/
$input a_position, a_texcoord0
$output v_texcoord0
#include <bgfx/bgfx_shader.sh>
void main()
{
vec4 pos = a_position;
pos.w = 1.0 / pos.w;
pos.xyz *= pos.w;
pos = mul(u_proj, pos);
gl_Position = pos;
v_texcoord0 = a_texcoord0;
}