![]() ![]() (In desktop OpenGL gl_PointSize only has a meaning, if GL_PROGRAM_POINT_SIZE is enabled). In compare to "desktop" OpenGL, in program point size has not to be enabled. ![]() The fragment whos center point is in this square is affected. This means, if you define gl_PointSize = 1.0, then this specifies a square with a side lenght of 1 fragment. Point rasterization produces a fragment for each framebuffer pixel whose center lies inside a square centered at the point’s ( xw, yw ), with side length equal to the point size. Point size is taken from the shader builtin glPointSize and clamped to the implementation-dependent point size range. The maximum point size supported must be at least one. The range is determined by the ALIASED_POINT_SIZE_RANGE and may be queried as described in chapter 6. If the value written to gl_PointSize is less than or equal to zero, results are undefined. Implementation-dependent point size range. Point size is taken from the shader builtin gl_PointSize and clamped to the See OpenGL ES Specification - Khronos OpenGL ES Registry, 3.3 Points, page 51: glBegin (GLPOINTS) glPointSize (0.2) glVertex3f (-5,0,0) glPointSize (2.0) glVertex3f (-5,4,0) glPointSize (26.8) glVertex3f (-5,8,0) glPointSize (48) glVertex3f (-5,-4,0) glPointSize (4) glVertex3f (-5,-8,0) glPointSize (0.6) glVertex3f (-5,14,0) glEnd () This code draws points each with the same size. The variable gl_PointSize is intended for a vertex shader to write the size of the point to be rasterized. What does setting gl_PointSize = 1.0 in vertex shader means or achieve? Does that mean the vertex itself is a pixel? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |