1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00
ctruLua/libs/sf2dlib/libsf2d/data/shader.vsh
Firew0lf b4d025d602 Updated the sf2dlib and sftdlib; Added the gfx.color.hex() function; Added the New3DS CPU mode control.
As the color order of the sf2dlib changed, you have to change it in your code, or use the color.hex() function.
To fix the problems, just change "0xRRGGBBAA" to "0xAABBGGRR".
Also, the shader compiler changed to Picasso, so you'll need it in order to compile.
https://github.com/fincs/picasso
2015-12-09 23:14:23 +01:00

30 lines
549 B
GLSL

; Outputs
.out outpos position
.out outtc0 texcoord0
.out outclr color
; Inputs
.alias inpos v0
.alias inarg v1
; Uniforms
.fvec projection[4]
; Constants
.constf RGBA8_TO_FLOAT4(0.00392156862, 0, 0, 0)
.proc main
; outpos = projection * in.pos
dp4 outpos.x, projection[0].wzyx, inpos
dp4 outpos.y, projection[1].wzyx, inpos
dp4 outpos.z, projection[2].wzyx, inpos
dp4 outpos.w, projection[3].wzyx, inpos
; outtc0 = in.texcoord
mov outtc0, inarg
; outclr = RGBA8_TO_FLOAT4(in.color)
mul outclr, RGBA8_TO_FLOAT4.xxxx, inarg
end
.end