OpenGL ES Texturing issues
Posted 02 June 2012 - 09:31 AM
The client has created a whole load of sprite sheets, but when I render them scaled, I get texture overruns.
For example if the sprite is 100 by 100 pixels and I am displaying it 200 by 200, then the texture stage is picking up pixels from the source bitmap from -0.5 pixels to 100.5 pixels and averaging them onto the display.
So in several places I am getting little bits of other frames displayed.
Has anyone else come across this problem?
Also has anyone found an OpenGL setting to correct this?
Cheers guys, have to have this game finished by Monday and I am fast reaching the stage that I hate the game so much I'm tempted to just tell the client to redraw all the graphics.
Not very professional, but I've churned this one out in 2 weeks and I'm very tired.
Posted 02 June 2012 - 09:49 AM
Posted 02 June 2012 - 10:13 AM
Another potential cause of this issue is the rasterization rules, and the primitive type you're rendering with. Typically, the hardware will not rasterize the right-most and bottom-most pixel in your primitive. If, for example, you used additive blending and the hardware DID rasterize the right-most and bottom-most pixels then when you rendered a triangle strip the triangle edges would get double-rasterized and with additive blending, they'd be added twice.
Fortunately most APIs have state(s) which control this behavior. For individual sprites, you might need to turn this on - allowing your bottom-right texture coordinate to be moved one pixel to the left and up, thus causing the hardware to (hopefully!) not sample outside your sprite bounds when linearly interpolating.
I hope this helps in some way, or at least explains to some degree the issues you're seeing.
Posted 02 June 2012 - 06:02 PM
Posted 03 June 2012 - 09:35 AM
Sadly, I don't have that extension.
I will have a look, it may work.
At the moment I am running GL_NEAREST as I have today to finish it ( and still have to put in DRM ) but I have warned the client he may have to redo the graphics.
Posted 03 June 2012 - 10:06 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users