I tried with quads and apparently they'd solve the texture-mapping but
halves the fps. I also lose the ability to use round points.
If you're texturing the points, you can just "draw" roundness!
With the method you suggested I get only whole texture mapped to each
point (is this the bug you mentioned? I AM using Radeon 2600 hd but
unable to try it elsewhere currently)
No. In the bug I have seen, the effect is for the texture coordinates
to not change at all, e.g. if you have a blue-and-red billboard, you
might only get a big blue square as one texture coordinate is used for
the entire sprite.
Using the ENTIRE texture for the sprite (e.g. tex coords go from 0 to 1)
is CORRECT - that's what the spec says. If you don't like that you have
to write a pixel shader to rescale the coordinates; the pixel shader
runs after the sprite coordinate generation.
cheers
Ben
Thanks.
-Mike
Ben Supnik kirjoitti 30.5.2008 kello 19:05:
Hi y'all,
- I'm surprised to hear so many people say "do quads"...that would
increase bus traffic by 4x...
- One advantage of quads which makes us use them in places (we use
sprites in others) is that a lot of cards have a max point size of
64x64, so if the billboards have to be big when close, sprites aren't
viable.
- With GLSL 1.2 there's a new way to get sprite teture coords; the old
way is to enable sprite coord replace mode, e.g.
- I believe that if you want to use part of the texture, you need to
write a pixel shader, because there's no fixed function texture
atlasing for sprites.
- There is/was a bug with point sprites on the iMac with Radeon HD
Hardware (I filed r5483766) where the sprite coords don't modulate.
Can't say more, this list isn't under NDA, but if you write what you
think is the right code and it doesn't work, regression on another
computer might help!