use rendergraph renderArea as scissor instead of viewport #1487
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.
In our application we frequently have views which are partially outside of the window's render area. In this case, the viewport is used to determine aspect ratio and should be allowed to go outside of the rendering area. The scissor is used to clip the rendered scene to the smaller visible region and should not change any rendering with respect to the camera.
The original code sets the viewport and scissor to the render graph's renderArea during record which ignores any potential difference. This PR fixes that to only set the scissor.
While this change fixes our immediate issue, I suspect there is a better solution that will be more general or more complete. I'm just not sure what's best.
This is rework of the effort to accomplish the same thing with older VSG structure around viewport state
See these PRs:
Type of change
Please delete options that are not relevant.
as expectedas it did before)How Has This Been Tested?
In our application we have viewport states where the viewport is partially outside the window area. The scissor is then brought to be within the window area. The render graph's renderArea should then be the scissor and not the viewport when recording the render commands.
Checklist: