-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8056 from ProjectBarks/bloom-post-select-feature
Fixed selection filtering for bloom
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |