Alien Blitz, I see shaders everywhere

Model coloring, lighting

Continuing on playing with shaders, first I’ve set the model color according to where it currently is (if the light is green, the model must appear green too)

In 2d version of Alien Blitz only the character sprite is light accordingly as it uses more memory to store and use all precalculated lights. 3d mode being for higher end devices I don’t really care if it uses a bit more memory in this case.


(I’ve only converted two models so far the character sprite and the fire lamp, so everything not lamp is displayed as the character)

I don’t really know how to set a uniform for a specific model yet (I can easily set one for the whole rendering process), so I’ve cheated and used some material properties that I don’t care about (u_emissiveColor), should do the trick for now.

Problem is not now models blend more with the background.


I began working on animations, in a dirty way…


To do this I’ve exported 3 models, and I’m replacing them on the fly… the good thing is that it is easily compatible with the old engine (each frame was a different portion of the texture, which makes sense in 2d), the bad thing is that it is not really the way to do it in 3d. The best way would be to create an animation in blender, or something like that… But I’m not good with blender. Performance-wise this solution could be better.

I think I might have to use a complete animation for the main character (skeleton + animation) as it will be always visible… We will see….


In order for models to be more visible they should be outlined, there seems to be a lot of techniques to do so.

First method I’m trying is to render 2 models, one bigger and black, then the normal


Problem is I was hoping the first model will be rendered black, then the second will overwrite it. But they are both mixed, and this is just basically a small model inside a bigger one.

So I’m now trying to extend LibGdx BaseShader and do what I want to do inside… But so far all I can get is a shader that displays nothing… not really useful…

Comments are closed.