dpJudas wrote:Edit 2: improved the uniform setting code. It revealed that it sets the view matrix a gazillion times per frame. Also discovered you merged an older version of the code as I had actually moved the shader code to C# resources (see the master branch on my repository). :/ In any case, the low level code is now as fast as it gets without additional help from the C# side of things.
Older probably because I didn't know about your branch and actually merged Talon's one which was intermixed with the mono build and had older code.
Not sure if it's easy to merge now, will try later, maybe...
Also, 2D mode was quite smooth with Frozen Time in my build too (after moving back to software). Floor/ceiling textures did not slow it down. I guess due to vertex buffer instead of regenerating it every frame, which would require complete 2D renderer rewrite in terms of line drawing, like moving scroll to the shader, and only updating the lines when something really changes, and only at the end of the frame. I thought about this for a bit and then just returned software because it was faster to have.
As for the 3D mode, it seems visually a bit faster, but still slower than SlimDX 3D mode (Frozen Time with 20500 view limit).
Separately big thanks for the uniform rewrite, your continuous array with hardcoded numeric locations confused the shit out of me and was kind of not very safe if C# passed the wrong format...
Though, I think we still don't have the size check on the C++ side in SetUniform.