Ido-f
Member
So the way I take it from guides so far, the common way to enable a shader to draw outside of a sprite's texture (like drawing an outline for it) is to simply increase the size of that texture and disable auto-cropping in its settings.
I don't like this solution. It feels awkward to me to resize sprites like that, and I heard that it's more efficient to keep texture pages compact. A desired shader effect could be several times the sprite's original size.
Another possible solution is to draw that sprite to a surface large enough and then draw that surface using the shader.
I don't like this solution either because it adds a draw call and requires creating and handling a surface.
It seems to me to have something to do with the vertex shader and the gl_Position value, but I don't understand the process well enough to know if it's even possible.
Does anyone know a good way to do this?
I don't like this solution. It feels awkward to me to resize sprites like that, and I heard that it's more efficient to keep texture pages compact. A desired shader effect could be several times the sprite's original size.
Another possible solution is to draw that sprite to a surface large enough and then draw that surface using the shader.
I don't like this solution either because it adds a draw call and requires creating and handling a surface.
It seems to me to have something to do with the vertex shader and the gl_Position value, but I don't understand the process well enough to know if it's even possible.
Does anyone know a good way to do this?