(L) [2006/04/14] [filami] [MSC++ and SSE] Wayback!Hello ppl. Im new to these forum. I like raytracing and I have tried to do some stuff in RTRT. I just though that some spheres and planes are ok for now but you guys render complete scenes in raytracing!! Thats amazing!!!
I am a game programmer, professional, working in my own coutry, Portugal. I have a lots of interest in raytracing, it's just the way to go for future games.
Now my little question [SMILEY Smile]
Ok, before tring to go through render some triangles, I need to implement a fast vector class. I like structured code very much and for me things must be done in little functions and the code syntax have to be very readable. Unfortenatly it seems that style of coding creates ineficient code. Besides, I do not know SSE very much.
I have just tried a little class here.
This is the normal Vector class with a bit of optimization:
(L) [2006/04/14] [tbp] [MSC++ and SSE] Wayback!Welcome.
There's not much to be gained from the use of such a vector class. SSE operation have a good throughoutput but a large latency, so in practice they only bring improvment when used to conduct 4 ops in // in rather long branchless sequences.
Your SSE vector class only have 3 components so you're throwing away 1/4 of the computationnal power right from the start...
Now from a coding style POV, you should try to make the compiler job easier.
(L) [2006/04/14] [filami] [MSC++ and SSE] Wayback!Thanks for the replay. I was afraid of that latency thing. I was expeting that the compiler was smart enought to avoid unecessary copys.
Btw, can you point out places where to learn this stuff? I mean really learn and no only "you can do that and that and thats fun". Something more than that. I have found the documentation in MSDN and SSE intrinsicks seems to not be that hard I guess.
_________________
Person* filami = World::GetPerson("Filami");
while(filami->DoingNothing())
filami->CodeStupidThings();
throw ActionException("The entity Person(\"Filami\") does not support normal actions.");