update macos/ios to Filament v1.51.2
This commit is contained in:
@@ -57,8 +57,10 @@ enum class ToneMapping : uint8_t {
|
||||
ACES_LEGACY = 1,
|
||||
ACES = 2,
|
||||
FILMIC = 3,
|
||||
GENERIC = 4,
|
||||
DISPLAY_RANGE = 5,
|
||||
AGX = 4,
|
||||
GENERIC = 5,
|
||||
PBR_NEUTRAL = 6,
|
||||
DISPLAY_RANGE = 7,
|
||||
};
|
||||
|
||||
using AmbientOcclusionOptions = filament::View::AmbientOcclusionOptions;
|
||||
@@ -76,6 +78,7 @@ using TemporalAntiAliasingOptions = filament::View::TemporalAntiAliasingOptions;
|
||||
using VignetteOptions = filament::View::VignetteOptions;
|
||||
using VsmShadowOptions = filament::View::VsmShadowOptions;
|
||||
using GuardBandOptions = filament::View::GuardBandOptions;
|
||||
using StereoscopicOptions = filament::View::StereoscopicOptions;
|
||||
using LightManager = filament::LightManager;
|
||||
|
||||
// These functions push all editable property values to their respective Filament objects.
|
||||
@@ -114,8 +117,14 @@ struct GenericToneMapperSettings {
|
||||
float midGrayIn = 0.18f;
|
||||
float midGrayOut = 0.215f;
|
||||
float hdrMax = 10.0f;
|
||||
bool operator!=(const GenericToneMapperSettings &rhs) const { return !(rhs == *this); }
|
||||
bool operator==(const GenericToneMapperSettings &rhs) const;
|
||||
bool operator!=(const GenericToneMapperSettings& rhs) const { return !(rhs == *this); }
|
||||
bool operator==(const GenericToneMapperSettings& rhs) const;
|
||||
};
|
||||
|
||||
struct AgxToneMapperSettings {
|
||||
AgxToneMapper::AgxLook look = AgxToneMapper::AgxLook::NONE;
|
||||
bool operator!=(const AgxToneMapperSettings& rhs) const { return !(rhs == *this); }
|
||||
bool operator==(const AgxToneMapperSettings& rhs) const;
|
||||
};
|
||||
|
||||
struct ColorGradingSettings {
|
||||
@@ -127,7 +136,7 @@ struct ColorGradingSettings {
|
||||
filament::ColorGrading::QualityLevel quality = filament::ColorGrading::QualityLevel::MEDIUM;
|
||||
ToneMapping toneMapping = ToneMapping::ACES_LEGACY;
|
||||
bool padding0{};
|
||||
bool padding1{};
|
||||
AgxToneMapperSettings agxToneMapper;
|
||||
color::ColorSpace colorspace = Rec709-sRGB-D65;
|
||||
GenericToneMapperSettings genericToneMapper;
|
||||
math::float4 shadows{1.0f, 1.0f, 1.0f, 0.0f};
|
||||
@@ -185,6 +194,7 @@ struct ViewSettings {
|
||||
VignetteOptions vignette;
|
||||
VsmShadowOptions vsmShadowOptions;
|
||||
GuardBandOptions guardBand;
|
||||
StereoscopicOptions stereoscopicOptions;
|
||||
|
||||
// Custom View Options
|
||||
ColorGradingSettings colorGrading;
|
||||
@@ -224,6 +234,8 @@ struct ViewerOptions {
|
||||
float cameraISO = 100.0f;
|
||||
float cameraNear = 0.1f;
|
||||
float cameraFar = 100.0f;
|
||||
float cameraEyeOcularDistance = 0.0f;
|
||||
float cameraEyeToeIn = 0.0f;
|
||||
float groundShadowStrength = 0.75f;
|
||||
bool groundPlaneEnabled = false;
|
||||
bool skyboxEnabled = true;
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
*
|
||||
* This removes all the asset entities from the Scene, but does not destroy them.
|
||||
*/
|
||||
void removeEntity();
|
||||
void removeAsset();
|
||||
|
||||
/**
|
||||
* Sets or changes the current scene's IBL to allow the UI manipulate it.
|
||||
@@ -227,12 +227,10 @@ public:
|
||||
*/
|
||||
Settings& getSettings() { return mSettings; }
|
||||
|
||||
void stopAnimation() { mCurrentAnimation = 0; }
|
||||
void stopAnimation() { mCurrentAnimation = -1; }
|
||||
|
||||
int getCurrentCamera() const { return mCurrentCamera; }
|
||||
|
||||
float getOcularDistance() const { return mOcularDistance; }
|
||||
|
||||
private:
|
||||
using SceneMask = gltfio::NodeManager::SceneMask;
|
||||
|
||||
@@ -256,7 +254,7 @@ private:
|
||||
std::function<void()> mCustomUI;
|
||||
|
||||
// Properties that can be changed from the UI.
|
||||
int mCurrentAnimation = 1; // It is a 1-based index and 0 means not playing animation
|
||||
int mCurrentAnimation = 0; // -1 means not playing animation and count means plays all of them (0-based index)
|
||||
int mCurrentVariant = 0;
|
||||
bool mEnableWireframe = false;
|
||||
int mVsmMsaaSamplesLog2 = 1;
|
||||
@@ -268,15 +266,12 @@ private:
|
||||
SceneMask mVisibleScenes;
|
||||
bool mShowingRestPose = false;
|
||||
|
||||
// Stereoscopic debugging
|
||||
float mOcularDistance = 0.0f;
|
||||
|
||||
// 0 is the default "free camera". Additional cameras come from the gltf file (1-based index).
|
||||
int mCurrentCamera = 0;
|
||||
|
||||
// Cross fade animation parameters.
|
||||
float mCrossFadeDuration = 0.5f; // number of seconds to transition between animations
|
||||
int mPreviousAnimation = 0; // one-based index of the previous animation
|
||||
int mPreviousAnimation = -1; // zero-based index of the previous animation
|
||||
double mCurrentStartTime = 0.0f; // start time of most recent cross-fade (seconds)
|
||||
double mPreviousStartTime = 0.0f; // start time of previous cross-fade (seconds)
|
||||
bool mResetAnimation = true; // set when building ImGui widgets, honored in applyAnimation
|
||||
|
||||
Reference in New Issue
Block a user