mirror of
https://github.com/ctruLua/ctruLua.git
synced 2025-10-27 16:39:29 +00:00
Added a missing file
This commit is contained in:
parent
49c87e5526
commit
3255f2ad74
1 changed files with 44 additions and 0 deletions
44
libs/sf2dlib/libsf2d/source/shader.v.pica
Normal file
44
libs/sf2dlib/libsf2d/source/shader.v.pica
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
; Outputs
|
||||
.out outpos position
|
||||
.out outtc0 texcoord0
|
||||
.out outclr color
|
||||
|
||||
; Inputs
|
||||
.alias inpos v0
|
||||
.alias inarg v1
|
||||
|
||||
; Uniforms
|
||||
.fvec projection[4]
|
||||
.fvec transform
|
||||
.bool useTransform
|
||||
|
||||
; Constants
|
||||
.constf RGBA8_TO_FLOAT4(0.00392156862, 0, 0, 0)
|
||||
|
||||
.proc main
|
||||
ifu useTransform
|
||||
; outpos = projection * transform * in.pos
|
||||
dp4 r15.x, transform[0], inpos
|
||||
dp4 r15.y, transform[1], inpos
|
||||
dp4 r15.z, transform[2], inpos
|
||||
dp4 r15.w, transform[3], inpos
|
||||
dp4 outpos.x, projection[0], r15
|
||||
dp4 outpos.y, projection[1], r15
|
||||
dp4 outpos.z, projection[2], r15
|
||||
dp4 outpos.w, projection[3], r15
|
||||
.else
|
||||
; outpos = projection * in.pos
|
||||
dp4 outpos.x, projection[0], inpos
|
||||
dp4 outpos.y, projection[1], inpos
|
||||
dp4 outpos.z, projection[2], inpos
|
||||
dp4 outpos.w, projection[3], inpos
|
||||
.end
|
||||
|
||||
; outtc0 = in.texcoord
|
||||
mov outtc0, inarg
|
||||
|
||||
; outclr = RGBA8_TO_FLOAT4(in.color)
|
||||
mul outclr, RGBA8_TO_FLOAT4.xxxx, inarg
|
||||
|
||||
end
|
||||
.end
|
||||
Loading…
Add table
Add a link
Reference in a new issue