-
Notifications
You must be signed in to change notification settings - Fork 7
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
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.
One nitpick but otherwise looks good to me.
string apiName = "alpha" | ||
} | ||
displayName = "Alpha" | ||
doc = "The alpha blending value, from 0.0 to 1.0." |
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.
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); |
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.
I forgot to un-hardcode this value. Will have a fix pushed soon.
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.
Oh, I thought that was intentional. Ok, I'll review again when you've pushed a fix.
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.
8d0a9cd - ready for review
Added
alpha
property toCesiumImageryPrim
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).
For testing: multiple.usda.zip