Skip to content

Commit

Permalink
Merge pull request #8056 from ProjectBarks/bloom-post-select-feature
Browse files Browse the repository at this point in the history
Fixed selection filtering for bloom
  • Loading branch information
Omar Shehata authored Aug 16, 2019
2 parents 1490ff9 + 792ba7e commit 4537d32
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ Change Log
* Added optional `index` parameter to `PrimitiveCollection.add`. [#8041](https://github.com/AnalyticalGraphicsInc/cesium/pull/8041)

##### Fixes :wrench:
* Fixed post-processing selection filtering to work for bloom. [#7984](https://github.com/AnalyticalGraphicsInc/cesium/issues/7984)
* Disabled HDR by default to improve visual quality in most standard use cases. Set `viewer.scene.highDynamicRange = true` to re-enable. [#7966](https://github.com/AnalyticalGraphicsInc/cesium/issues/7966)
* Fixed a bug that causes hidden point primitives to still appear on some operating systems. [#8043](https://github.com/AnalyticalGraphicsInc/cesium/issues/8043)
* Disabled HDR by default to improve visual quality in most standard use cases. Set `viewer.scene.highDynamicRange = true` to re-enable it. [#7966](https://github.com/AnalyticalGraphicsInc/cesium/issues/7966)
* Fixed issue where KTX or CRN files would not be properly identified. [#7979](https://github.com/AnalyticalGraphicsInc/cesium/issues/7979)

### 1.60 - 2019-08-01
Expand Down
12 changes: 10 additions & 2 deletions Source/Shaders/PostProcessStages/BloomComposite.glsl
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
uniform sampler2D colorTexture;
uniform sampler2D bloomTexture;
uniform bool glowOnly;
uniform bool glowOnly;

varying vec2 v_textureCoordinates;

void main(void)
{
vec4 bloom = texture2D(bloomTexture, v_textureCoordinates);
vec4 color = texture2D(colorTexture, v_textureCoordinates);

#ifdef CZM_SELECTED_FEATURE
if (czm_selected()) {
gl_FragColor = color;
return;
}
#endif

vec4 bloom = texture2D(bloomTexture, v_textureCoordinates);
gl_FragColor = glowOnly ? bloom : bloom + color;
}

0 comments on commit 4537d32

Please sign in to comment.