Skip to content

Commit 0a26d8a

Browse files
authored
Merge branch 'main' into main
2 parents c8fd250 + 5ba1821 commit 0a26d8a

18 files changed

+465
-258
lines changed

RtxOptions.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ Tables below enumerate all the options and their defaults set by RTX Remix. Note
280280
|rtx.fogIgnoreSky|bool|False|If true, sky draw calls will be skipped when searching for the D3D9 fog values\.|
281281
|rtx.forceCameraJitter|bool|False|Force enables camera jitter frame to frame\.|
282282
|rtx.forceCutoutAlpha|float|0.5|When an object is added to the cutout textures list it will have a cutout alpha mode forced on it, using this value for the alpha test\.<br>This is meant to improve the look of some legacy mode materials using low\-resolution textures and alpha blending instead of alpha cutout as this can cause blurry halos around edges due to the difficulty of handling this sort of blending in Remix\.<br>Such objects are generally better handled with actual replacement assets using fully opaque geometry replacements or alpha cutout with higher resolution textures, so this should only be relied on until proper replacements can be authored\.|
283+
|rtx.forceMergeAllMeshes|bool|False|Force merges all meshes into as few BLAS as possible\. This is generally not desirable for performance, but can be a useful debugging tool\.|
283284
|rtx.freeCam.keyMoveBack|unknown type|unknown type|Move back in free camera mode\.<br>Example override: 'rtx\.rtx\.freeCam\.keyMoveBack = P'|
284285
|rtx.freeCam.keyMoveDown|unknown type|unknown type|Move down in free camera mode\.<br>Example override: 'rtx\.rtx\.freeCam\.keyMoveDown = P'|
285286
|rtx.freeCam.keyMoveFaster|unknown type|unknown type|Move faster in free camera mode\.<br>Example override: 'rtx\.rtx\.freeCam\.keyMoveForward = RSHIFT'|
@@ -345,6 +346,7 @@ Tables below enumerate all the options and their defaults set by RTX Remix. Note
345346
|rtx.lightConversionSphereLightFixedRadius|float|4|The fixed radius in world units to use for legacy lights converted to sphere lights \(currently point and spot lights will convert to sphere lights\)\. Use caution with large light radii as many legacy lights will be placed close to geometry and intersect it, causing suboptimal light sampling performance or other visual artifacts \(lights clipping through walls, etc\)\.|
346347
|rtx.lights.debugDrawLightHashes|bool|False|Draw light hashes of all visible ob screen lights, when enableDebugMode=true\.|
347348
|rtx.lights.enableDebugMode|bool|False|Enables light debug visualization\.|
349+
|rtx.limitedBonesPerVertex|int|4|Limit the number of bone influences per vertex for replacement geometry\. D3D9 games were limited to 4, which is the default\. In rare instances you may want to increase this based on your preference for replaced assets\. This config only takes affect when set on startup via the rtx\.conf\.|
348350
|rtx.localtonemap.boostLocalContrast|bool|False|Boosts contrast on local features\.|
349351
|rtx.localtonemap.displayMip|int|0|Bottom mip level of tone map pyramid\.|
350352
|rtx.localtonemap.ditherMode|int|2|Local tonemap dither mode selection, local tonemapping dithering has the same functionality and values as the global tonemapping dithering option, see rtx\.tonemap\.ditherMode for a more in\-depth description\.<br>Supported enum values are 0 = None \(Disabled\), 1 = Spatial \(Enabled, Spatial dithering only\), 2 = SpatialTemporal \(Enabled, Spatial and temporal dithering\)\.<br>|
@@ -360,14 +362,15 @@ Tables below enumerate all the options and their defaults set by RTX Remix. Note
360362
|rtx.lowMemoryGpu|bool|False|Enables low memory mode, where we aggressively detune caches and streaming systems to accomodate the lower memory available\.|
361363
|rtx.maxAnisotropySamples|float|8|The maximum number of samples to use when anisotropic filtering is enabled\.<br>The actual max anisotropy used will be the minimum between this value and the hardware's maximum\. Higher values increase quality but will likely reduce performance\.|
362364
|rtx.maxFogDistance|float|65504||
363-
|rtx.maxPrimsInMergedBLAS|int|50000||
365+
|rtx.maxPrimsInMergedBLAS|int|50000|The maximum number of triangles for a mesh that can be in the merged BLAS\. |
364366
|rtx.minOpaqueDiffuseLobeSamplingProbability|float|0.25|The minimum allowed non\-zero value for opaque diffuse probability weights\.|
365367
|rtx.minOpaqueDiffuseTransmissionLobeSamplingProbability|float|0.25|The minimum allowed non\-zero value for thin opaque diffuse transmission probability weights\.|
366368
|rtx.minOpaqueOpacityTransmissionLobeSamplingProbability|float|0.25|The minimum allowed non\-zero value for opaque opacity probability weights\.|
367369
|rtx.minOpaqueSpecularLobeSamplingProbability|float|0.25|The minimum allowed non\-zero value for opaque specular probability weights\.|
368-
|rtx.minPrimsInStaticBLAS|int|1000||
370+
|rtx.minPrimsInDynamicBLAS|int|1000|The minimum number of triangles required to promote a mesh to it's own BLAS, otherwise it lands in the merged BLAS with multiple other meshes\.|
369371
|rtx.minTranslucentSpecularLobeSamplingProbability|float|0.3|The minimum allowed non\-zero value for translucent specular probability weights\.|
370372
|rtx.minTranslucentTransmissionLobeSamplingProbability|float|0.25|The minimum allowed non\-zero value for translucent transmission probability weights\.|
373+
|rtx.minimizeBlasMerging|bool|False|Minimize BLAS merging to the minimum possible, this option tries to give all meshes their own BLAS\. This is generally not desirable forperformance, but can be a useful debugging tool\.|
371374
|rtx.nativeMipBias|float|0|Specifies a mipmapping level bias to add to all material texture filtering\. Stacks with the upscaling mip bias\.<br>Mipmaps are determined based on how far away a texture is, using this can bias the desired level in a lower quality direction \(positive bias\), or a higher quality direction with potentially more aliasing \(negative bias\)\.<br>Note that mipmaps are also important for good spatial caching of textures, so too far negative of a mip bias may start to significantly affect performance, therefore changing this value is not recommended|
372375
|rtx.nearPlaneOverride|float|0.1|The near plane value to use for the Camera when the near plane override is enabled\.<br>Only takes effect when rtx\.enableNearPlaneOverride is enabled, see that option for more information about why this is useful\.|
373376
|rtx.neeCache.ageCullingSpeed|float|0.02|This threshold determines culling speed of an old triangle\. A triangle that is not detected for several frames will be deemed less important and culled quicker\.|
@@ -429,6 +432,7 @@ Tables below enumerate all the options and their defaults set by RTX Remix. Note
429432
|rtx.neuralRadianceCache.trainingTerminationHeuristicThreshold|float|0.25||
430433
|rtx.nisPreset|int|1|Adjusts NIS scaling factor, trades quality for performance\.|
431434
|rtx.numFramesToKeepBLAS|int|1||
435+
|rtx.numFramesToKeepInstances|int|1||
432436
|rtx.numFramesToKeepLights|int|100||
433437
|rtx.numGeometryProcessingThreads|int|2|The desired number of CPU threads to dedicate to geometry processing Will be limited by the number of CPU cores\. There may be some advantage to lowering this number in games which are fairly simple and use a low number of draw calls per frame\. The default was determined by looking at a game with around 2000 draw calls per frame, and with a reasonably high average triangle count per draw\.|
434438
|rtx.opacityMicromap.buildRequests.customFiltersForBillboards|bool|True|Applies custom filters for staged Billboard requests\.|
@@ -457,11 +461,12 @@ Tables below enumerate all the options and their defaults set by RTX Remix. Note
457461
|rtx.opacityMicromap.building.numFramesAtStartToBuildWithHighWorkload|int|0|Number of frames at start to to bake and build Opacity Micromaps with high workload multiplier\.<br>This is used for testing to decrease frame latency for Opacity Micromaps being ready\.|
458462
|rtx.opacityMicromap.building.splitBillboardGeometry|bool|True|Splits billboard geometry and corresponding Opacity Micromaps to quads for higher reuse\.<br>Games often batch instanced geometry that reuses same geometry and textures, such as for particles\.<br>Splitting such batches into unique subgeometries then allows higher reuse of build Opacity Micromaps\.|
459463
|rtx.opacityMicromap.building.subdivisionLevel|int|8|Opacity Micromap subdivision level per triangle\. |
464+
|rtx.opacityMicromap.cache.freeVidmemMBBudgetBuffer|int|384|A buffer of free memory on top of "minFreeVidmemMBToNotAllocate" to not budget OMMs for when calculating a new memory budget for OMMs\.<br>Note, "minFreeVidmemMBToNotAllocate" \+ "freeVidmemMBBudgetBuffer" is left untouched when calculating a new memory budget\.<br>However, once budget has been assigned to OMMs, the budget will not decrease until the free VidMem drops below "minFreeVidmemMBToNotAllocate"\.<br>Having this soft budget buffer protects OMM budget against runtime memory usage swings at high memory pressure<br>and keep it stable rather than the budget being continously bumped and decreased in oscilating manner,<br>which is detrimental since OMM build workloads are spread across multiple frames\.|
460465
|rtx.opacityMicromap.cache.hashInstanceIndexOnly|bool|False|Uses instance index as an Opacity Micromap hash\.|
461466
|rtx.opacityMicromap.cache.maxBudgetSizeMB|int|1536|Budget: Max Allowed Size \[MB\]\.|
462467
|rtx.opacityMicromap.cache.maxVidmemSizePercentage|float|0.15|Budget: Max Video Memory Size %\.|
463-
|rtx.opacityMicromap.cache.minBudgetSizeMB|int|512|Budget: Min Video Memory \[MB\] required\.<br>If the min amount is not available, then the budget will be set to 0\.|
464-
|rtx.opacityMicromap.cache.minFreeVidmemMBToNotAllocate|int|2560|Min Video Memory \[MB\] to keep free before allocating any for Opacity Micromaps\.|
468+
|rtx.opacityMicromap.cache.minBudgetSizeMB|int|128|Budget: Min Video Memory \[MB\] required\.<br>If the min amount is not available, then the budget will be set to 0\.|
469+
|rtx.opacityMicromap.cache.minFreeVidmemMBToNotAllocate|int|512|Min Video Memory \[MB\] to keep free before allocating any for Opacity Micromaps\.|
465470
|rtx.opacityMicromap.cache.minUsageFrameAgeBeforeEviction|int|900|Min Opacity Micromap usage frame age before eviction\.<br>Opacity Micromaps unused longer than this can be evicted when freeing up memory for new Opacity Micromaps\.|
466471
|rtx.opacityMicromap.enable|bool|True|Enables Opacity Micromaps for geometries with textures that have alpha cutouts\.<br>This is generally the case for geometries such as fences, foliage, particles, etc\. \.<br>Opacity Micromaps greatly speed up raytracing of partially opaque triangles\.<br>Examples of scenes that benefit a lot: multiple trees with a lot of foliage,<br>a ground densely covered with grass blades or steam consisting of many particles\.|
467472
|rtx.opacityMicromap.enableBakingArrays|bool|True|Enables baking of opacity textures into Opacity Micromap arrays per triangle\.|

src/dxvk/dxvk_buffer.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ namespace dxvk {
230230

231231
if (m_info.usage & VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR)
232232
result = std::max(result, (VkDeviceSize)m_device->properties().khrDeviceAccelerationStructureProperties.minAccelerationStructureScratchOffsetAlignment);
233+
234+
if (m_info.usage & VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT)
235+
result = std::max(result, VkDeviceSize(256u)); // https://vulkan.lunarg.com/doc/view/1.4.304.1/windows/antora/spec/latest/chapters/VK_EXT_opacity_micromap/micromaps.html#VUID-vkCmdBuildMicromapsEXT-pInfos-07515
233236

234237
if (m_info.usage & (VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT)) {
235238
result = std::max(result, devInfo.limits.minTexelBufferOffsetAlignment);

src/dxvk/imgui/dxvk_imgui.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -3243,7 +3243,11 @@ namespace dxvk {
32433243
ImGui::Checkbox("Enable Triangle Culling (Globally)", &RtxOptions::Get()->enableCullingObject());
32443244
ImGui::Checkbox("Enable Triangle Culling (Override Secondary Rays)", &RtxOptions::Get()->enableCullingInSecondaryRaysObject());
32453245
ImGui::Separator();
3246-
ImGui::DragInt("Min Prims in Static BLAS", &RtxOptions::Get()->minPrimsInStaticBLASObject(), 1.f, 100, 0);
3246+
ImGui::DragInt("Min Prims in Dynamic BLAS", &RtxOptions::minPrimsInDynamicBLASObject(), 1.f, 100, 0);
3247+
ImGui::DragInt("Max Prims in Merged BLAS", &RtxOptions::maxPrimsInMergedBLASObject(), 1.f, 100, 0);
3248+
ImGui::Checkbox("Force Merge All Meshes", &RtxOptions::forceMergeAllMeshesObject());
3249+
ImGui::Checkbox("Minimize BLAS Merging", &RtxOptions::minimizeBlasMergingObject());
3250+
ImGui::Separator();
32473251
ImGui::Checkbox("Portals: Virtual Instance Matching", &RtxOptions::Get()->useRayPortalVirtualInstanceMatchingObject());
32483252
ImGui::Checkbox("Portals: Fade In Effect", &RtxOptions::Get()->enablePortalFadeInEffectObject());
32493253
ImGui::Unindent();

0 commit comments

Comments
 (0)