• Advertisement
Sign in to follow this  

rendering pixels to a big 2Dtexture

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

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.

Share this post


Link to post
Share on other sites
Advertisement
You need to create orthographic matrix. Google will help to create it if your algebra library doesn't support it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement