POV-Ray : Newsgroups : povray.programming : OpenGL porting or support? : Re: OpenGL porting or support? Server Time
29 Jun 2024 10:57:08 EDT (-0400)
  Re: OpenGL porting or support?  
From: Warp
Date: 14 Jul 2005 14:55:24
Message: <42d6b51c@news.povray.org>
David Wallace <dar### [at] earthlinknet> wrote:
> OpenGL determines the mesh object's location in space, then passes that data to 
> the traditional raytracer, which in turn determines the texture, highlights, 
> reflection, etc.

  In order to do that, the raytracer would need to know the exact
intersection point and the normal vector of the triangle. Transferring
this information for each pixel (in fact, many times for each pixel
if antialiasing is being used) from the 3D card to the CPU might not
be the fastest operation possible.

  Besides, that's not the only thing that had to be done. The raytracer
would need to know if there's another surface in front of the mesh in
the current pixel, it will need to perform shadow-ray testing (which
has to include the mesh itself) and if the mesh is semi-transparent
or has a reflective texture, it will have to send more rays (I think
it would not be possible to use the 3D card for these deeper
recursions). Also if the mesh is reflected in another surface it
will need to be raytraced.

  Calculating the intersection between the ray and the mesh isn't the
slowest operation involved. It's very questionable whether a 3D card
would help speeding up the process at all.

  (When a 3D card draws a mesh all by itself, it doesn't have to move
data to the CPU, it will use its own hardware-accelerated texturing
functions and will not have to worry about shadows, reflections and
so on. That's why it's fast that way.)

-- 

                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.