Re: clipping planes bypassed in CG vertex shaders

"Stephen J Baker" <[email protected]>
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
Rhadamés Carmona wrote:

> I tested the plane [1,0,0,0] and it clips in the middle (non vertex shader 
> version), but still it does not work in CG vertex shader. I think user 
> clipping planes are removed in programmable pipeline.

Might this only be on particular hardware?

Some of the older nVidia chips use a 1D alpha texture to implement user
clip planes without custom clipping hardware.  I could easily believe that
this would be hard for them to implement correctly with the standard pipeline
being subsumed by shaders.  Newer nVidia chips do user-clipping in hardware
and ought not to have this problem.

However, it makes no sense for the OpenGL specification to remove this
ability.  Clipping happens after the vertex shader - and there is no
way to implement user clip planes using the shader itself because the
shader only sees one vertex at a time.  User clip planes are a
widely-used feature that would be exceedingly painful to do at the
application level and impossible to implement efficiently in shader-land.

-----------------------------------------------------------------------
The second law of Frisbee throwing states: "Never precede any maneuver
by a comment more predictive than "Watch this!"...it turns out that
this also applies to writing Fragment Shaders.
-----------------------------------------------------------------------
Steve Baker                      (817)619-2657 (Vox/Vox-Mail)
L3Com/Link Simulation & Training (817)619-2466 (Fax)
Work: [email protected]           http://www.link.com
Home: [email protected]       http://www.sjbaker.org

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

-- 
Author: Stephen J Baker
  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.