I've worked with shaders before in a similar way with XNA so some of the concepts were familiar to me. The new part for me was getting a basic post-processing bloom shader to work. I got it now but apparently there are some techniques I have to research before I use it efficiently. But about the one thing that opengl offers that Java2D is without is additive blending which is extremely useful for a lot of great effects, of course you can create your own custom composite in Java for doing additive blending though performance might be an issue there.
But some of the things I learned in getting this to work are as follows,
- One you need to setIdentity before filling in the transforms
- You can use the Matrix.translateM, Matrix.rotateM, and Matrix.scaleM in sequence
- If you want to translate for example from the last position in the matrix you need to multiply the matrix by the new translation matrix (problems with order of operations)
- A problem I am still having is that of textures still appearing mirror or flipped and other such non-sense due to orientation issues.
- Oh and you have to manage your own matrix stack, if you want to change coordinate systems to use local coordinates for a particular object.
I'll post examples and more details after the holidays.
Aside from that just getting ready for Turkey Day. Hope everyone has a good and thankful Thanksgiving!
No comments:
Post a Comment