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

Handle noData/default metadata values in CustomShader #10249

Open
ptrgags opened this issue Mar 30, 2022 · 0 comments
Open

Handle noData/default metadata values in CustomShader #10249

ptrgags opened this issue Mar 30, 2022 · 0 comments

Comments

@ptrgags
Copy link
Contributor

ptrgags commented Mar 30, 2022

on the CPU, we've implemented noData and default for metadata properties (see for example MetadataTableProperty.prototype.get). However, this change has not been propagated to the MetadataStage (which mainly impacts the custom shader portion of ModelExperimental), especially since it does not work exactly the same.

Some initial thoughs:

  • if the property has a noData sentinel, the shader should not do anything automatically, but the user should have access to this information. perhaps an additional struct field fsInput.metadata.property_noData that stores the sentinel (though what should it be if there's no sentinel?)
  • However, if there is a default value, it would be nice if such a value replaced the noData value so no extra work is required by the user.

One unfortunate detail is there's no defaultValue() function in GLSL. The closest we have is czm_branchFreeTernary().

This might require further discussion before we get to this. Also it would be best to handle #10248 #9572 first so this can be addressed holistically.

CC @lilleyse @IanLilleyT

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

No branches or pull requests

1 participant