Fix Ocean Depth Cache baked texture size limit#1016
Open
magenta404 wants to merge 2 commits intomasterfrom
Open
Fix Ocean Depth Cache baked texture size limit#1016magenta404 wants to merge 2 commits intomasterfrom
magenta404 wants to merge 2 commits intomasterfrom
Conversation
Texture import settings could restrict size.
e586ae7 to
84783b5
Compare
huwb
reviewed
May 8, 2022
| // Values are slightly different with NPOT Scale applied. | ||
| ti.npotScale = TextureImporterNPOTScale.None; | ||
| // Round up so it encompasses desired resolution. | ||
| ti.maxTextureSize = Mathf.RoundToInt(Mathf.Pow(2f, Mathf.Ceil(Mathf.Log(dc._resolution, 2f)))); |
Contributor
There was a problem hiding this comment.
may be worth using max(dc._resolution, 1) . i'm not sure if it could ever be 0 in any situation but log() will go haywire if it is
huwb
approved these changes
May 8, 2022
Contributor
|
will approve anyway so you can pull the trigger, thanks |
Collaborator
Author
|
Going to defer this one for now. This will fight against the Unity preset system and developers can always do it themselves. Validation could work, but will have to think more about it. |
Contributor
|
That's fair |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Texture import settings can limit the baked texture size. If users specify a resolution in ODC UI, then they would expect the bake to be the same I think. Reported on Discord that baked texture was limited to 2K.