Imagination PowerVR SDK Blog

user defined clip plane


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 ( section 3.1) uses a technique which appears to be the same as one documented by Eric Lengyel (, 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.



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


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


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.


Thanks Joe… this was also helpful.