-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
output: handle common lighting in TRX #2358
base: develop
Are you sure you want to change the base?
Conversation
CLAMP_TO_BORDER apparently is not available on some platforms.
This changes the signature for adding dynamic light to accept XYZ_32 rather than separator coordinates.
This removes the global dynamic light count and moves it to output module scope, introducing a function instead to reset it as needed.
This changes the signature for calculating light to accept XYZ_32 rather than separator coordinates.
This changes the signatures for calculating light to accept XYZ_32 rather than separator coordinates.
This names the various room light modes that exist in TR2.
This removes the unused second ambient on TR2 rooms, renames the first ambient to match TR1, and adds the light mode property to TR1, defaulting to normal.
Download the built assets for this pull request: |
This introduces a SHADE struct for items and static meshes, and a FALLOF struct for lights to allow easier handling in common logic between TR1 and TR2.
This makes TR1 room vertices more in line with TR2.
364d07b
to
be73e11
Compare
^ Fixed a stale include |
This moves common lighting functions to TRX. This temporarily introduces some helper functions to access TR2 specifics, like shade tables, while the module remains split. These can later be eliminated.
be73e11
to
10208f3
Compare
Thank you @aredfan. I'm hoping that should be fixed now. I'll do some further extensive tests myself as well, but pushed the build for you to check. |
She looks almost better in the second screen to me? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @aredfan. I'm hoping that should be fixed now. I'll do some further extensive tests myself as well, but pushed the build for you to check.
Anytime, and thank you for pushing a new build. I can confirm the issue is fixed. 👍
The flat lighting on Lara can also happen in certain rooms in OG - namely rooms 21/42. It seems your fix also fixed those rooms as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually a request from me to keep the OG behavior.
OG:
2025-01-23_00-01-05.mp4
PR:
Checklist
Description
This shifts (most) lighting output handling to TRX. Dynamic lighting is technically now supported in TR1, but we don't call it anywhere yet: I thought it would be best to check over this change first. Dynamic lights are handled in three slightly different ways, hence the move now to standardize the shared logic.
There are a couple of temporary public functions while the modules remain split - fog calculation and accessing the TR2 shade tables. Otherwise, I've standardized most struct properties, such as shades, vertex info etc to make things easier to manage. TR1 will default where applicable.
I carried out some logging of generated output values while a demo runs between develop and this branch, and values are identical. For testing, room lighting, game object lighting (Lara, enemies, pickups, doors etc) and static mesh lighting should be as it currently is in both games.