Skip to content
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

Fix #225: use temporary RTs with the active camera dimensions for ocean renderer #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JonnyOThan
Copy link
Contributor

fixes rendering in VR because it automatically gets the right size no matter what the camera dimensions are

also doesn't require special screenshot handling

… for ocean renderer

-fixes rendering in VR because it automatically gets the right size no matter what the camera dimensions are
-also doesn't require special screenshot handling
if (oceanScreenShotModeEnabled != screenShotModeEnabled)
{
// Resize textures
int superSizingFactor = screenShotModeEnabled ? Mathf.Max(GameSettings.SCREENSHOT_SUPERSIZE, 1) : 1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty sure that temporary RTs don't detect/work correctly for supersized screenshots. You can leave it like this for now, but I have a branch with new ocean features using tempRTs which I will probably have to check after merging this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did test this and it seemed fine.

https://imgur.com/e7X5u2l


void CreateRenderTextures ()
{
targetCamera.forceIntoRenderTexture = true; //do this to force the camera target orientation to always match depth orientation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line may have been lost, not sure if it’s important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants