Decided to try Unity, but embarrassed quality engine optimization, maybe I do something wrong…
I am created plane and 30 columns on here. All objects have ReceiveShadows:off.
I have Directional light source, static. For all objects I use shaders:Mobile/diffuse.
I am test on computer: CPU G1840, 2.8 Ghz, Intel HD Graphics.
I am check FPS:
Columns is static,drawed in lightmaps, light source backed, FPS: 100
Columns is dynamic,no shadows, light source mixed, FPS: 60
Columns is dynamic,cast shadows, light source mixed, FPS: 30
Questions happened:
Why beetween 1 and 2 FPS different?
Why beetween 2 and 3 FPS so different, it must be little differ because columns and light source not moved,
so shadows must be calculated (shadows textures and other) and on every frame engine need just draw 30 pair triangles
to show dynamic shadows.
No lighting info is calculated during run-time hence less performance cost.
Light info need to calculate every frames during run-time hence increase performance cost.
Light & shadow info need to calculate every frames during run-time hence more performance cost.
Light & shadow are pixel function which calculated on each pixel on the mesh.
Imagine there’s an empty texture for the lighting information to be display.
And the real-time lighting will keep updating that “texture” on every frame.
If the “texture” resolution is 1024 x 1024.
Then the CPU will calculate 1048576 pixels lighting each frames.
CPU cost hence reduce FPS.