Improve bloom
- add a quality option - remove the ping-pong code, we'll disable for GPU that don't work instead. - improve quality by doing a better first downscale (using a 5x5 gaussian). - improve performance by using a 9 tap filter instead of 13 for in most cases - fix usages of setMinMaxLevels as it resets the base level to "min"
This commit is contained in:
committed by
Mathias Agopian
parent
9c0fb67b87
commit
9f62dc2f2f
@@ -249,6 +249,8 @@ int parse(jsmntok_t const* tokens, int i, const char* jsonChunk, BloomOptions* o
|
||||
i = parse(tokens, i + 1, jsonChunk, &out->enabled);
|
||||
} else if (compare(tok, jsonChunk, "highlight") == 0) {
|
||||
i = parse(tokens, i + 1, jsonChunk, &out->highlight);
|
||||
} else if (compare(tok, jsonChunk, "quality") == 0) {
|
||||
i = parse(tokens, i + 1, jsonChunk, &out->quality);
|
||||
} else if (compare(tok, jsonChunk, "lensFlare") == 0) {
|
||||
i = parse(tokens, i + 1, jsonChunk, &out->lensFlare);
|
||||
} else if (compare(tok, jsonChunk, "starburst") == 0) {
|
||||
@@ -291,6 +293,7 @@ std::ostream& operator<<(std::ostream& out, const BloomOptions& in) {
|
||||
<< "\"threshold\": " << to_string(in.threshold) << ",\n"
|
||||
<< "\"enabled\": " << to_string(in.enabled) << ",\n"
|
||||
<< "\"highlight\": " << (in.highlight) << ",\n"
|
||||
<< "\"quality\": " << (in.quality) << ",\n"
|
||||
<< "\"lensFlare\": " << to_string(in.lensFlare) << ",\n"
|
||||
<< "\"starburst\": " << to_string(in.starburst) << ",\n"
|
||||
<< "\"chromaticAberration\": " << (in.chromaticAberration) << ",\n"
|
||||
|
||||
Reference in New Issue
Block a user