Rendering pixels to a big 2Dtexture using drawInstance() with pointlist, and one vertex in the vertex buffer that will define the location of the pixel rendering to in the vertex shader.
I have problems defining the position of the pixel in the vertex shader,
having (x,y,z,w) for the POSITION that returns the vertex shader and defines the pixel rendered, is there any way i can make x and y be directly the number of the pixel, making (x,y)-(0.0f,0.0f) the top left corner of the texture and (width-1.0f,height-1.0f) the buttom right?
Its because using (-1,1) top left (1,-1)buttom right, I will have to make the conversion and when the texture is big i have to divide big numbers and i think i am having some float errors there.
rendering pixels to a big 2Dtexture
1 reply to this topic