Clipping Vertices in a shader programm

hi,



i'm new in using pixel and vertexshader. now i want render realistic water (  shader are sooo nice ! !!  http://www.timtomtam.de/~rockon/waterfreflextions3.jpg http://www.timtomtam.de/~rockon/waterfreflextions2.jpg ) and need to clip vertices of my scene under the water surface (vertex.y<0) but have no idea how to do this in a vertexshader. anyone an idea ?



thank you



peter



did anyone have a tip for a good glsl book ?

book:

OpenGL Shading Language, Second Edition

Randi J. Rost

Addison Wesley Professional

0-321-33489-2

Take a look at ClipState, this should meet your needs.

mojomonk said:

Take a look at ClipState, this should meet your needs.


yes i do so.. but clipstate dont works in combination with shader (on my 6600gt)
)=

Are you sure you have the clipstate set correctly? It works for me on a 6800GS for a water shader.