Commit graph

5103 commits

Author SHA1 Message Date
EmeraldLoc
b6aa182c88 Actual micro optimizations bro
im so cooked
2026-06-20 15:24:39 -05:00
EmeraldLoc
6c4cdfab64 remove some logging 2026-06-20 00:36:08 -05:00
EmeraldLoc
36ce238769 Only do fog calcs when necessary 2026-06-20 00:33:42 -05:00
EmeraldLoc
a460d5d38c Optimize and fix uniforms in opengl 2026-06-20 00:13:12 -05:00
EmeraldLoc
932386b674 Cache uniform locations 2026-06-19 22:30:55 -05:00
EmeraldLoc
afc2bcc934 Fix uniforms overriding eachother 2026-06-20 01:34:02 -05:00
EmeraldLoc
477c197d9b Fix hud in directx 2026-06-20 01:33:16 -05:00
EmeraldLoc
7593d0d2a5 fix directx cullin ig 2026-06-20 00:55:01 -05:00
EmeraldLoc
69a03c5cce Move matrices, fog, and more to shader 2026-06-19 19:39:13 -05:00
EmeraldLoc
82360f44d9 Get first done 2026-06-19 16:08:44 -05:00
EmeraldLockdown
450a72e7c4 YOU SUCK WINDOWS 2026-06-19 14:26:17 -05:00
EmeraldLoc
14cd303dfd This is the technically correct layout, lets see what windows has to say about it 2026-06-19 13:54:16 -05:00
EmeraldLockdown
afffc91744 Let me just..... undo that rq 2026-06-19 13:48:38 -05:00
EmeraldLockdown
9f0ef9da5b Does this happen on linux?!?!? 2026-06-19 13:46:16 -05:00
EmeraldLoc
258225d97f "fix" opengl uniforms
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
2026-06-19 18:28:25 -05:00
EmeraldLoc
b8d683b0d5 Fix opengl uniforms 2026-06-18 23:20:43 -05:00
EmeraldLoc
5f3cf69fac Fix compilation errors on linux 2026-06-18 22:34:01 -05:00
EmeraldLoc
02dd40020b Add frame passes to dx11, more uniform changes and fixes, parser fixes, autogen changes 2026-06-18 21:08:03 -05:00
EmeraldLoc
14fdb5187c Add support for qualifiers like noperspective, do some rewriting on framepasses 2026-06-17 18:53:16 -05:00
EmeraldLoc
0f4fa7a664 Before the great reckoning 2026-05-25 22:15:55 -05:00
EmeraldLoc
6471135e39 Ton of changes, SPIRV, bunch of stuff 2026-05-15 19:26:37 -05:00
EmeraldLoc
b22fd664a7 Now it compiles on everything 2026-05-13 08:19:31 -05:00
EmeraldLockdown
af89544d35 Fix some issues 2026-05-13 08:07:57 -05:00
EmeraldLockdown
6fdb6a2f6b Merge remote-tracking branch 'origin/dev' into shaders 2026-05-13 07:56:47 -05:00
EmeraldLockdown
14eabd5798 Weewoo 2026-05-12 21:44:18 -05:00
Isaac0-dev
76e6bf6bce make it compile again
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
(my fault)
2026-05-13 11:49:48 +10:00
Demi-kun
1139c0f67a
Re-Implement Sound Modes (#1226) 2026-05-13 10:48:15 +10:00
EmeraldLockdown
5a3ce71c6a
Fix a blunder by yours truly (#1237) 2026-05-13 09:58:13 +10:00
rPhase
c9154bc60b
Add missing Scale XYZ entry to graphNodeLots (#1236) 2026-05-12 19:31:03 -04:00
EmeraldLockdown
5a7b5096d1 Ok it works now! 2026-05-12 18:15:13 -05:00
EmeraldLoc
ec26a472ec Always use FBO 2026-05-12 15:56:11 -05:00
EmeraldLockdown
699cfa7261 Linux help 2026-05-12 14:06:26 -05:00
EmeraldLoc
15b74bda1b Fix a crash in gfx_opengl.c caused by matrix stack size being less than zero 2026-05-11 17:04:51 -05:00
EmeraldLockdown
7b1a6c0d21 More changes 2026-05-11 16:39:44 -05:00
Agent X
432b8721d6 Fix no icon on DirectX
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2026-05-11 17:09:57 -04:00
Agent X
63156acf39 Fix mouse input on DirectX 2026-05-11 17:06:15 -04:00
Agent X
07705adc67 Port trilinear filtering to DirectX 2026-05-11 16:52:09 -04:00
Agent X
3f79f261e9 Port lightmap color feature from OpenGL to DirectX 2026-05-11 16:37:57 -04:00
Agent X
19a429dbe5
Add built-in preset screen shader effects configurable through Lua (#1217)
* 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
2026-05-11 15:59:48 -04:00
EmeraldLockdown
1f7519f68d Multipass shaders 2026-05-11 12:08:13 -05:00
EmeraldLockdown
c7b2b2bb56
Update libs (#1234)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2026-05-11 07:34:35 -04:00
Agent X
000dc5abc9 Auto updater improvements
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2026-05-10 23:48:10 -04:00
EmeraldLockdown
1d71c4e8de
Add an auto updater (#1231)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
* 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>
2026-05-10 22:46:35 -04:00
Agent X
388536b385
Unify renderers into one build, add renderer selectionbox (#1218)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
* 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
2026-05-09 19:46:29 -04:00
Agent X
f2c5b4eb13 Implement the HOOK_ON_HUD_RENDER_BEHIND fix ON THE RIGHT BRANCH 2026-05-09 16:45:31 -04:00
Agent X
63f0067f3b Add new built-in mod categories 2026-05-09 15:03:31 -04:00
Agent X
6a099714d3 Set mario health to 1 instead of 8 with anti softlock measure 2026-05-09 14:21:24 -04:00
Agent X
2d65cbfa1a Fix wrong angle direction on first person cam c button turning always 2026-05-09 11:28:54 -04:00
Isaac0-dev
ec28e164db
optimised loading the mod cache (#1222)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
* 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
2026-05-09 11:13:08 -04:00
Isaac0-dev
1e4ede799b
massive performance improvements for add_scroll_target (#1219)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
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.
2026-05-08 20:57:06 +10:00