Yeah there are quite a few commands that feel that unfinished.
And the support has decreased a lot, but rumors are that TGC will make AppGameKit some kind of Open Source.
There are commands to load shaders from strings now
LoadShaderFromString so we can generate em or add define values to activate different parts of code for example. So we could create ubershaders that does it all.
There is the command
SetCameraBounds to create a off center projection and you set the near and far clipping plane with
SetCameraRange verry usefull to only render into parts of an image.
I tried to render
point light shadows using equirectangular maps too, but only ever made it for cubemaps really.
I also always try to be compatible with AGK's generated shadercode so the comunity can still use the build in commands on the objects so have it easier to get started.
If you get it working properly make sure to also render a stack of the shadow maps below each other in one image so we have several point lights and don't use up all texture stages as we need them for other stuff
Doing this for cubemaps is kinda ugly if you try to stack them as you want to save space so you pack em in an F formation and every second image you have to mirror the formation ect.
If you also want to support mobile we have to encode the Depth map into an RGBA image and decode it in the shadow shader later again:
highp vec4 EncodeFloatRGBA(highp float value)
{
vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * value;
enc = fract(enc);
enc -= enc.yzww * (1.0/255.0);
return enc;
}
float DecodeFloatRGBA(highp vec4 rgba)
{
return dot(rgba, vec4(1.0, 1.0/255.0, 1.0/65025.0, 1.0/16581375.0));
}
Also i noticed you still use Dim and undim but we can do this now:
global Vector4Integer as Vec4Integer[32]
Vector4Integer.length=-1
And did you find the
ref keyword for calling by ref in functions ? only for custom types tho
How come you're looking into AppGameKit ?