-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add GET_WORLD_COORD_FROM_SCREEN_COORD
for RedM
#2370
Add GET_WORLD_COORD_FROM_SCREEN_COORD
for RedM
#2370
Conversation
4ef633c
to
537f434
Compare
Are sure these Looking at the values in RedM, it seems what is labelled Is it possible to rip these matrices from a shader (same applies to V)? |
I'm sure they're not correctly named - I just used names from our |
In V, and referencing struct grcViewport
{
float m_world[16];
float m_worldView[16];
float m_worldViewProj[16];
float m_inverseView[16]; // m_camMatrix in MumbleVoice; inverse(m_view)
float m_view[16];
float m_projection[16];
}; In RDR's case:
Putting this together: struct grcViewport
{
float m_world[16];
float m_worldView[16];
float m_projection[16];
float m_inverseView[16];
float m_unknown[16];
float m_view[16];
}; Changing the parameter order here makes this function more consistent with DirectX's own impl |
Co-Authored-By: Gottfried Leibniz <[email protected]>
Applied your suggestions, @gottfriedleibniz |
Actually, shit. Apologies for the hoops jumping here. While I have no issue with just using Also took a look at the stuttering at extreme locations and something is causing small-but-noticeable fluctuations in the projection matrix. It seems |
Goal of this PR
Add
GET_WORLD_COORD_FROM_SCREEN_COORD
native for RedM.How is this PR achieving the goal
By adapting related FiveM code for Red Dead Redemption 2 and RedM.
This PR applies to the following area(s)
RedM
Successfully tested on
Game builds: 1311, 1355, 1436, 1491
Platforms: Windows
Checklist
Fixes issues
Fixes #1977
Demonstration:
Video