Gigantic Work.
I want help a little with optimization…
But why only I, We all can ^^,
Find what lagging the most, separate it from engine - and create thread here
we all try hard to find solution how improve it
(“separate it from engine” - I think full engine source code not ready be revealed for public)
P.s optimization - Except external libraries like Jbullet and Java3D
PP.S Sorry I Over excited about all this
(because my Pc can’t run fallout 4 and you run it on Adroid XD)
this optimization on practice can be no so easy as it looks for me now.
At least we can try)
up:
Do you use this?
ElderScrollsExplorer/shaders/land.frag
It scares me)
void main()
{
vec3 ct,cf;
vec4 texel;
// float intensity;
// intensity = max(dot(lightDir,normalize(normal)),0.0);
// cf = intensity * (gl_FrontMaterial.diffuse).rgb +
// gl_FrontMaterial.ambient.rgb;
cf = (gl_FrontMaterial.diffuse.rgb +
gl_FrontMaterial.ambient.rgb)/2.0;
texel = texture2D(tex,gl_TexCoord[0].st);
ct = texel.rgb;
//alpha is material only
gl_FragColor = vec4(ct * cf, gl_Color.a);
}
as i understand diffuse and ambient can be pre mixed together with texture and save to file
no need do it in shader directly
- if it used really for all lands this shader can easily split FPS for half or even more
even if ambient dynamically changed in game
- it can be baked on every change in real time to texture and use that texture without mixin in shader directly
[icode]gl_FragColor = vec4(ct * cf, gl_Color.a)[/icode]
external gl_Color.a Why? for debug? i don’t remeber game mechanics with custom walls transperancy