Sign in to follow this  

HLSL indexed point list workaround

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

Is it possible to implement indexed point primitives in an hlsl pixel shader? Maybe something like using clip and sending the index data with texture memory? I'm kinda new to hlsl, so any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
You'd have to better explain what you're after.

My understanding of your question is that you want to select the pixel locations to draw during the pixel shader phase. This is impossible, since the pixel shader is always run for the pixels which result from previous phases.

However, depending on the effect you want (instead of a particular method of achieving it), you may be able to use texture access in the vertex shader, render to vertex buffer, or other techniques. A better explanation of what you want will help us help you.

Share this post


Link to post
Share on other sites
I would like to be able to throw away vertices in point lists.

I believe the vertex shader can't do that, but the pixel shader can clip fragments. I think point lists have a 1:1 vertex to fragment conversion if the point size is 1.0. So throwing it away in the pixel shader stage would effectively discard the vertex.

It should behave like an indexed point list where the indices cover a subset of the entire vertex buffer.

Is there a method to do this that would be about as a fast as using an index buffer? So basically being able to throw away vretices as early as possible would be best.

Thanks for your help.

Share this post


Link to post
Share on other sites

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