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

Imagery layer alpha control #498

Merged
merged 7 commits into from
Oct 20, 2023
Merged

Imagery layer alpha control #498

merged 7 commits into from
Oct 20, 2023

Conversation

lilleyse
Copy link
Contributor

@lilleyse lilleyse commented Oct 20, 2023

Added alpha property to CesiumImageryPrim as a quick and easy way to control the translucency of an imagery layer.

Technically this could also be achieved with tileset materials (like the example here) but it would be slower and would require a tileset reload (currently).

653294bcde1da120674075

For testing: multiple.usda.zip

Copy link
Contributor

@weegeekps weegeekps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nitpick but otherwise looks good to me.

string apiName = "alpha"
}
displayName = "Alpha"
doc = "The alpha blending value, from 0.0 to 1.0."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: We should probably mention in the doc that 1.0 means fully opaque.

@@ -467,7 +467,7 @@ void FabricPrepareRenderResources::attachRasterInMainThread(

const auto texcoordIndex = mesh.imageryTexcoordIndexMapping.at(gltfSetIndex);
const auto& textureAssetPath = texture->getAssetPathToken();
material->setImageryLayer(textureAssetPath, textureInfo, texcoordIndex, imageryLayerIndex.value());
material->setImageryLayer(textureAssetPath, textureInfo, texcoordIndex, imageryLayerIndex.value(), 1.0f);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to un-hardcode this value. Will have a fix pushed soon.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I thought that was intentional. Ok, I'll review again when you've pushed a fix.

Copy link
Contributor Author

@lilleyse lilleyse Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8d0a9cd - ready for review

@lilleyse lilleyse enabled auto-merge October 20, 2023 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants