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 agree. It must not be implemented in vertex shader. But, it can be 
> implemented after or before vertex shader.

No - it can't be implemented before the vertex shader because the vertex
shader can move the vertex around.  Since any pre-shader clipper would have
no idea where the vertex would ultimately end up - there is no way it could
possibly clip it correctly.

I have vertex shaders that totally ignore the incoming vertex coordinate
and instead read the coordinate out of texture memory.  There is no possible
way that a pre-shader clipper could figure that out.

It has to go AFTER the vertex shader.  However, it could be implemented
either before or after the fragment shader.  The frag shader can't move
the positions of vertices - so clipping either before or after that stage
would be OK.  (Although you'd hope it would be before frag shader because
it's more efficient there).

> I found in internet that user clipping planes are disable for programmable 
> pipeline. Only frustum clipping planes work after vertex shader...

Where did you see that?

-----------------------------------------------------------------------
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.