Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 5946ff6

Browse files
committed
Merge branch 'ajaus/pr20' into 'main'
[PR:20] Add latest dxvk-remix api headers See merge request lightspeedrtx/bridge-remix-nv!153
2 parents f0c6e48 + 37ca9c4 commit 5946ff6

File tree

2 files changed

+56
-24
lines changed

2 files changed

+56
-24
lines changed

ext/remix/remix.h

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
@@ -365,23 +365,30 @@ namespace remix {
365365
subsurfaceSingleScatteringAlbedoTexture = {};
366366
subsurfaceTransmittanceColor = { 0.5f, 0.5f, 0.5f };
367367
subsurfaceMeasurementDistance = 0.0f;
368-
subsurfaceSingleScatteringAlbedo = { 0.5f, 0.5f, 0.5f };;
368+
subsurfaceSingleScatteringAlbedo = { 0.5f, 0.5f, 0.5f };
369369
subsurfaceVolumetricAnisotropy = 0.0f;
370-
static_assert(sizeof remixapi_MaterialInfoOpaqueSubsurfaceEXT == 72);
370+
subsurfaceDiffusionProfile = false;
371+
subsurfaceRadius = { 0.5f, 0.5f, 0.5f };
372+
subsurfaceRadiusScale = 0.0f;
373+
subsurfaceMaxSampleRadius = 0.0f;
374+
subsurfaceRadiusTexture = {};
375+
static_assert(sizeof remixapi_MaterialInfoOpaqueSubsurfaceEXT == 104);
371376
}
372377

373378
MaterialInfoOpaqueSubsurfaceEXT(const MaterialInfoOpaqueSubsurfaceEXT& other)
374379
: remixapi_MaterialInfoOpaqueSubsurfaceEXT(other)
375380
, cpp_subsurfaceTransmittanceTexture(other.cpp_subsurfaceTransmittanceTexture)
376381
, cpp_subsurfaceThicknessTexture(other.cpp_subsurfaceThicknessTexture)
377-
, cpp_subsurfaceSingleScatteringAlbedoTexture(other.cpp_subsurfaceSingleScatteringAlbedoTexture) {
382+
, cpp_subsurfaceSingleScatteringAlbedoTexture(other.cpp_subsurfaceSingleScatteringAlbedoTexture)
383+
, cpp_subsurfaceRadiusTexture(other.cpp_subsurfaceRadiusTexture) {
378384
cpp_fixPointers();
379385
}
380386
MaterialInfoOpaqueSubsurfaceEXT(MaterialInfoOpaqueSubsurfaceEXT&& other) noexcept
381387
: remixapi_MaterialInfoOpaqueSubsurfaceEXT(other)
382388
, cpp_subsurfaceTransmittanceTexture(std::move(other.cpp_subsurfaceTransmittanceTexture))
383389
, cpp_subsurfaceThicknessTexture(std::move(other.cpp_subsurfaceThicknessTexture))
384-
, cpp_subsurfaceSingleScatteringAlbedoTexture(std::move(other.cpp_subsurfaceSingleScatteringAlbedoTexture)) {
390+
, cpp_subsurfaceSingleScatteringAlbedoTexture(std::move(other.cpp_subsurfaceSingleScatteringAlbedoTexture))
391+
, cpp_subsurfaceRadiusTexture(std::move(other.cpp_subsurfaceRadiusTexture)) {
385392
cpp_fixPointers();
386393
}
387394
MaterialInfoOpaqueSubsurfaceEXT& operator=(const MaterialInfoOpaqueSubsurfaceEXT& other) {
@@ -392,6 +399,7 @@ namespace remix {
392399
cpp_subsurfaceTransmittanceTexture = other.cpp_subsurfaceTransmittanceTexture;
393400
cpp_subsurfaceThicknessTexture = other.cpp_subsurfaceThicknessTexture;
394401
cpp_subsurfaceSingleScatteringAlbedoTexture = other.cpp_subsurfaceSingleScatteringAlbedoTexture;
402+
cpp_subsurfaceRadiusTexture = other.cpp_subsurfaceRadiusTexture;
395403
cpp_fixPointers();
396404
return *this;
397405
}
@@ -403,6 +411,7 @@ namespace remix {
403411
cpp_subsurfaceTransmittanceTexture = std::move(other.cpp_subsurfaceTransmittanceTexture);
404412
cpp_subsurfaceThicknessTexture = std::move(other.cpp_subsurfaceThicknessTexture);
405413
cpp_subsurfaceSingleScatteringAlbedoTexture = std::move(other.cpp_subsurfaceSingleScatteringAlbedoTexture);
414+
cpp_subsurfaceRadiusTexture = std::move(other.cpp_subsurfaceRadiusTexture);
406415
cpp_fixPointers();
407416
return *this;
408417
}
@@ -419,18 +428,24 @@ namespace remix {
419428
cpp_subsurfaceSingleScatteringAlbedoTexture = std::move(v);
420429
subsurfaceSingleScatteringAlbedoTexture = cpp_subsurfaceSingleScatteringAlbedoTexture.c_str();
421430
}
431+
void set_subsurfaceRadiusTexture(std::filesystem::path v) {
432+
cpp_subsurfaceRadiusTexture = std::move(v);
433+
subsurfaceRadiusTexture = cpp_subsurfaceRadiusTexture.c_str();
434+
}
422435

423436
private:
424437
void cpp_fixPointers() {
425438
subsurfaceTransmittanceTexture = cpp_subsurfaceTransmittanceTexture.c_str();
426439
subsurfaceThicknessTexture = cpp_subsurfaceThicknessTexture.c_str();
427440
subsurfaceSingleScatteringAlbedoTexture = cpp_subsurfaceSingleScatteringAlbedoTexture.c_str();
428-
static_assert(sizeof remixapi_MaterialInfoOpaqueSubsurfaceEXT == 72, "Recheck pointers");
441+
subsurfaceRadiusTexture = cpp_subsurfaceRadiusTexture.c_str();
442+
static_assert(sizeof remixapi_MaterialInfoOpaqueSubsurfaceEXT == 104, "Recheck pointers");
429443
}
430444

431445
std::filesystem::path cpp_subsurfaceTransmittanceTexture {};
432446
std::filesystem::path cpp_subsurfaceThicknessTexture {};
433447
std::filesystem::path cpp_subsurfaceSingleScatteringAlbedoTexture {};
448+
std::filesystem::path cpp_subsurfaceRadiusTexture{};
434449
};
435450

436451
struct MaterialInfoTranslucentEXT : remixapi_MaterialInfoTranslucentEXT {
@@ -759,6 +774,7 @@ namespace remix {
759774
radius = 0.05f;
760775
shaping_hasvalue = false;
761776
shaping_value = detail::defaultLightShaping();
777+
volumetricRadianceScale = 1.0f;
762778
static_assert(sizeof remixapi_LightInfoSphereEXT == 64);
763779
}
764780

@@ -779,6 +795,7 @@ namespace remix {
779795
direction = { 0.0f, 0.0f, 1.0f };
780796
shaping_hasvalue = false;
781797
shaping_value = detail::defaultLightShaping();
798+
volumetricRadianceScale = 1.0f;
782799
static_assert(sizeof remixapi_LightInfoRectEXT == 104);
783800
}
784801

@@ -799,6 +816,7 @@ namespace remix {
799816
direction = { 0.0f, 0.0f, 1.0f };
800817
shaping_hasvalue = false;
801818
shaping_value = detail::defaultLightShaping();
819+
volumetricRadianceScale = 1.0f;
802820
static_assert(sizeof remixapi_LightInfoDiskEXT == 104);
803821
}
804822

@@ -815,7 +833,8 @@ namespace remix {
815833
radius = 1.0f;
816834
axis = { 1.0f, 0.0f, 0.0f };
817835
axisLength = 1.0f;
818-
static_assert(sizeof remixapi_LightInfoCylinderEXT == 48);
836+
volumetricRadianceScale = 1.0f;
837+
static_assert(sizeof remixapi_LightInfoCylinderEXT == 56);
819838
}
820839
};
821840

@@ -825,7 +844,8 @@ namespace remix {
825844
pNext = nullptr;
826845
direction = { 0.0f, -1.0f, 0.0f };
827846
angularDiameterDegrees = 0.5f;
828-
static_assert(sizeof remixapi_LightInfoDistantEXT == 32);
847+
volumetricRadianceScale = 1.0f;
848+
static_assert(sizeof remixapi_LightInfoDistantEXT == 40);
829849
}
830850
};
831851

ext/remix/remix_c.h

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
2+
* Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved.
33
*
44
* Permission is hereby granted, free of charge, to any person obtaining a
55
* copy of this software and associated documentation files (the "Software"),
@@ -53,8 +53,8 @@
5353
#define REMIXAPI_VERSION_GET_PATCH(version) (((uint64_t)(version) ) & (uint64_t)0xFFFF)
5454

5555
#define REMIXAPI_VERSION_MAJOR 0
56-
#define REMIXAPI_VERSION_MINOR 4
57-
#define REMIXAPI_VERSION_PATCH 2
56+
#define REMIXAPI_VERSION_MINOR 5
57+
#define REMIXAPI_VERSION_PATCH 1
5858

5959

6060
// External
@@ -218,6 +218,11 @@ extern "C" {
218218
float subsurfaceMeasurementDistance;
219219
remixapi_Float3D subsurfaceSingleScatteringAlbedo;
220220
float subsurfaceVolumetricAnisotropy;
221+
remixapi_Bool subsurfaceDiffusionProfile;
222+
remixapi_Float3D subsurfaceRadius;
223+
float subsurfaceRadiusScale;
224+
float subsurfaceMaxSampleRadius;
225+
remixapi_Path subsurfaceRadiusTexture;
221226
} remixapi_MaterialInfoOpaqueSubsurfaceEXT;
222227

223228
typedef struct remixapi_MaterialInfoTranslucentEXT {
@@ -409,6 +414,7 @@ extern "C" {
409414
REMIXAPI_INSTANCE_CATEGORY_BIT_THIRD_PERSON_PLAYER_BODY = 1 << 19,
410415
REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_BAKED_LIGHTING = 1 << 20,
411416
REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_ALPHA_CHANNEL = 1 << 21,
417+
REMIXAPI_INSTANCE_CATEGORY_BIT_IGNORE_TRANSPARENCY_LAYER = 1 << 22,
412418
} remixapi_InstanceCategoryBit;
413419

414420
typedef uint32_t remixapi_InstanceCategoryFlags;
@@ -442,6 +448,7 @@ extern "C" {
442448
float radius;
443449
remixapi_Bool shaping_hasvalue;
444450
remixapi_LightInfoLightShaping shaping_value;
451+
float volumetricRadianceScale;
445452
} remixapi_LightInfoSphereEXT;
446453

447454
typedef struct remixapi_LightInfoRectEXT {
@@ -459,6 +466,7 @@ extern "C" {
459466
remixapi_Float3D direction;
460467
remixapi_Bool shaping_hasvalue;
461468
remixapi_LightInfoLightShaping shaping_value;
469+
float volumetricRadianceScale;
462470
} remixapi_LightInfoRectEXT;
463471

464472
typedef struct remixapi_LightInfoDiskEXT {
@@ -476,6 +484,7 @@ extern "C" {
476484
remixapi_Float3D direction;
477485
remixapi_Bool shaping_hasvalue;
478486
remixapi_LightInfoLightShaping shaping_value;
487+
float volumetricRadianceScale;
479488
} remixapi_LightInfoDiskEXT;
480489

481490
typedef struct remixapi_LightInfoCylinderEXT {
@@ -486,6 +495,7 @@ extern "C" {
486495
// The "center" axis of the Cylinder Light. Must be normalized.
487496
remixapi_Float3D axis;
488497
float axisLength;
498+
float volumetricRadianceScale;
489499
} remixapi_LightInfoCylinderEXT;
490500

491501
typedef struct remixapi_LightInfoDistantEXT {
@@ -494,6 +504,7 @@ extern "C" {
494504
// The direction the Distant Light is pointing in. Must be normalized.
495505
remixapi_Float3D direction;
496506
float angularDiameterDegrees;
507+
float volumetricRadianceScale;
497508
} remixapi_LightInfoDistantEXT;
498509

499510
typedef struct remixapi_LightInfoDomeEXT {
@@ -512,19 +523,20 @@ extern "C" {
512523
void* pNext;
513524
remixapi_StructType lightType;
514525
remixapi_Transform transform;
515-
const float* pRadius; // "radius"
516-
const float* pWidth; // "width"
517-
const float* pHeight; // "height"
518-
const float* pLength; // "length"
519-
const float* pAngleRadians; // "angle"
520-
const remixapi_Bool* pEnableColorTemp; // "enableColorTemperature"
521-
const remixapi_Float3D* pColor; // "color"
522-
const float* pColorTemp; // "colorTemperature"
523-
const float* pExposure; // "exposure"
524-
const float* pIntensity; // "intensity"
525-
const float* pConeAngleRadians; // "shaping:cone:angle"
526-
const float* pConeSoftness; // "shaping:cone:softness"
527-
const float* pFocus; // "shaping:focus"
526+
const float* pRadius; // "radius"
527+
const float* pWidth; // "width"
528+
const float* pHeight; // "height"
529+
const float* pLength; // "length"
530+
const float* pAngleRadians; // "angle"
531+
const remixapi_Bool* pEnableColorTemp; // "enableColorTemperature"
532+
const remixapi_Float3D* pColor; // "color"
533+
const float* pColorTemp; // "colorTemperature"
534+
const float* pExposure; // "exposure"
535+
const float* pIntensity; // "intensity"
536+
const float* pConeAngleRadians; // "shaping:cone:angle"
537+
const float* pConeSoftness; // "shaping:cone:softness"
538+
const float* pFocus; // "shaping:focus"
539+
const float* pVolumetricRadianceScale; // "volumetric_radiance_scale"
528540
} remixapi_LightInfoUSDEXT;
529541

530542
typedef struct remixapi_LightInfo {

0 commit comments

Comments
 (0)