Commit Graph

13 Commits

Author SHA1 Message Date
Ben Doherty
62d06592d3 VSM: add support for mipmaps and anisotropic sampling (#3185) 2020-10-14 11:48:23 -06:00
Philip Rideout
e352542e24 Automation: add support for materials.
This adds a `material` key to `Settings`, as a sister to `view`.

Here's an example of an automation spec that manipulates material
parameters:

    [{
      "name": "metallic_vs_roughness",
      "permute": {
          "material.scalar.roughnessFactor": [0.0, 0.5, 1.0],
          "material.scalar.metallicFactor": [0.0, 1.0]
      }
    }]

Currently this is limited to float, vec3, and vec4 parameters.
2020-10-02 11:57:23 -07:00
Philip Rideout
5938242d61 gltf_viewer: Add automation UI and functionality.
This adds `AutomationEngine` to libs/viewer, which iterates through
`Settings` instances that were generated from a JSON spec and applies
them to a Filament `View`. It can be configured to sleep between tests
using a time delay or a frame count.

This also adds command line arguments and user-interface elements to
`gltf_viewer` for automated testing.
2020-10-02 11:00:26 -07:00
Philip Rideout
cfddd5b273 Rename AutomationList to AutomationSpec. 2020-10-01 19:07:24 -07:00
Pixelflinger
8b3caeffb9 ssct: decouple shadow distance from sample count 2020-10-01 10:20:38 -07:00
Philip Rideout
5fae33bde5 Automation: simplify API by flattening the test cases. 2020-09-30 16:17:23 -07:00
Philip Rideout
43cc5f9906 Automation: add a built-in default spec. 2020-09-30 16:17:23 -07:00
Philip Rideout
08f7973d0c Refactor Automation API. 2020-09-30 16:17:23 -07:00
Philip Rideout
094e7169cc Introduce a configurable test case generator.
This lets us generate long lists of settings permutations by writing a
simple JSON spec. For example, the following spec would generate six
`Settings` objects, all of which have SSAO enabled. See the unit test
for a larger example.

```
{
    "name": "viewopts",
    "base": { "view.ssao.enabled": true }
    "permute": {
        "view.dithering": ["NONE", "TEMPORAL"],
        "view.sampleCount": [1, 4, 8]
    }
}
```
2020-09-30 16:17:23 -07:00
Philip Rideout
617dc932bb Fix unit test failure. 2020-09-29 19:59:53 -07:00
Philip Rideout
ec2579bad5 Viewer Settings: remove SSCT scale. 2020-09-29 10:47:35 -07:00
Philip Rideout
6472f645fc viewer: add SCCT to JSON serializer. 2020-09-29 10:47:35 -07:00
Philip Rideout
7997e4aa21 Introduce libs/viewer and serializable view settings.
This introduces the `viewer::Settings` struct, and a JSON reader /
writer.

This will be used for automated testing and for client / server
communication.

Note that `viewer::Settings` is closely associated with the
`filament::View` API; when updating the latter we will often need to
update the former, as well as some serialization code. This increases
the maintenance burden and I think we should consider using a parser
library like libclang or a macro-based reflection utility.

This PR also migrates SimpleViewer into libs/viewer and un-inlines its
implementation. It does not belong in gltfio because it has an imgui
dependency.
2020-09-29 10:47:35 -07:00