Update METADATA to add clang-format requirement for glsl files

also ran clang-format for good measure

PiperOrigin-RevId: 600759938
This commit is contained in:
tofunmi 2024-01-23 05:46:42 -08:00 committed by Copybara-Service
parent cc62f0556c
commit acc78125d2
5 changed files with 27 additions and 27 deletions

View File

@ -20,6 +20,4 @@ precision mediump float;
uniform sampler2D uTexSampler; uniform sampler2D uTexSampler;
varying vec2 vTexSamplingCoord; varying vec2 vTexSamplingCoord;
void main() { void main() { gl_FragColor = texture2D(uTexSampler, vTexSamplingCoord); }
gl_FragColor = texture2D(uTexSampler, vTexSamplingCoord);
}

View File

@ -182,14 +182,15 @@ highp vec3 applyPqBt2020ToBt709Ootf(highp vec3 linearRgbBt2020) {
} else if (nits < x2) { } else if (nits < x2) {
// Scale [x1, x2] to [y1, y2] using Hermite interpolation. // Scale [x1, x2] to [y1, y2] using Hermite interpolation.
float t = (nits - x1) / h12; float t = (nits - x1) / h12;
nits = (y1 * (1.0 + 2.0 * t) + h12 * m1 * t) * (1.0 - t) * (1.0 - t) nits = (y1 * (1.0 + 2.0 * t) + h12 * m1 * t) * (1.0 - t) * (1.0 - t) +
+ (y2 * (3.0 - 2.0 * t) + h12 * m2 * (t - 1.0)) * t * t; (y2 * (3.0 - 2.0 * t) + h12 * m2 * (t - 1.0)) * t * t;
} else { } else {
// Scale [x2, maxInputLuminance] to [y2, maxOutputLuminance] using // Scale [x2, maxInputLuminance] to [y2, maxOutputLuminance] using
// Hermite interpolation. // Hermite interpolation.
float t = (nits - x2) / h23; float t = (nits - x2) / h23;
nits = (y2 * (1.0 + 2.0 * t) + h23 * m2 * t) * (1.0 - t) * (1.0 - t) nits =
+ (maxOutputLuminance * (3.0 - 2.0 * t) + h23 * m3 * (t - 1.0)) * t * t; (y2 * (1.0 + 2.0 * t) + h23 * m2 * t) * (1.0 - t) * (1.0 - t) +
(maxOutputLuminance * (3.0 - 2.0 * t) + h23 * m3 * (t - 1.0)) * t * t;
} }
// color.y is greater than 0 and is thus non-zero. // color.y is greater than 0 and is thus non-zero.

View File

@ -174,14 +174,15 @@ highp vec3 applyPqBt2020ToBt709Ootf(highp vec3 linearRgbBt2020) {
} else if (nits < x2) { } else if (nits < x2) {
// Scale [x1, x2] to [y1, y2] using Hermite interpolation. // Scale [x1, x2] to [y1, y2] using Hermite interpolation.
float t = (nits - x1) / h12; float t = (nits - x1) / h12;
nits = (y1 * (1.0 + 2.0 * t) + h12 * m1 * t) * (1.0 - t) * (1.0 - t) nits = (y1 * (1.0 + 2.0 * t) + h12 * m1 * t) * (1.0 - t) * (1.0 - t) +
+ (y2 * (3.0 - 2.0 * t) + h12 * m2 * (t - 1.0)) * t * t; (y2 * (3.0 - 2.0 * t) + h12 * m2 * (t - 1.0)) * t * t;
} else { } else {
// Scale [x2, maxInputLuminance] to [y2, maxOutputLuminance] using // Scale [x2, maxInputLuminance] to [y2, maxOutputLuminance] using
// Hermite interpolation. // Hermite interpolation.
float t = (nits - x2) / h23; float t = (nits - x2) / h23;
nits = (y2 * (1.0 + 2.0 * t) + h23 * m2 * t) * (1.0 - t) * (1.0 - t) nits =
+ (maxOutputLuminance * (3.0 - 2.0 * t) + h23 * m3 * (t - 1.0)) * t * t; (y2 * (1.0 + 2.0 * t) + h23 * m2 * t) * (1.0 - t) * (1.0 - t) +
(maxOutputLuminance * (3.0 - 2.0 * t) + h23 * m3 * (t - 1.0)) * t * t;
} }
// color.y is greater than 0 and is thus non-zero. // color.y is greater than 0 and is thus non-zero.