Adding a "testFix" URL variable to help test potential fixes to open bugs in production.

This commit is contained in:
Rezmason
2022-10-01 10:12:56 -07:00
parent e9b9df97d8
commit 87bd6c1681
2 changed files with 16 additions and 6 deletions

View File

@@ -403,6 +403,7 @@ const parsePalette = (isHSL) => (s) => {
};
const paramMapping = {
testFix: { key: "testFix", parser: (s) => s },
version: { key: "version", parser: (s) => s },
font: { key: "font", parser: (s) => s },
effect: { key: "effect", parser: (s) => s },

View File

@@ -61,12 +61,21 @@ export default async (canvas, config) => {
await setupCamera();
}
const regl = createREGL({
canvas,
extensions: ["OES_texture_half_float", "OES_texture_half_float_linear"],
const extensions = ["OES_texture_half_float", "OES_texture_half_float_linear"];
// These extensions are also needed, but Safari misreports that they are missing
optionalExtensions: ["EXT_color_buffer_half_float", "WEBGL_color_buffer_float", "OES_standard_derivatives"],
});
const optionalExtensions = ["EXT_color_buffer_half_float", "WEBGL_color_buffer_float", "OES_standard_derivatives"];
switch (config.testFix) {
case "fwidth_10_1_2022_A":
extensions.push("OES_standard_derivatives");
break;
case "fwidth_10_1_2022_B":
optionalExtensions.forEach(ext => extensions.push(ext));
extensions.length = 0;
break;
}
const regl = createREGL({ canvas, extensions, optionalExtensions, });
const cameraTex = regl.texture(cameraCanvas);
const lkg = await getLKG(config.useHoloplay, true);