-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 ability to "unset" material image #9644
Conversation
Thanks for the pull request @j9liu!
Reviewers, don't forget to make sure that:
|
The most recent change should have taken care of this. However, the image appears when toggling between I'm currently writing tests for the changes to
it will render the color white even though
Also, not related to this issue / PR, but the |
@lilleyse - I think this PR is ready for review. I put the changes under 1.84 in Sorry about the 20+ commits; they happened when I was |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start @j9liu! I confirmed that this fixes all the cases in the issue. The unit tests are solid. I just have some suggestions for how the code could be organized.
To fix the commit history:
In general if you're trying to merge |
af32dc7
to
a22c652
Compare
@lilleyse - I followed your comments, let me know if anything needs changing! |
@lilleyse - how does this look now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really close now. The code comments are very helpful. Just one last comment about destroying the texture in one case.
Thanks @j9liu! |
Will fix #9385. Not complete, but I had some questions about this block of code.
createTexture2DUpdateFunction
) that can handle when the value of an image is undefined. However, I'm unclear about the intended behavior of this function when it has no texture. It seems that if a texture is not defined, it wants to define some default texture anyway -- is that what we want?"czm_defaultImage"
: is this default image being created anywhere? The function just returns early ifuniformValue === Material.DefaultImageId
, so I'm not sure if thetexture
property is actually being set.I'm still addressing a bug where if you alternate between
czm_defaultImage
andundefined
, some random image appears -- not sure what it is.cc: @lilleyse @ebogo1