-
Notifications
You must be signed in to change notification settings - Fork 111
Added support for transforming homogenous W geometry into world geomtry #199
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
Open
dkollmann
wants to merge
43
commits into
elishacloud:master
Choose a base branch
from
dkollmann:reverse_xyzrhw_new
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
917d6d6
e8ff88d
17ba9b6
Fix comments from pull request
elishacloud dbc8e10
Don't override matrix memory, just the pointer
elishacloud 14632ef
Fix disable lighting and a couple typos
elishacloud de8fcbc
Set transform if not set by game
elishacloud a0ddc3d
Remove RenderData
elishacloud c715c61
Fix default settings
elishacloud d7dff14
Fixed that DdrawConvertHomogeneousToWorldUseGameCamera did not actual…
dkollmann 575bd6f
Remove unneeded matrix assignment
elishacloud 44d4338
Fix DdrawConvertHomogeneousToWorldUseGameCamera
elishacloud f823ec3
Move matrix override code to the end
elishacloud e79c204
Fix DdrawConvertHomogeneousToWorldUseGameCamera
elishacloud 153287c
Merge branch 'master' into reverse_xyzrhw_new
elishacloud 1a8607e
Fix merge conflict with main
elishacloud f82ae80
Minor update
elishacloud 80b12b0
Merge branch 'master' into reverse_xyzrhw_new
elishacloud fac874b
Fix formatting
elishacloud 8b54596
Fix defaults
elishacloud 48bdfec
Merge remote-tracking branch 'origin/master' into pr/199
elishacloud 3ee34d4
Fix PR to work with master branch changes
elishacloud 5e3d5e4
Merge remote-tracking branch 'origin/master' into pr/199
elishacloud 0d9bb50
Update to make it match master branch
elishacloud 58812be
Merge remote-tracking branch 'origin/master' into pr/199
elishacloud f5b307d
Merge remote-tracking branch 'origin/master' into pr/199
elishacloud 1ab9a42
Merge branch 'master' into reverse_xyzrhw_new
elishacloud 80dfe72
Include DirectXMath
elishacloud 11e1db3
Merge branch 'master' into reverse_xyzrhw_new
elishacloud 5dec4b8
Merge branch 'master' into reverse_xyzrhw_new
elishacloud 9b92264
Merge branch 'master' into reverse_xyzrhw_new
elishacloud bf79a6a
Merge branch 'master' into reverse_xyzrhw_new
elishacloud e84f19c
Merge branch 'master' into reverse_xyzrhw_new
elishacloud 917946e
Merge branch 'master' into reverse_xyzrhw_new
elishacloud e4bf42c
Merge branch 'master' into reverse_xyzrhw_new
elishacloud 1ff2bc0
Fix issue with merging master branch
elishacloud 6fe14d6
Merge remote-tracking branch 'origin/master' into pr/199
elishacloud 5421628
Merge branch 'master' into reverse_xyzrhw_new
elishacloud 9864712
Fix build merge issues
elishacloud 69e9ae3
Merge branch 'master' into reverse_xyzrhw_new
elishacloud 7c890df
Fix build issue
elishacloud 0c8fb96
Merge branch 'master' into reverse_xyzrhw_new
elishacloud 0c15505
Merge branch 'master' into reverse_xyzrhw_new
elishacloud e34127f
Fix build issue
elishacloud File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #pragma once | ||
|
|
||
| #include <d3d9types.h> | ||
| #include <DirectXMath.h> | ||
| #include <vector> | ||
|
|
||
| class RenderData | ||
| { | ||
| public: | ||
|
|
||
| // Store the projection matrix used to transform the geometry on the gpu | ||
| _D3DMATRIX DdrawConvertHomogeneousToWorld_ProjectionMatrix; | ||
|
|
||
| // Store the view matrix used to transform the geometry on the gpu | ||
| _D3DMATRIX DdrawConvertHomogeneousToWorld_ViewMatrix; | ||
|
|
||
| // Store the original view matrix, so we can restore it | ||
| _D3DMATRIX DdrawConvertHomogeneousToWorld_ViewMatrixOriginal; | ||
|
|
||
| // Store the inverse view matrix to transform the geometry on the cpu | ||
| DirectX::XMMATRIX DdrawConvertHomogeneousToWorld_ViewMatrixInverse; | ||
|
|
||
| // Intermediate buffer for the geometry conversion | ||
| std::vector<uint8_t> DdrawConvertHomogeneousToWorld_IntermediateGeometry; | ||
|
|
||
| RenderData() | ||
| { | ||
| ZeroMemory(&DdrawConvertHomogeneousToWorld_ViewMatrix, sizeof(_D3DMATRIX)); | ||
| DdrawConvertHomogeneousToWorld_ViewMatrix._11 = 1.0f; | ||
| DdrawConvertHomogeneousToWorld_ViewMatrix._22 = 1.0f; | ||
| DdrawConvertHomogeneousToWorld_ViewMatrix._33 = 1.0f; | ||
| DdrawConvertHomogeneousToWorld_ViewMatrix._44 = 1.0f; | ||
|
|
||
| std::memcpy(&DdrawConvertHomogeneousToWorld_ProjectionMatrix, &DdrawConvertHomogeneousToWorld_ViewMatrix, sizeof(_D3DMATRIX)); | ||
| std::memcpy(&DdrawConvertHomogeneousToWorld_ViewMatrixOriginal, &DdrawConvertHomogeneousToWorld_ViewMatrix, sizeof(_D3DMATRIX)); | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.