Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Killtex in HLSL?

This topic is 5295 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

Hi, I know that the HLSL equavalent is clip() , However I have no idea on how to use this and I cannot seem to find any references to this anywhere. I would realy appreciate if anyone can help me on this. I''m trying to render out two views (for reflections and refractions) for a water shader and the geometries below and above the water needs to be cliped. I know that I some how need to pass in a plane equation to this but how? Realy would appreciate if anyone can prove a little sample code i.e. the vertex shader output that is required and the PS shader syntax. Thanks!

Share this post

Link to post
Share on other sites
struct VS_OUTPUT
float3 Clip : TEXCOORDn;



Out.Clip.x = 1.0f;
Out.Clip.y = TerrainHeight;
Out.Clip.z = 1.0f;


return Out;

float4 PSMain( VS_OUTPUT In ) : COLOR0
clip( In.Clip );


Hope this helps.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!