POV-Ray : Newsgroups : povray.off-topic : Viewing frustum question : Re: Viewing frustum question Server Time
4 Sep 2024 17:18:15 EDT (-0400)
  Re: Viewing frustum question  
From: Darren New
Date: 16 Feb 2010 00:55:19
Message: <4b7a3347$1@news.povray.org>
Fredrik Eriksson wrote:
> Typically, the perspective transform is defined such that the resulting 
> z-coordinates fall in a suitable range (e.g. [0,1]). Clipping can then 
> be performed without knowledge about the original clipping planes.

Just peeking at some of the HLSL values that get passed around and some of 
the graphics card assembler instructions, it looks like this is quite 
likely. For example, there's a "free" modifier you can use to shift a result 
from [-1...1] to [0...1] on the graphics card without taking any more 
instruction cycles. Textures seem to get 0...1 while visible X,Y coordinates 
seem to go -1...1.  I'm not sure which range the Z coordinates fall into, 
but it certainly seems reasonable to believe that if the X and Y are scaled 
in such a way, the Z likely will be also.

-- 
Darren New, San Diego CA, USA (PST)
   Forget "focus follows mouse." When do
   I get "focus follows gaze"?


Post a reply to this message

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