user defined clip plane

This topic contains 4 replies, has 3 voices, and was last updated by  wrabbit 5 years, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #30707

    wrabbit
    Member

    hi all..

    Apologies if this is a FAQ, but i would like to know the fastest way to implement a user-defined clip plane for the PowerVR SGX. The Water demo (https://www.imgtec.com/powervr/insider/docs/POWERVR.Shader%20Based%20Water%20Effects.1.11f.OGLES2External.pdf section 3.1) uses a technique which appears to be the same as one documented by Eric Lengyel (http://www.terathon.com/lengyel/Lengyel-Oblique.pdf), but the OpenGL ES 2 spec recommends:

    User clip planes can be emulated by calculating the dot product of the user clip plane with the vertex position in eye space in the vertex shader

    The second method seems simpler, and more likely to be portable. Is the Water demo mechanism significantly faster? I’ll be digging into this shortly, but just wondered if anyone had experience with this.

    thanks!

    #35302

    wrabbit
    Member

    thank you.. I’m sure that would be very helpful to someone living in Sacramento :>). 

    #35303

    I’m not so sure that it would have been to be honest, but I’ve deleted the spam 🙂

    #35304

    Joe Davis
    Member

    Hi wrabbit,

    The Water demo is implemented in that way because it only requires a single matrix calculation that can be applied to all objects in the render pass. Doing a per-vertex calculation would increase the number of cycles each vertex shader would take to execute, and it would also mean you would have to update each and every vertex shader in your application with this change.

    Both techniques are equally portable.

    #35305

    wrabbit
    Member
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.