src/platform/3ds/uishader.v.pica (view raw)
1; Copyright (c) 2015 Yuri Kunde Schlesner
2; Copyright (c) 2016 Jeffrey Pfau
3
4;
5; This Source Code Form is subject to the terms of the Mozilla Public
6; License, v. 2.0. If a copy of the MPL was not distributed with this
7; file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9; uishader.vsh - Simply multiplies input position and texcoords with
10; corresponding matrices before outputting
11
12; Uniforms
13
14; Constants
15.constf consts1(0.0, 1.0, 0.0039215686, -1.0)
16
17; Outputs
18.out out_pos position
19.out out_tc0 texcoord0
20.out out_col color
21
22; Inputs
23.alias in_pos v0
24.alias in_tc0 v1
25.alias in_col v2
26
27.proc main
28 mov out_pos, in_pos
29 mov out_tc0, in_tc0
30
31 ; Normalize color by multiplying by 1 / 255
32 mul out_col, consts1.z, in_col
33
34 end
35.end