diff --git a/ext/remix/remix.h b/ext/remix/remix.h index 5767d02..32ab03e 100644 --- a/ext/remix/remix.h +++ b/ext/remix/remix.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -365,23 +365,30 @@ namespace remix { subsurfaceSingleScatteringAlbedoTexture = {}; subsurfaceTransmittanceColor = { 0.5f, 0.5f, 0.5f }; subsurfaceMeasurementDistance = 0.0f; - subsurfaceSingleScatteringAlbedo = { 0.5f, 0.5f, 0.5f };; + subsurfaceSingleScatteringAlbedo = { 0.5f, 0.5f, 0.5f }; subsurfaceVolumetricAnisotropy = 0.0f; - static_assert(sizeof remixapi_MaterialInfoOpaqueSubsurfaceEXT == 72); + subsurfaceDiffusionProfile = false; + subsurfaceRadius = { 0.5f, 0.5f, 0.5f }; + subsurfaceRadiusScale = 0.0f; + subsurfaceMaxSampleRadius = 0.0f; + subsurfaceRadiusTexture = {}; + static_assert(sizeof remixapi_MaterialInfoOpaqueSubsurfaceEXT == 104); } MaterialInfoOpaqueSubsurfaceEXT(const MaterialInfoOpaqueSubsurfaceEXT& other) : remixapi_MaterialInfoOpaqueSubsurfaceEXT(other) , cpp_subsurfaceTransmittanceTexture(other.cpp_subsurfaceTransmittanceTexture) , cpp_subsurfaceThicknessTexture(other.cpp_subsurfaceThicknessTexture) - , cpp_subsurfaceSingleScatteringAlbedoTexture(other.cpp_subsurfaceSingleScatteringAlbedoTexture) { + , cpp_subsurfaceSingleScatteringAlbedoTexture(other.cpp_subsurfaceSingleScatteringAlbedoTexture) + , cpp_subsurfaceRadiusTexture(other.cpp_subsurfaceRadiusTexture) { cpp_fixPointers(); } MaterialInfoOpaqueSubsurfaceEXT(MaterialInfoOpaqueSubsurfaceEXT&& other) noexcept : remixapi_MaterialInfoOpaqueSubsurfaceEXT(other) , cpp_subsurfaceTransmittanceTexture(std::move(other.cpp_subsurfaceTransmittanceTexture)) , cpp_subsurfaceThicknessTexture(std::move(other.cpp_subsurfaceThicknessTexture)) - , cpp_subsurfaceSingleScatteringAlbedoTexture(std::move(other.cpp_subsurfaceSingleScatteringAlbedoTexture)) { + , cpp_subsurfaceSingleScatteringAlbedoTexture(std::move(other.cpp_subsurfaceSingleScatteringAlbedoTexture)) + , cpp_subsurfaceRadiusTexture(std::move(other.cpp_subsurfaceRadiusTexture)) { cpp_fixPointers(); } MaterialInfoOpaqueSubsurfaceEXT& operator=(const MaterialInfoOpaqueSubsurfaceEXT& other) { @@ -392,6 +399,7 @@ namespace remix { cpp_subsurfaceTransmittanceTexture = other.cpp_subsurfaceTransmittanceTexture; cpp_subsurfaceThicknessTexture = other.cpp_subsurfaceThicknessTexture; cpp_subsurfaceSingleScatteringAlbedoTexture = other.cpp_subsurfaceSingleScatteringAlbedoTexture; + cpp_subsurfaceRadiusTexture = other.cpp_subsurfaceRadiusTexture; cpp_fixPointers(); return *this; } @@ -403,6 +411,7 @@ namespace remix { cpp_subsurfaceTransmittanceTexture = std::move(other.cpp_subsurfaceTransmittanceTexture); cpp_subsurfaceThicknessTexture = std::move(other.cpp_subsurfaceThicknessTexture); cpp_subsurfaceSingleScatteringAlbedoTexture = std::move(other.cpp_subsurfaceSingleScatteringAlbedoTexture); + cpp_subsurfaceRadiusTexture = std::move(other.cpp_subsurfaceRadiusTexture); cpp_fixPointers(); return *this; } @@ -419,18 +428,24 @@ namespace remix { cpp_subsurfaceSingleScatteringAlbedoTexture = std::move(v); subsurfaceSingleScatteringAlbedoTexture = cpp_subsurfaceSingleScatteringAlbedoTexture.c_str(); } + void set_subsurfaceRadiusTexture(std::filesystem::path v) { + cpp_subsurfaceRadiusTexture = std::move(v); + subsurfaceRadiusTexture = cpp_subsurfaceRadiusTexture.c_str(); + } private: void cpp_fixPointers() { subsurfaceTransmittanceTexture = cpp_subsurfaceTransmittanceTexture.c_str(); subsurfaceThicknessTexture = cpp_subsurfaceThicknessTexture.c_str(); subsurfaceSingleScatteringAlbedoTexture = cpp_subsurfaceSingleScatteringAlbedoTexture.c_str(); - static_assert(sizeof remixapi_MaterialInfoOpaqueSubsurfaceEXT == 72, "Recheck pointers"); + subsurfaceRadiusTexture = cpp_subsurfaceRadiusTexture.c_str(); + static_assert(sizeof remixapi_MaterialInfoOpaqueSubsurfaceEXT == 104, "Recheck pointers"); } std::filesystem::path cpp_subsurfaceTransmittanceTexture {}; std::filesystem::path cpp_subsurfaceThicknessTexture {}; std::filesystem::path cpp_subsurfaceSingleScatteringAlbedoTexture {}; + std::filesystem::path cpp_subsurfaceRadiusTexture{}; }; struct MaterialInfoTranslucentEXT : remixapi_MaterialInfoTranslucentEXT { @@ -759,6 +774,7 @@ namespace remix { radius = 0.05f; shaping_hasvalue = false; shaping_value = detail::defaultLightShaping(); + volumetricRadianceScale = 1.0f; static_assert(sizeof remixapi_LightInfoSphereEXT == 64); } @@ -779,6 +795,7 @@ namespace remix { direction = { 0.0f, 0.0f, 1.0f }; shaping_hasvalue = false; shaping_value = detail::defaultLightShaping(); + volumetricRadianceScale = 1.0f; static_assert(sizeof remixapi_LightInfoRectEXT == 104); } @@ -799,6 +816,7 @@ namespace remix { direction = { 0.0f, 0.0f, 1.0f }; shaping_hasvalue = false; shaping_value = detail::defaultLightShaping(); + volumetricRadianceScale = 1.0f; static_assert(sizeof remixapi_LightInfoDiskEXT == 104); } @@ -815,7 +833,8 @@ namespace remix { radius = 1.0f; axis = { 1.0f, 0.0f, 0.0f }; axisLength = 1.0f; - static_assert(sizeof remixapi_LightInfoCylinderEXT == 48); + volumetricRadianceScale = 1.0f; + static_assert(sizeof remixapi_LightInfoCylinderEXT == 56); } }; @@ -825,7 +844,8 @@ namespace remix { pNext = nullptr; direction = { 0.0f, -1.0f, 0.0f }; angularDiameterDegrees = 0.5f; - static_assert(sizeof remixapi_LightInfoDistantEXT == 32); + volumetricRadianceScale = 1.0f; + static_assert(sizeof remixapi_LightInfoDistantEXT == 40); } }; diff --git a/ext/remix/remix_c.h b/ext/remix/remix_c.h index 0834f02..5cff9e7 100644 --- a/ext/remix/remix_c.h +++ b/ext/remix/remix_c.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -53,8 +53,8 @@ #define REMIXAPI_VERSION_GET_PATCH(version) (((uint64_t)(version) ) & (uint64_t)0xFFFF) #define REMIXAPI_VERSION_MAJOR 0 -#define REMIXAPI_VERSION_MINOR 4 -#define REMIXAPI_VERSION_PATCH 2 +#define REMIXAPI_VERSION_MINOR 5 +#define REMIXAPI_VERSION_PATCH 1 // External @@ -218,6 +218,11 @@ extern "C" { float subsurfaceMeasurementDistance; remixapi_Float3D subsurfaceSingleScatteringAlbedo; float subsurfaceVolumetricAnisotropy; + remixapi_Bool subsurfaceDiffusionProfile; + remixapi_Float3D subsurfaceRadius; + float subsurfaceRadiusScale; + float subsurfaceMaxSampleRadius; + remixapi_Path subsurfaceRadiusTexture; } remixapi_MaterialInfoOpaqueSubsurfaceEXT; typedef struct remixapi_MaterialInfoTranslucentEXT { @@ -409,6 +414,7 @@ extern "C" { REMIXAPI_INSTANCE_CATEGORY_BIT_THIRD_PERSON_PLAYER_BODY = 1 << 19, REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_BAKED_LIGHTING = 1 << 20, REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_ALPHA_CHANNEL = 1 << 21, + REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_TRANSPARENCY_LAYER = 1 << 22, } remixapi_InstanceCategoryBit; typedef uint32_t remixapi_InstanceCategoryFlags; @@ -442,6 +448,7 @@ extern "C" { float radius; remixapi_Bool shaping_hasvalue; remixapi_LightInfoLightShaping shaping_value; + float volumetricRadianceScale; } remixapi_LightInfoSphereEXT; typedef struct remixapi_LightInfoRectEXT { @@ -459,6 +466,7 @@ extern "C" { remixapi_Float3D direction; remixapi_Bool shaping_hasvalue; remixapi_LightInfoLightShaping shaping_value; + float volumetricRadianceScale; } remixapi_LightInfoRectEXT; typedef struct remixapi_LightInfoDiskEXT { @@ -476,6 +484,7 @@ extern "C" { remixapi_Float3D direction; remixapi_Bool shaping_hasvalue; remixapi_LightInfoLightShaping shaping_value; + float volumetricRadianceScale; } remixapi_LightInfoDiskEXT; typedef struct remixapi_LightInfoCylinderEXT { @@ -486,6 +495,7 @@ extern "C" { // The "center" axis of the Cylinder Light. Must be normalized. remixapi_Float3D axis; float axisLength; + float volumetricRadianceScale; } remixapi_LightInfoCylinderEXT; typedef struct remixapi_LightInfoDistantEXT { @@ -494,6 +504,7 @@ extern "C" { // The direction the Distant Light is pointing in. Must be normalized. remixapi_Float3D direction; float angularDiameterDegrees; + float volumetricRadianceScale; } remixapi_LightInfoDistantEXT; typedef struct remixapi_LightInfoDomeEXT { @@ -512,19 +523,20 @@ extern "C" { void* pNext; remixapi_StructType lightType; remixapi_Transform transform; - const float* pRadius; // "radius" - const float* pWidth; // "width" - const float* pHeight; // "height" - const float* pLength; // "length" - const float* pAngleRadians; // "angle" - const remixapi_Bool* pEnableColorTemp; // "enableColorTemperature" - const remixapi_Float3D* pColor; // "color" - const float* pColorTemp; // "colorTemperature" - const float* pExposure; // "exposure" - const float* pIntensity; // "intensity" - const float* pConeAngleRadians; // "shaping:cone:angle" - const float* pConeSoftness; // "shaping:cone:softness" - const float* pFocus; // "shaping:focus" + const float* pRadius; // "radius" + const float* pWidth; // "width" + const float* pHeight; // "height" + const float* pLength; // "length" + const float* pAngleRadians; // "angle" + const remixapi_Bool* pEnableColorTemp; // "enableColorTemperature" + const remixapi_Float3D* pColor; // "color" + const float* pColorTemp; // "colorTemperature" + const float* pExposure; // "exposure" + const float* pIntensity; // "intensity" + const float* pConeAngleRadians; // "shaping:cone:angle" + const float* pConeSoftness; // "shaping:cone:softness" + const float* pFocus; // "shaping:focus" + const float* pVolumetricRadianceScale; // "volumetric_radiance_scale" } remixapi_LightInfoUSDEXT; typedef struct remixapi_LightInfo {