opengl es 2.0 - Are point sprites always perfect circles/squares? -


i noticed regardless of shape (aspect ratio) of texture, draw perfect square, scaling unequally, when using point sprite. assume because points are, after all, circular.

if wish use point sprites on rectangular textures, possible using point sprite mechanism, or need build quads textures instead?

or perhaps there can added shader recognize , work rectangular texture? mine quite simple:

vertex shader:

texturecoordout = texturecoordinate; gl_pointsize = 15.0; 

fragment:

  gl_fragcolor = texture2d(sampler, issprite? gl_pointcoord: texturecoordout) * destinationcolor; 

points have 1 size, equally applied width , height..


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -