Point Sprites, PCemulation

This topic contains 2 replies, has 2 voices, and was last updated by  Adventus 8 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #29630



    When i render with point sprites the Texture Coordinates appear to be flipped on the y-axis and the Position Coordinates remain unchanged. According to the GLES2 spec “The point sprite coordinate origin is UPPER LEFT and cannot be changed.”…. is this implying that both coordinates should be flipped? 


    PS: I’m using the PowerVR SDK PCemulation library on an Nvidia M8600GT.



    Window and clip space (i.e. gl_Position) always have the X and Y axes point right and up, respectively, independent of the primitive type. However, gl_PointCoord has its origin in the upper left corner of the point sprite, with Y pointing down:

    the gl_PointCoord fragment shader input defines a per-fragment coordinate space (s; t) where s varies from 0 to 1 across the point horizontally left-to-right, and t ranges from 0 to 1 across the point vertically top-to-bottom.

    Xmas2008-11-10 10:00:35



    That makes sense. Thanks. I was confused because the OpenGL ES 2 .0 Programming Guide has a picture with the gl_PointCoord as normal…. but in the text describing the image says something very similar to that quote.

    I guess I’ll just flip the PointCoord in the fragment shader.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.