Oh nice! - good point santman!
Thank you for the tutorial janbo! Combined with Van's code it will help to implement it to the shader
I could push the fps on my S3 from 11fps to 12.6fps, sometimes to 13fps. I think it will go even further if we create some sort of texture baking model.
I will attach the current project. I removed the clamp function in order to move to the "extra-space atlas method" that can provide mipmapping.
Right now, I work in "floor_effective.ps" it's basically the same, but with less variables and some sort of not working bool idea to render the static layer only once
I decided to create the shader in AppGameKit code, once we got the speed that we need, so there is no use for dynamic variables in ps files anymore. As long as we stay with the current atlas sizes during development, it will not have a negative impact.
Getting rid of most variables gave me also a boost from 8fps to 11fps,
so lets work in
floor_effective.psfor a while. The next idea is, that
.. for(int p=2;p<maxtiles;p++){...
maxtiles should be replaced with the real amout of images that are used and not every possible image in the atlas. This will also give a huge boost, if we only want to use 8 textures instead of 16
I also work on the problem with the missing textures 4 8 and 12 (16 Wont be used at all, because we only have 15 splat textures):
Also texture "15" is wrong. It should be brown but uses texture 12 to map... :S
The problem is, that the first texture is used as a base and the second texture is actually the first splat texture in the atlas. It kinda blows my method right now, but I really want to have "texel[i=3]" - alpha value as an own layer, like in the shopped digit image above, because right now we miss about 25% of the possible alpha atlas images
BTW:
I saw some PBR shaders here for AGK.. do you think we can combine terrain and PBR in order to create something like this?:
As I see, there are plenty of free Terrain PBR textures