marciano wrote:
Hello Alexander,
thanks for offering your help with optimization.
shaderdev wrote:
However it seems that you have lots of performance problems with horde. One would guess that a project that claims to be a next generation graphics engine with focus on crowd rendering would be very fast and lightweight. But it doesn't seem to be the case.
I think saying it like this is a bit exaggerated, I don't think that we have a performance problem.
Yeah, in most cases that I've seen, the bottleneck of Horde applications is not the CPU, but probably the shaders on the GPU
That said, there are some parts of the renderer that could be optimised for GPU usage:
1) Forward rendering could be modified to allow 'grouping' of multiple lights into one render pass
---e.g. create a spotlight shader that has uniforms for 2, 3 or more spot-lights at once.
--- This would make the lighting shaders a lot more complex (
the permutations can be managed with proper use of functions and includes), but it could drastically reduce the number of passes required when using lots of lights.
2) Deferred rendering could be modified to allow light-volumes to be defined by a mesh/model (
instead of rendering lights as a screen-space quad), drastically reducing the number of pixels to be shaded. Also, the stencil buffer could be used to again reduce the number of pixels shaded by a large amount.
I just noticed that #1 might reduce CPU usage as well (less scene traversals?).