Google Groups Home
Help | Sign in
Message from discussion Mini ray tracer
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
tbp  
View profile
 More options 11 May 2005, 16:13
Newsgroups: comp.graphics.rendering.raytracing
From: "tbp" <tbp...@gmail.com>
Date: 11 May 2005 08:13:02 -0700
Local: Wed 11 May 2005 16:13
Subject: Re: Mini ray tracer
Jon Harrop wrote:
> > So what? The fact is that implementation quality matters just as
much.

> No, it doesn't. If you can reduce your algorithm from O(n) to O(log
n) then
> you should do so before you rewrite it in assembler.

As we're obviously both right, and in fine it's a matter of tradeoffs,
it would pointless to argue further more.

> > A program has to run on a given machine at some point.

> True. I'm not saying that it is not worthwhile to optimise a ray
tracer with
> SIMD, just that it would be premature to do so on my ray tracer right

now.
I beg to differ. You can't simply plug in some SIMD scheme on top of
that as an afterthought, because it's tightly coupled with the way you
represent things.
That's one of the common pitfall of OO abstraction.
Wald discuss that point a bit in his thesis and i couldn't agree more.
But i know it's a not a very popular opinion atm.

> I would be very interested to see a highly optimised version of my
ray
> tracer. I think a lot of people could learn from a set of web pages
which
> show how to optimise the programs. If you're willing to help and I
can find
> the time then I'd like to do this sometime.

There's certainly lots of angles to attack that problem
(algorithmically or not), but i doubt any of them could fit within 100
LOC.
Beside C++ idiomatic issues, a better memory layout could certainly
help.
That's, perhaps, the lowest hanging fruit (that or 'cheating' with
lower numerical precision, ie for square roots).

Anyway as i've already invested some time in a c++ version, i'm open to
suggestions :)

> I wouldn't call this kind of stuff C++:

>   a = _mm_load_ps(inp_sse1);
>   b = _mm_load_ps(inp_sse2);
>   c = _mm_add_ps(a, b);
>   _mm_store_ps(out_sse, c);

But that's legit C++.
C++ is C on steroids while C itself is just a gloried assembler.
No matter how much OO or syntactic sugar you pour onto it.
I kinda apreciate to be able to code to-the-metal.
To each, its own.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google