Re: clipping planes bypassed in CG vertex shaders

Rhadamés Carmona <[email protected]>
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
Yeah!...bypassed...

Clipping planes simulated in fragment program, implies some extra 
computation that could be avoided using real clipping planes. Fragments are 
removed (but they were considered in rasterization, generating some 
overhead).

Well, well, we are horrified. LOL.
All d best!
Rhadamés (RIX)




Well, I guess it pays to RTFM.

According to the nVidia vertex_program extension:

"What part of OpenGL do vertex programs specifically bypass?

Vertex programs bypass the following OpenGL functionality:

o Normal transformation and normalization
o Color material
o Per-vertex lighting
o Texture coordinate generation
o The texture matrix
o The normalization of AUTO_NORMAL evaluated normals
o The modelview and projection matrix transforms
o The per-vertex processing in EXT_point_parameters
o The per-vertex processing in NV_fog_distance
o Raster position transformation
===> o Client-defined clip planes"

...and it's right there on the last line.

A further question clarifies the reasoning:

"Should client-defined clip planes operate when vertex program mode is
enabled?

RESOLUTION. No.

OpenGL's client-defined clip planes are specified in eye-space.
Vertex programs generate homogeneous clip space positions.
Unlike the conventional OpenGL vertex transformation mode, vertex
program mode requires no semantic equivalent to eye-space.

Applications that require client-defined clip planes can simulate
OpenGL-style client-defined clip planes by generating texture
coordinates and using alpha testing or other per-fragment tests
such as NV_texture_shader's CULL_FRAGMENT_NV program to discard
fragments. In many ways, these schemes provide a more flexible
mechanism for clipping than client-defined clip planes.

Unfortunately, vertex programs used in conjunction with selection
or feedback will not have a means to support client-defined clip
planes because the per-fragment culling mechanisms described in the
previous paragraph are not available in the selection or feedback
render modes. Oh well.

Finally, as a practical concern, client-defined clip planes
greatly complicate clipping for various hardware rasterization
architectures."

...so the recommendation is to use the texture hack that older nVidia
hardware uses (urgh!).

I'm horrified.

(like subscribing). 

----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

-- 
Author: =?iso-8859-1?Q?Rhadam=E9s_Carmona?=
  INET: [email protected]

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.