Members - Reputation: 490
Posted 11 March 2012 - 04:09 PM
The texture is 11x1
The pixel shader will read the 1st pixel and output to it(it can read whatever it wants, the important thing is the output position), then it will jump and read the 3rd pixel(or whatever) and output to it, then it will read the 5ft pixel and output to it,........ until it finishes. I have though on changing the viewport.......propositions plz.
Members - Reputation: 376
Posted 13 March 2012 - 04:01 AM
If you can combine many of your calculations into 512x512 pixels, you can render a quad over the screen and do parallel calculations from one texture to another and then swap pointers to the 2 textures.
My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz
"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."
Moderators - Reputation: 48904
Posted 13 March 2012 - 04:10 AM
If you want to skip every second pixel, you can either:
* draw a triangle that covers the whole render-target and use SV_Position in the pixel shader to find out which pixel is being executed, and use clip to abort processing of any 'even' pixels.
* draw a list of points that cover exactly the pixels that you want to process.
Also you can't process the 1st pixel, then 2nd pixel, then the 3rd pixel, etc... The GPU launches the processing of all rasterised pixels in parallel, and the order that they're processed is undefined.