all repos — mgba @ 4c38f769565e8ddd7d3a8eef1a41975206c129a0

mGBA Game Boy Advance Emulator

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.out out_rot dummy
22
23; Inputs
24.alias in_pos v0
25.alias in_tc0 v1
26.alias in_col v2
27.alias in_rot v3
28
29.entry vshMain
30.proc vshMain
31	mov out_pos, in_pos
32	mov out_tc0, in_tc0
33	mul out_rot, consts1.ywyx, in_rot.xyy
34
35	; Normalize color by multiplying by 1 / 255
36	mul out_col, consts1.z, in_col
37
38	end
39.end