Skip to content

Instantly share code, notes, and snippets.

@dpasca
Last active May 22, 2020 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpasca/02f18de4756542209d2b7f50256862dd to your computer and use it in GitHub Desktop.
Save dpasca/02f18de4756542209d2b7f50256862dd to your computer and use it in GitHub Desktop.
;==========================================================
;= C:\Users\Davide\dev\repos\RibTools\_distrib/TestScenes/KillerooNURBS/./Shaders/disp_textured.autogen.rrasm
;= Source file C:\Users\Davide\dev\repos\RibTools\_distrib/TestScenes/KillerooNURBS/./Shaders/disp_textured.sl
;= Creation date 2020/05/19 - 19:37:45
;= File automatically generated by RSLCompilerCmd 0.4a
;=========================================================
.data
P global varying point
N global varying normal
u global varying float
v global varying float
_@K23 temporary constant float 0.000000
_@K24 temporary constant float 2.000000
_@K26 temporary constant float 1.000000
_@K27 temporary constant string ""
_@K28 temporary constant string "shader"
Km parameter uniform float
min_u parameter uniform float
max_u parameter uniform float
min_v parameter uniform float
max_v parameter uniform float
mapname parameter uniform string
.code
;====================================
displacement ;== disp_textured
;==== Begin Def Params
__defparam_Km:
mov.ss Km _@K26
ret
__defparam_min_u:
mov.ss min_u _@K23
ret
__defparam_max_u:
mov.ss max_u _@K26
ret
__defparam_min_v:
mov.ss min_v _@K23
ret
__defparam_max_v:
mov.ss max_v _@K26
ret
__defparam_mapname:
mov.xx mapname _@K27
ret
;==== End Def Params
__main:
setne.bxx $bu9 mapname _@K27
mov.bb $bu8 $bu9
iftrue.b $bu8
mov.xx $xu10 mapname
sub.sss $s12 u min_u
sub.sss $su13 max_u min_u
div.sss $s14 $s12 $su13
mov.ss $s11 $s14
sub.sss $s16 v min_v
sub.sss $su17 max_v min_v
div.sss $s18 $s16 $su17
mov.ss $s15 $s18
texture.sxss $s19 $xu10 $s11 $s15
mov.ss $s20 $s19
mov.ss $s7 $s20
mul.sss $s21 $s7 _@K24
sub.sss $s22 $s21 _@K26
mul.sss $s23 $s22 Km
mov.ss $s6 $s23
orelse
mov.ss $s6 _@K23
funcopend
mov.vv $v25 N
normalize $v26 $v25
mov.vv $v27 $v26
mov.vv $v24 $v27
mul.vvs $v28 $v24 $s6
mov.xx $xu30 _@K28
mov.vv $v31 $v24
nxformname.vxv $v32 $xu30 $v31
mov.vv $v33 $v32
mov.vv $v29 $v33
length.sv $s34 $v29
mov.ss $s35 $s34
div.vvs $v36 $v28 $s35
add.vvv $v37 P $v36
mov.vv P $v37
mov.vv $v38 P
calculatenormal $v39 $v38
mov.vv $v40 $v39
mov.vv N $v40
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment