Files
filament/test/renderdiff/tests/sample.json
Powei Feng ca4b0650fa Re-commit "Generalize scene description for automated testing (#9627)"
Contains a fix to the default sunlight parameters that broke the
renderdiff tests.
2026-01-26 13:33:09 -08:00

48 lines
3.0 KiB
JSON

{
"name": "SampleTest" , // [required]
"backends": ["opengl"], // [required] Specifies the backend that will be used to render
// this test
"model_search_paths": ["third_party/models"], // [optional] Base iirectory from which we will glob for
// .glb files and try to match against names in the 'models'
// field.
"presets": [ // [optional] A list of preset configurations that tests can
// inherit from.
{
"name": "Standard", // [required]
"models": ["lucy", "DamagedHelmet"], // [optional] Base name for the gltf file used in the test. For
// example, source files are lucy.glb and DamagedHelmet.gltf
"rendering": { // [required] Rendering settings used in the test. The json format
"camera.focusDistance": 0, // is taken from AutomationSpec in libs/viewer
"view.postProcessingEnabled": true
}
}
],
"tests": [ // [required] List of test configurations
{
"name": "BloomFlare", // [required]
"description": "Testing bloom and flare", // [optional]
"apply_presets": ["Standard"], // [optional] Applies the preset in order. Item must be in
// 'presets' field in the top-level struct.
"model": [], // [optional] List of models used in this test. The list is
// *appended* onto the lists provided by the presets.
"tolerance": { // [optional] Image comparison tolerance specification
"operator": "OR", // [optional] How to combine criteria: "AND" or "OR" (default: "AND")
"criteria": [
{
"max_pixel_diff": 3, // [optional] Max absolute difference per channel (0-255)
"allowed_diff_pixels": 1.0 // [optional] Percentage of pixels allowed to exceed (0-100%)
},
{
"max_pixel_diff_percent": 2.0, // [optional] Max difference as percentage (0-100%)
"allowed_diff_pixels": 0.5 // [optional] Percentage of pixels allowed to exceed (0-100%)
}
]
},
"rendering": { // [required] See description in 'presets'
"view.bloom.enabled": true,
"view.bloom.lensFlare": true
}
}
]
}