Hi, I have some old assembly code that I'm trying to convert back into HLSL
SubProgram "d3d9 " {
Bind "vertex" Vertex
Bind "color" Color
Matrix 0 [glstate_matrix_mvp]
Vector 4 [_Color]
"vs_2_0
def c5, 1.00000000, 0.50000000, 1.50000000, 0.00000000
dcl_position0 v0
dcl_color0 v1
add r0.x, -v1.w, c5
mul r0, r0.x, c4
min r1.x, r0, r0.z
mul r1.x, r1, c5.y
add r2.x, -r1, c5.z
add r0, r0, v1
slt r1.x, r2, r0
max r1.x, -r1, r1
slt r2.y, c5.w, r1.x
rcp r1.x, r0.x
mul r2.z, r2.x, r1.x
add r1.y, -r2, c5.x
mul r1, r0, r1.y
mul r0, r0, r2.z
mad r0, r2.y, r0, r1
slt r1.x, r2, r0.y
max r1.x, -r1, r1
slt r2.y, c5.w, r1.x
rcp r1.x, r0.y
mul r2.z, r2.x, r1.x
add r1.y, -r2, c5.x
mul r1, r0, r1.y
mul r0, r0, r2.z
mad r0, r2.y, r0, r1
slt r1.x, r2, r0.z
max r1.x, -r1, r1
slt r2.y, c5.w, r1.x
rcp r1.x, r0.z
mul r2.x, r2, r1
add r1.y, -r2, c5.x
mul r1, r0, r1.y
mul r0, r0, r2.x
mad r0, r2.y, r0, r1
mul oD0, r0, c5.y
dp4 oPos.w, v0, c3
dp4 oPos.z, v0, c2
dp4 oPos.y, v0, c1
dp4 oPos.x, v0, c0
"
}
Any idea what this translates to?