flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
macgub
Depth independent transparency.
3d rotozoomer. Is this worth to see ? http://macgub.j.pl/win/mariavincitbpt.zip http://macgub.j.pl/win/mariavincitbpt_big.jpg Last edited by macgub on 04 Dec 2020, 05:53; edited 1 time in total |
|||
![]() |
|
comrade
Very beautiful!!
|
|||
![]() |
|
Roman
I try download but google chrome do not open two links.
|
|||
![]() |
|
macgub
@comrade
I am glad you like it ![]() @Roman Maybye try firefox or explorer ? Anyway I attached both files to, perhaps, easier downloading.
|
||||||||||||||||||||
![]() |
|
Roman
macgub thanks. Cool example. Good work.
I look your example and i see sse, but in file 3DMath.inc i see FPU. FPU slow. FPU good if user CPU not supported SSE. Code: cross_product: fninit fld dword [esi+vec_y] fmul dword [edi+vec_z] fld dword [esi+vec_z] fmul dword [edi+vec_y] fsubp ;st1 ,st fstp dword [ebx+vec_x] fld dword [esi+vec_z] fmul dword [edi+vec_x] fld dword [esi+vec_x] fmul dword [edi+vec_z] fsubp ;st1 ,st fstp dword [ebx+vec_y] fld dword [esi+vec_x] fmul dword [edi+vec_y] fld dword [esi+vec_y] fmul dword [edi+vec_x] fsubp ;st1 ,st fstp dword [ebx+vec_z] ret |
|||
![]() |
|
Roman
My SSE cross product.
Code: macro xmcross chR1,chR2,chRt1,chRt2 { movaps chRt1, chR1 movaps chRt2, chR2 shufps chR1, chRt1, 201 shufps chRt2, chR2, 210 shufps chRt1, chRt1, 210 shufps chR2, chR2, 201 mulps chR1, chRt2 mulps chRt1, chR2 subps chR1, chRt1 } In code: xmcross xmm1(=vec3 a),xmm2(=vec3 b),xmm3,xmm4 And we get cross(a,b); Registers xmm3,xmm4 for internal calculation and then not needed. Or all any others xmm registers. |
|||
![]() |
|
macgub
Cross product in this app is not crucial. Its called only at the begining. 4 times, each for one wall of tetrahedron. Curucial are dot product and normalising vector routines:
Code: ;dot product ; in: xmm1 - first vector, xmm2 - second vector ; out: xmm1 - broadcasted dot pr andps xmm1,[mask] mulps xmm1,xmm2 haddps xmm1,xmm1 haddps xmm1,xmm1 ;normalising: ; in: xmm1 - vector, uses xmm2 for internal calculations ; out: xmm1 - normalised vector andps xmm1,[mask] movaps xmm2,xmm1 mulps xmm1,xmm1 haddps xmm1,xmm1 haddps xmm1,xmm1 rsqrtps xmm1,xmm1 mulps xmm1,xmm2 ; data for both cases mask: dd -1, dd -1, dd,-1, dd 0 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.