Jump to content

  • Log In with Google      Sign In   
  • Create Account


rendering pixels to a big 2Dtexture


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 lomateron   Members   -  Reputation: 302

Like
0Likes
Like

Posted 19 October 2012 - 07:00 PM

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.

Sponsor:

#2 Ripiz   Members   -  Reputation: 529

Like
0Likes
Like

Posted 20 October 2012 - 02:02 AM

You need to create orthographic matrix. Google will help to create it if your algebra library doesn't support it.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS