Sign in to follow this  

Vertex program and clipplanes

This topic is 4686 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It seems like ClipPlanes doesnt work together with vertex programs on Nvidia cards while it works perfectly on ATI cards. Does anyone know what the spec says? (yes im lazy i suppose). With clipplanes, without clipplanes.

Share this post


Link to post
Share on other sites
I havent a clue whats going on, but id like to say your water works great, how are you perturbing your texture coordinates? (assuming your doing reflection the way i think you are)

thanks
-Dan

Share this post


Link to post
Share on other sites
@Ademan555:
It seems his mirrored objects are not getting clipped to the water-plane when rendering to the texture.

It seems suspiciously like a driver bug to me. If it works perfectly on ATI cards but not on the Nvidia ones I'd imagine it was a problem with your current Nvidia drivers... I don't suppose you've downloaded the latest Nvidia drivers?

Share this post


Link to post
Share on other sites
Yes, it actually is somewhat of a driver bug, but actually on the ATI side. Clip planes are to be disabled in vertex program mode. Here is what the specs say:

Quote:

(20) How should user-defined clipping be supported in this specification?

RESOLVED: User-defined clipping is not supported in standard vertex
program mode. User-defined clipping support will be provided for
programs that use the "position invariant" option, where all vertex
transformation operations are performed by the fixed-function pipeline.


This of course, is stupid. It was included on the pressure of nvidia, who had a very hard time including object space user clipping into their GPUs (they always used a kind of "fake" clipping). ATI, otoh, had no such problems, since they use real geometric clipping. IMO, geometric user clip planes should be made mandatory by the standard, and the whole GL clipping functionality revised.

So, ATI's behaviour in vertex program mode, while being completely logical, is in fact non-conform to the specs. If you want vendor independent clip planes, then you have to to it manually.

Share this post


Link to post
Share on other sites
Thanks Yann L although it wasnt the answear I was hoping for.

Ademan: I render the reflected image into a texture. Render a few sinewaves into a texture. Then perturbes the reflection texture with the sinewave texture using a fragment program (calculating the correct "plane" reflection per vertex)

Share this post


Link to post
Share on other sites

This topic is 4686 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this