mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
style: format visual effects and shader definitions
This commit is contained in:
1 parent
c30f7cc3be
commit
1bbb6d9c70
8 files changed
+356
-83
No files matched your search
+9
-2
@@ -43,7 +43,11 @@ export function clampBloomIntensity(value) {
|
||||
* @returns {number} equivalent v2 intensity
|
||||
*/
|
||||
export function legacyBloomToV2(value) {
|
||||
const legacy = clamp(Math.round(Number(value) || 0), 0, LEGACY_BLOOM_INTENSITY_MAX);
|
||||
const legacy = clamp(
|
||||
Math.round(Number(value) || 0),
|
||||
0,
|
||||
LEGACY_BLOOM_INTENSITY_MAX,
|
||||
);
|
||||
return clampBloomIntensity((LEGACY_BLOOM_INTENSITY_MAX - legacy) * 2);
|
||||
}
|
||||
|
||||
@@ -59,7 +63,10 @@ export function decodeBloomIntensity(value, version = 1) {
|
||||
if (!Number.isFinite(num)) return BLOOM_INTENSITY_DEFAULT;
|
||||
|
||||
const normalizedVersion = Number(version);
|
||||
if (Number.isFinite(normalizedVersion) && normalizedVersion >= BLOOM_SCALE_VERSION) {
|
||||
if (
|
||||
Number.isFinite(normalizedVersion) &&
|
||||
normalizedVersion >= BLOOM_SCALE_VERSION
|
||||
) {
|
||||
return clampBloomIntensity(num);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user