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

Make bloom post process check for selected feature #7984

Open
OmarShehata opened this issue Jul 8, 2019 · 2 comments
Open

Make bloom post process check for selected feature #7984

OmarShehata opened this issue Jul 8, 2019 · 2 comments
Labels

Comments

@OmarShehata
Copy link
Contributor

Right now you can apply certain post process effects to just one feature. The bloom shader doesn't do any check to allow you to apply it to just to the selected feature as you would expect.

This is potentially pretty easy, you just need to take the check from another post process like the black and white one: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Shaders/PostProcessStages/BlackAndWhite.glsl

and apply it in the bloom shader: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Shaders/PostProcessStages/BloomComposite.glsl

The forum thread here has an example you could use for testing. Note that you'd need to test the selected feature on a model, since entities aren't yet supported there (see #6705).

@ProjectBarks
Copy link
Contributor

So I fixed that problem discussed but there appears to be another issue with the effect being applied to only some entities/primitives.

Here is a sandbox to demonstrate the issue.

@ProjectBarks
Copy link
Contributor

ProjectBarks commented Aug 14, 2019

PostProcessing & Compatibility

Post Processing selection filtering only applies if the entity passed has one of the following exposed functions: pickIds or pickId. Even if the object has _pickId or _pickIds it must possess the public properties. Primitives and Entities come to mind when exposing pick ids.

Most of the post processing steps themselves do not have support for selection. The post processing steps that do support selection tend to be the minority. If one were to implement a solution they would have to:

  1. Expose pickIds via properties to make other objects (i.e. entities, primitives) compatible
  2. Convert many of the post processing steps to be compatible by making similar changes as Fixed selection filtering for bloom #8056.
  3. Create tests to ensure each post processing works on the proper objects and each post processing works with selection.

I also wonder about selection capabilities. Selection can have different impacts depending on which post processing stage. For instance, on Silhouette it will apply only to the selected object but for BlackAndWhite it is the excluded object. We should either provide the user a way of controlling application in a consistent way or remove this functionality from core cesium.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants