How to control in the vertex shader where pixel ends up in the renderTarget?

Posted by cubrman on Game Development See other posts from Game Development or by cubrman
Published on 2013-07-28T12:31:00Z Indexed on 2013/08/02 16:08 UTC
Read the original article Hit count: 410

Filed under:
|
|
|
|

What if I have an arbitrary renderTarget, that is smaller than the screen (say it is 1x1 pixel) and I want to make sure in the VertexShaderFunction that all my pixels end up exactly in that 1 pixel region? No matter what I do, they all seem to get culled at some point, though GraphicDevise.Clear() works OK.

Where is the top left corner of the renderTarget Vertex-shader-vise? I tried output.Position = (0,0,0,0)/(0,0,0,1)/(1,1,1,1)/(-0.5,0.5,0,1) NOTHING works!

Fullscreen quad is not an option 'cause I actually need to process geometry in the shaders to get the results I need.

© Game Development or respective owner

Related posts about c#

Related posts about xna-4.0