View Full Version : Problem about Vertex Buffer Object.

01-18-2006, 05:45 PM
In first pass, the pixel shader will compute which pixel is valid, and which is not. these pixels value, as the vertex data in next pass, is then output to a vertex buffer. my problem is, I only want to select a very small number of valid pixel. for example, the output of first pass are 10000 pixels. 9000 of them is invalid. and only 40 pixels,whose value are the vertex of pass, is selected.
deleting invalid pixels is easy, I can draw a small viewport, and set the value of invalid point outside of viewport. But how can I select 40 pixels from 1000 valid pixels?

the ideal solution is that, I can set all the valid pixel's coordinate within 4x10 quad. when more than one points have same coordinate, then, GPU only draw one points. But, in fact, it seems GPU will draw all these points.

I have been thinking of it for a while, without coming up with any solution. wish somebody could help me... Thanks a lot.