-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Apply texture transforms to property textures #11709
Conversation
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.
@javagl I think this approach looks good! I left a couple comments explaining why MetadataPipelineStage works a bit differently than MaterialPipelineStage, and some ideas for unit testing.
The I tried this...
... but... what to check there? I added test to render the model (and it took me a few hours and some swearing before I resorted to just restoring the default camera orientation after the "fly-to"), and it renders the "invalid" areas (which should not be visible after the transform) in 'red' with a custom shader. But it is not clear what that "RGB value" should be that is checked there. (And... using/setting |
I found it a bit difficult to sensibly structure the test in the What it is doing now:
It "works" insfofar that this test...
which might be "enough". But maybe someone has ideas for improving that. The relevant spec starts at https://github.com/CesiumGS/cesium/pull/11709/files#diff-7118f1e2b4539329dcd5314bc1898c6007565fe4e096211621aef6be3d16543dR722 Running the tests locally results in a bunch of failed tests, e.g.
or
(?!?!) and a few timeouts. But this is unrelated to this change, and has to be tracked or addressed separately. |
@ptrgags I tried to add some tests here
|
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.
@javagl just a couple comments.
I'm going to try out the Sandcastle you posted in the original issue next. Do you have any other Sandcastles you've used while testing or just that one?
...s/glTF-2.0/PropertyTextureWithTextureTransform/glTF/PropertyTextureWithTextureTransform.gltf
Outdated
Show resolved
Hide resolved
I tried your Sandcastle with the data from the zip file from the description in #11708, and confirmed that it renders the bottom right quadrant of the texture: I also did a pass through all the metadata-related Sandcastles in the gallery, everything there is still working fine. So this PR looks close, once you address my feedback above we can merge this. |
…ansform-fix-draft # Conflicts: # CHANGES.md
I only tested this specific model with the one sandcastle. The intention here was to "zoom in" to what is wrong. (This is dangerous insofar that corner cases or "unusual" cases could be overlooked, but I hope that the scope of this PR is narrow enough for that not to happen...) |
(EDIT: The question at the bottom was answered with 'Yes' in the meantime) I think this could be merged. One thing that I'm not sure about: In the follow-up PR for fixing the same issue for feature ID textures, it was necessary to pass Here this does not seem to be necessary: https://github.com/CesiumGS/cesium/pull/11709/files#diff-7118f1e2b4539329dcd5314bc1898c6007565fe4e096211621aef6be3d16543dR753 I wonder whether there is a reason for that, or whether this is one of these cases where a "spurious test failure" is about to happen... Should I just add the |
This looks good now, thanks @javagl for the updates! |
A DRAFT addressing #11708
With this change, it appears to transform the texture properly:
This is a first shot (I haven't done anything in the CesiumJS+Metadata+Shader area before), and not yet tested extensively. Maybe someone wants to have a look whether this might go in the right direction. (If it does, the same will probably have to be done for feature ID textures - to be confirmed)
CHANGES.md
with a short summary of my change