1
1
/*
2
- * Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
2
+ * Copyright (c) 2023-2024 , NVIDIA CORPORATION. All rights reserved.
3
3
*
4
4
* Permission is hereby granted, free of charge, to any person obtaining a
5
5
* copy of this software and associated documentation files (the "Software"),
@@ -365,23 +365,30 @@ namespace remix {
365
365
subsurfaceSingleScatteringAlbedoTexture = {};
366
366
subsurfaceTransmittanceColor = { 0 .5f , 0 .5f , 0 .5f };
367
367
subsurfaceMeasurementDistance = 0 .0f ;
368
- subsurfaceSingleScatteringAlbedo = { 0 .5f , 0 .5f , 0 .5f };;
368
+ subsurfaceSingleScatteringAlbedo = { 0 .5f , 0 .5f , 0 .5f };
369
369
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 );
371
376
}
372
377
373
378
MaterialInfoOpaqueSubsurfaceEXT (const MaterialInfoOpaqueSubsurfaceEXT& other)
374
379
: remixapi_MaterialInfoOpaqueSubsurfaceEXT(other)
375
380
, cpp_subsurfaceTransmittanceTexture(other.cpp_subsurfaceTransmittanceTexture)
376
381
, cpp_subsurfaceThicknessTexture(other.cpp_subsurfaceThicknessTexture)
377
- , cpp_subsurfaceSingleScatteringAlbedoTexture(other.cpp_subsurfaceSingleScatteringAlbedoTexture) {
382
+ , cpp_subsurfaceSingleScatteringAlbedoTexture(other.cpp_subsurfaceSingleScatteringAlbedoTexture)
383
+ , cpp_subsurfaceRadiusTexture(other.cpp_subsurfaceRadiusTexture) {
378
384
cpp_fixPointers ();
379
385
}
380
386
MaterialInfoOpaqueSubsurfaceEXT (MaterialInfoOpaqueSubsurfaceEXT&& other) noexcept
381
387
: remixapi_MaterialInfoOpaqueSubsurfaceEXT(other)
382
388
, cpp_subsurfaceTransmittanceTexture(std::move(other.cpp_subsurfaceTransmittanceTexture))
383
389
, 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)) {
385
392
cpp_fixPointers ();
386
393
}
387
394
MaterialInfoOpaqueSubsurfaceEXT& operator =(const MaterialInfoOpaqueSubsurfaceEXT& other) {
@@ -392,6 +399,7 @@ namespace remix {
392
399
cpp_subsurfaceTransmittanceTexture = other.cpp_subsurfaceTransmittanceTexture ;
393
400
cpp_subsurfaceThicknessTexture = other.cpp_subsurfaceThicknessTexture ;
394
401
cpp_subsurfaceSingleScatteringAlbedoTexture = other.cpp_subsurfaceSingleScatteringAlbedoTexture ;
402
+ cpp_subsurfaceRadiusTexture = other.cpp_subsurfaceRadiusTexture ;
395
403
cpp_fixPointers ();
396
404
return *this ;
397
405
}
@@ -403,6 +411,7 @@ namespace remix {
403
411
cpp_subsurfaceTransmittanceTexture = std::move (other.cpp_subsurfaceTransmittanceTexture );
404
412
cpp_subsurfaceThicknessTexture = std::move (other.cpp_subsurfaceThicknessTexture );
405
413
cpp_subsurfaceSingleScatteringAlbedoTexture = std::move (other.cpp_subsurfaceSingleScatteringAlbedoTexture );
414
+ cpp_subsurfaceRadiusTexture = std::move (other.cpp_subsurfaceRadiusTexture );
406
415
cpp_fixPointers ();
407
416
return *this ;
408
417
}
@@ -419,18 +428,24 @@ namespace remix {
419
428
cpp_subsurfaceSingleScatteringAlbedoTexture = std::move (v);
420
429
subsurfaceSingleScatteringAlbedoTexture = cpp_subsurfaceSingleScatteringAlbedoTexture.c_str ();
421
430
}
431
+ void set_subsurfaceRadiusTexture (std::filesystem::path v) {
432
+ cpp_subsurfaceRadiusTexture = std::move (v);
433
+ subsurfaceRadiusTexture = cpp_subsurfaceRadiusTexture.c_str ();
434
+ }
422
435
423
436
private:
424
437
void cpp_fixPointers () {
425
438
subsurfaceTransmittanceTexture = cpp_subsurfaceTransmittanceTexture.c_str ();
426
439
subsurfaceThicknessTexture = cpp_subsurfaceThicknessTexture.c_str ();
427
440
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" );
429
443
}
430
444
431
445
std::filesystem::path cpp_subsurfaceTransmittanceTexture {};
432
446
std::filesystem::path cpp_subsurfaceThicknessTexture {};
433
447
std::filesystem::path cpp_subsurfaceSingleScatteringAlbedoTexture {};
448
+ std::filesystem::path cpp_subsurfaceRadiusTexture{};
434
449
};
435
450
436
451
struct MaterialInfoTranslucentEXT : remixapi_MaterialInfoTranslucentEXT {
@@ -759,6 +774,7 @@ namespace remix {
759
774
radius = 0 .05f ;
760
775
shaping_hasvalue = false ;
761
776
shaping_value = detail::defaultLightShaping ();
777
+ volumetricRadianceScale = 1 .0f ;
762
778
static_assert (sizeof remixapi_LightInfoSphereEXT == 64 );
763
779
}
764
780
@@ -779,6 +795,7 @@ namespace remix {
779
795
direction = { 0 .0f , 0 .0f , 1 .0f };
780
796
shaping_hasvalue = false ;
781
797
shaping_value = detail::defaultLightShaping ();
798
+ volumetricRadianceScale = 1 .0f ;
782
799
static_assert (sizeof remixapi_LightInfoRectEXT == 104 );
783
800
}
784
801
@@ -799,6 +816,7 @@ namespace remix {
799
816
direction = { 0 .0f , 0 .0f , 1 .0f };
800
817
shaping_hasvalue = false ;
801
818
shaping_value = detail::defaultLightShaping ();
819
+ volumetricRadianceScale = 1 .0f ;
802
820
static_assert (sizeof remixapi_LightInfoDiskEXT == 104 );
803
821
}
804
822
@@ -815,7 +833,8 @@ namespace remix {
815
833
radius = 1 .0f ;
816
834
axis = { 1 .0f , 0 .0f , 0 .0f };
817
835
axisLength = 1 .0f ;
818
- static_assert (sizeof remixapi_LightInfoCylinderEXT == 48 );
836
+ volumetricRadianceScale = 1 .0f ;
837
+ static_assert (sizeof remixapi_LightInfoCylinderEXT == 56 );
819
838
}
820
839
};
821
840
@@ -825,7 +844,8 @@ namespace remix {
825
844
pNext = nullptr ;
826
845
direction = { 0 .0f , -1 .0f , 0 .0f };
827
846
angularDiameterDegrees = 0 .5f ;
828
- static_assert (sizeof remixapi_LightInfoDistantEXT == 32 );
847
+ volumetricRadianceScale = 1 .0f ;
848
+ static_assert (sizeof remixapi_LightInfoDistantEXT == 40 );
829
849
}
830
850
};
831
851
0 commit comments