PDA

View Full Version : glClipPlane and vertex/frag shaders



alark
08-11-2003, 08:16 AM
Hi,
I found that automatic texture generation has to be re-implemented in the vertex shader even if you have it in the opengl program. Please could you tell me if similar problems would be faced if I try to use glClipPlane().
thanks,
alark

mako
08-11-2003, 09:25 AM
Yes, you can't use glClipPlane and vertex programs together. I used the cull_fragment texture shader on my Geforce4 for clipping planes. But this is a NVidia extension. There must be something similar in ARB_fragment_program, but I do not have this extension http://www.opengl.org/discussion_boards/ubb/frown.gif

[This message has been edited by mako (edited 08-11-2003).]

jra101
08-11-2003, 09:52 AM
If you use the ARB_vertex_program extension with the ARB_position_invariant option, user clip planes should work fine. See issue 20 of the ARB_vertex_program spec for more details.

cass
08-11-2003, 11:08 AM
For what it's worth, there's a example at
http://www.r3.nu/~cass/oblique_frustum/

that shows how to use the near (or far) clip plane in the place of a user clip plane. The technique has limitations, but for some types of rendering it is superior to user clip planes.

This demo will be up on the NVIDIA web site soon.

Thanks -
Cass