Original Post
Hello,
I'm trying to learn HLSL assembly, using MSDN as a guide and a book or two. Most swizzle examples given are kind of simple and I saw some code that looked like this and wondered what the equivalent statements were.
[source]mova a0.w, r4.x
mul r4.yzw, v0.y, c0[a0.w].xxyz
[/source]
is the equivalent expression
[source]a0.w = r4.x
r4.y = v0.y * c0[a0.w].x
r4.z = v0.y * c0[a0.w].x
r4.w = v0.y * c0[a0.w].y[/source]
or this?
[source]a0.w = r4.x
r4.y = v0.y * c0[a0.w].x
r4.z = v0.y * c0[a0.w].x
r4.w = v0.y * c0[a0.w].y
r4.w = v0.y * c0[a0.w].z[/source]
Thanks!
I'm trying to learn HLSL assembly, using MSDN as a guide and a book or two. Most swizzle examples given are kind of simple and I saw some code that looked like this and wondered what the equivalent statements were.
[source]mova a0.w, r4.x
mul r4.yzw, v0.y, c0[a0.w].xxyz
[/source]
is the equivalent expression
[source]a0.w = r4.x
r4.y = v0.y * c0[a0.w].x
r4.z = v0.y * c0[a0.w].x
r4.w = v0.y * c0[a0.w].y[/source]
or this?
[source]a0.w = r4.x
r4.y = v0.y * c0[a0.w].x
r4.z = v0.y * c0[a0.w].x
r4.w = v0.y * c0[a0.w].y
r4.w = v0.y * c0[a0.w].z[/source]
Thanks!