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

Doesn't work with Screen-Space Overlay #41

Closed
itsagam opened this issue Mar 13, 2019 · 13 comments
Closed

Doesn't work with Screen-Space Overlay #41

itsagam opened this issue Mar 13, 2019 · 13 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@itsagam
Copy link

itsagam commented Mar 13, 2019

Doesn't work in "Screen Space - Overlay" (shows correctly in the Editor but does not work in-game).

Steps to reproduce the behavior:

  1. Play the included demo.
  2. Scroll to bottom and switch to "Overlay".
  3. Scroll up and notice.
  • Platform: Windows/Editor
  • Unity: 2018.3.8
  • SoftMaskForUGUI: v0.7.1

Capture
Capture1

@mob-sakai mob-sakai self-assigned this Mar 14, 2019
@mob-sakai mob-sakai added the bug Something isn't working label Mar 14, 2019
@mob-sakai
Copy link
Owner

Hi @itsagam
Thsnk you for reporting!

Hmm, It does not work correctly on game view in editor, right?

@itsagam
Copy link
Author

itsagam commented Mar 14, 2019

Indeed, I saw there were previous issues with Overlay but they were closed. Not sure what’s hapenning. Thank you for making your work available though.

@mob-sakai
Copy link
Owner

Okay, I'll fix it as soon as possible.
Thank you again!

@mob-sakai
Copy link
Owner

Please try v0.7.2

@itsagam
Copy link
Author

itsagam commented Mar 14, 2019

Okay, I tested it. It works in Screen-Space Overlay mode now, but the code changes introduced a regression where it doesn't work as intended in Screen-Space Camera and World Space. The masked image is offset by viewing position (see screenshots).

This is just to report. I bought an package from Asset Store that got the job done. Thanks!

Capture1
Capture

@mob-sakai mob-sakai reopened this Mar 14, 2019
@mob-sakai
Copy link
Owner

Thank you for testing. :)
For the time being, we have discontinued the v0.7.2 release.
I will continue to fix.

@mob-sakai
Copy link
Owner

Hi @itsagam
Can you test this?
fixed.unitypackage.zip

If there is no bug, I will release v0.7.2. :)

@mob-sakai mob-sakai reopened this Mar 15, 2019
@itsagam
Copy link
Author

itsagam commented Mar 15, 2019

Sure, sure. Okay, so, the asset works now in all three modes (Screen-Space Overlay, Screen-Space Camera, World Space), but while testing it thoroughly, I encountered two more bugs:

  1. If you maximize Game View (either with "Game -> Right-click -> Maximize" or "Maximize on Play"), the masked images all disappear.
    image

  2. Intermittently, get "Attempting to ReadPixels outside of RenderTexture bounds! Reading .... from ...." errors.
    image

I had the package from v0.7.1, so I installed it again to see whether these were a regression, but they happen there as well and seem to be unrelated to the changes you made. I wish I could help you diagnose any of it, but shader programming is not my forte. Do let me know, however, if you ever need some help with editor scripting side of things.

Best.

@itsagam
Copy link
Author

itsagam commented Mar 16, 2019

Reading the exception now, maybe it is an off-by-one error? Trying to read pixel 289 from size 288? Just a thought, I'm a noob with shaders.

@mob-sakai
Copy link
Owner

Many thanks!
And, 3. the masked image disappears when the game view is resized.

Actually, the bugs are independent.
I created new issues for the bugs and fixed them!
#42, #43, #44

@mob-sakai
Copy link
Owner

Please try this
fixed_2.unitypackage.zip

@itsagam
Copy link
Author

itsagam commented Mar 16, 2019

Works good.

@mob-sakai
Copy link
Owner

Thank you for your cooperation! 👍
I'll release it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants