Should have spirv still get each uniform and add the uniforms name, size, and loc and still use the loc for opengl
The reason I dont want to have it use the name is because then there can be inconsistent results between opengl and directx
* C++ lighting engine
Runs better using my new system for storing and iterating through lights.
I removed the lighting ctx profiler because after I've realized its very inaccurate and was probably programmed incorrectly from the start. Although I remember it working fine before and not constantly showing 20 ms or higher when I'm in an extremely simple level with extremely simple lights and the FPS is way too high for it to be taking 20 ms.
* Whoops
* Make some optimizations
* Fix small bug with LE inside graphics vertex function
I also brought back the lighting profiler because it's better than nothing.
* Some optimizations
* Cache active lights and 4 lights per vertex limit
Less branching and less iterating with the limit
* Screen shader effects for Lua [OpenGL]
Hue, saturation, brightness, contrast, exposure, dithering, posterization
Global = usually an object in the world
Non global = usually a screen element
Also:
* Changed skyboxes to use environment color instead of vertex color, visually identical
* Changed hud head texture to be non global
* changed power meter to be non global
* changed sparkles to be global
* changed some BBH vertex types to global
OpenGL renderer supported only for now.
* Add default values and better function names
Also fixed sizes in reset function
* Add scanlines effect
* Add global enabled function
* Fix some default values
* Hopefully fix white sparkles
* Whoops
* Address review
* Update function names
* Fix shader crash
* Address reviews
* Add builtin updater to macos
* Compile using trimmed build
* Implement windows
* Add coopdx updater binary
* idk what this is
* Dont need that
* Undo temp code, close stdin, stdout, and stderror so we dont print to error
* Add intel
* Linux
* Finalize
Co-authored-by: AgentXLP <44549182+AgentXLP@users.noreply.github.com>
* Update updater executables (cross compiled, need to test)
* Update windows exec
* Update mac libs
* Update windows lib
* Address review
---------
Co-authored-by: AgentXLP <44549182+AgentXLP@users.noreply.github.com>
* Unify renderers into one build, no more segregation
* Fix Linux compilation error
* How does one miss this
* Rename this
* Fix silly naming error that I missed
* Update Russian translation
* use hashmaps in mod cache
* use templates, suggested by peachy
an attempt to do what peachy is talking about
* that looks unusual
* change data to key parameter
Loading the scroll targets was probably the slowest parts to loading a romhack.
The reason for this is that many romhacks can have thousands of calls to `add_scroll_target`.
So, for 4,107 calls to `add_scroll_target`, the time went from ~4.5759 seconds to ~0.0173 seconds in total.
Changes made:
- Previously, simply finding the material data to scroll was rather slow due to using a linear sub string search across all vertices in all levels. To speed this up, I added a cache.
The cache bypasses checking every level by storing the exact string (rather than the substring) in a hashmap, so lookups become a simple case of a string lookup as a key in the map. It falls back to the full lookup if the cache doesn't hit.
- Changed the vertex buffer management in `scroll_targets.c` to behave closer to a modern dynamic array, where buffer size is doubled each time a new vertex buffer is added, to reduce the number of allocations performed.