Files
filament/web/filament-js/jsenums_generated.cpp
Mathias Agopian 85ebd67a28 feat(taa): Overhaul TAA implementation for improved quality and upscaling (#9573)
This commit introduces a significant rework of the Temporal Anti-Aliasing (TAA) system, focusing on improving reconstruction quality, robustness, and introducing flexible upscaling.

Core TAA Algorithm improvements:
- Replaced the Catmull-Rom filter with a more efficient 5-tap Lanczos filter for history sampling, which includes deringing to reduce artifacts.
- The input color buffer is now properly "unjittered" using a Lanczos reconstruction filter.
- Improved the history rejection algorithm by skipping the expensive accurate clipping when the history sample is already within the neighborhood's color gamut.
- Added a new `hdr` option to properly handle HDR content by tonemapping colors before blending and untonemapping the result.
- Removed the ineffective `VARIANCE` only history rejection method.
- Added protection against negative numbers in `sqrt()` for increased stability.

TAA Upscaling:
- Replaced the boolean `upscaling` flag with a float factor, allowing for variable upscaling ratios (e.g., 1.5x, 2x).
- Upscaling now correctly adjusts viewport and projection settings.
- The TAA shader now receives viewport and resolution information to correctly handle upscaled rendering.

API and Configuration Changes:
- Deprecated the `filterWidth` TAA option as it no longer has an effect.
- Introduced the `upscaling` float property to `TemporalAntiAliasingOptions`.
- Added the `hdr` boolean property to `TemporalAntiAliasingOptions`.

Other Changes:
- Updated UI elements in the viewer and material sandbox to reflect the new TAA options.
- Updated Javascript bindings and TypeScript definitions for the new TAA settings.
- Refactored shader code for clarity and performance.
2026-01-07 15:25:38 -08:00

79 lines
3.0 KiB
C++

// This file has been generated by beamsplitter
#include <emscripten.h>
#include <emscripten/bind.h>
#include <filament/View.h>
using namespace emscripten;
using namespace filament;
EMSCRIPTEN_BINDINGS(jsenums_generated) {
enum_<View::QualityLevel>("View$QualityLevel")
.value("LOW", View::QualityLevel::LOW)
.value("MEDIUM", View::QualityLevel::MEDIUM)
.value("HIGH", View::QualityLevel::HIGH)
.value("ULTRA", View::QualityLevel::ULTRA)
;
enum_<View::BlendMode>("View$BlendMode")
.value("OPAQUE", View::BlendMode::OPAQUE)
.value("TRANSLUCENT", View::BlendMode::TRANSLUCENT)
;
enum_<View::BloomOptions::BlendMode>("View$BloomOptions$BlendMode")
.value("ADD", View::BloomOptions::BlendMode::ADD)
.value("INTERPOLATE", View::BloomOptions::BlendMode::INTERPOLATE)
;
enum_<View::DepthOfFieldOptions::Filter>("View$DepthOfFieldOptions$Filter")
.value("NONE", View::DepthOfFieldOptions::Filter::NONE)
.value("UNUSED", View::DepthOfFieldOptions::Filter::UNUSED)
.value("MEDIAN", View::DepthOfFieldOptions::Filter::MEDIAN)
;
enum_<View::AmbientOcclusionOptions::AmbientOcclusionType>("View$AmbientOcclusionOptions$AmbientOcclusionType")
.value("SAO", View::AmbientOcclusionOptions::AmbientOcclusionType::SAO)
.value("GTAO", View::AmbientOcclusionOptions::AmbientOcclusionType::GTAO)
;
enum_<View::TemporalAntiAliasingOptions::BoxType>("View$TemporalAntiAliasingOptions$BoxType")
.value("AABB", View::TemporalAntiAliasingOptions::BoxType::AABB)
.value("AABB_VARIANCE", View::TemporalAntiAliasingOptions::BoxType::AABB_VARIANCE)
;
enum_<View::TemporalAntiAliasingOptions::BoxClipping>("View$TemporalAntiAliasingOptions$BoxClipping")
.value("ACCURATE", View::TemporalAntiAliasingOptions::BoxClipping::ACCURATE)
.value("CLAMP", View::TemporalAntiAliasingOptions::BoxClipping::CLAMP)
.value("NONE", View::TemporalAntiAliasingOptions::BoxClipping::NONE)
;
enum_<View::TemporalAntiAliasingOptions::JitterPattern>("View$TemporalAntiAliasingOptions$JitterPattern")
.value("RGSS_X4", View::TemporalAntiAliasingOptions::JitterPattern::RGSS_X4)
.value("UNIFORM_HELIX_X4", View::TemporalAntiAliasingOptions::JitterPattern::UNIFORM_HELIX_X4)
.value("HALTON_23_X8", View::TemporalAntiAliasingOptions::JitterPattern::HALTON_23_X8)
.value("HALTON_23_X16", View::TemporalAntiAliasingOptions::JitterPattern::HALTON_23_X16)
.value("HALTON_23_X32", View::TemporalAntiAliasingOptions::JitterPattern::HALTON_23_X32)
;
enum_<View::AntiAliasing>("View$AntiAliasing")
.value("NONE", View::AntiAliasing::NONE)
.value("FXAA", View::AntiAliasing::FXAA)
;
enum_<View::Dithering>("View$Dithering")
.value("NONE", View::Dithering::NONE)
.value("TEMPORAL", View::Dithering::TEMPORAL)
;
enum_<View::ShadowType>("View$ShadowType")
.value("PCF", View::ShadowType::PCF)
.value("VSM", View::ShadowType::VSM)
.value("DPCF", View::ShadowType::DPCF)
.value("PCSS", View::ShadowType::PCSS)
.value("PCFd", View::ShadowType::PCFd)
;
} // EMSCRIPTEN_BINDINGS