Hello everyone.
Right now i'm at reflections (still) ...
I choosed ray tracing instead of cube maps or anyother methods what are 'faking' the reflection.
Now that the choice was made i needed to but my formulas and ways together and i ran into trouble.
My computer can handle it if in somehow my ray function will magically find the right triangle to hit but sadly i have to loop all object's triangles.
Basically it means something like this:
#define screen_res_x 1280
#define screen_res_y 960
#define reflection_depth 6
int triangles = 60000
for( int a = 0; a < screen_res_x * screen_res_y; a++ )
{
for( int b = 0; b < reflection_depth; b++ )
{
for( int c = 0; c < triangles; c++ )
{
if variable triangles would be 60 i would almost get 1 frame per second... this is crazy.
I believe there is a way out there what will make it faster by grouping the object somehow so you dont need to check all possible triangles.