mirror of
https://github.com/sal063/AC6_recomp
synced 2026-08-21 23:00:53 -04:00
fix(gpu): default point-list expansion in VS for particles/trails
D3D12 previously assumed native point-list + geometry-shader expansion; that path can drop or rasterize points incorrectly (invisible missile trails). Default to the shared triangle-strip VS expansion path with an init-time CVar override. Vulkan: default vulkan_force_expand_point_sprites_in_vs to true for the same behavior on non-D3D12 hosts. Made-with: Cursor
This commit is contained in:
@@ -108,6 +108,7 @@ REXCVAR_DECLARE(bool, d3d12_dxbc_disasm_dxilconv);
|
||||
REXCVAR_DECLARE(int32_t, d3d12_pipeline_creation_threads);
|
||||
REXCVAR_DECLARE(bool, d3d12_tessellation_wireframe);
|
||||
REXCVAR_DECLARE(bool, d3d12_tiled_shared_memory);
|
||||
REXCVAR_DECLARE(bool, d3d12_expand_point_sprites_in_vs);
|
||||
REXCVAR_DECLARE(std::string, render_target_path_d3d12);
|
||||
// Legacy backend compatibility aliases for shared readback controls.
|
||||
REXCVAR_DECLARE(bool, d3d12_readback_memexport);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include <rex/assert.h>
|
||||
#include <rex/cvar.h>
|
||||
#include <rex/graphics/d3d12/command_processor.h>
|
||||
#include <rex/graphics/d3d12/deferred_command_list.h>
|
||||
#include <rex/graphics/d3d12/primitive_processor.h>
|
||||
@@ -22,6 +23,13 @@
|
||||
#include <rex/ui/d3d12/d3d12_provider.h>
|
||||
#include <rex/ui/d3d12/d3d12_util.h>
|
||||
|
||||
REXCVAR_DEFINE_BOOL(
|
||||
d3d12_expand_point_sprites_in_vs, true, "GPU/D3D12",
|
||||
"Expand Xbox point lists as triangle strips in the vertex shader instead of the host "
|
||||
"point-list + geometry-shader path. Fixes missing trails/particles on some titles and "
|
||||
"drivers where native point expansion is culled or rasterized incorrectly.")
|
||||
.lifecycle(rex::cvar::Lifecycle::kInitOnly);
|
||||
|
||||
namespace rex::graphics::d3d12 {
|
||||
|
||||
D3D12PrimitiveProcessor::~D3D12PrimitiveProcessor() {
|
||||
@@ -29,7 +37,8 @@ D3D12PrimitiveProcessor::~D3D12PrimitiveProcessor() {
|
||||
}
|
||||
|
||||
bool D3D12PrimitiveProcessor::Initialize() {
|
||||
if (!InitializeCommon(true, false, false, true, true, true)) {
|
||||
const bool point_sprites_native_without_vs = !REXCVAR_GET(d3d12_expand_point_sprites_in_vs);
|
||||
if (!InitializeCommon(true, false, false, true, point_sprites_native_without_vs, true)) {
|
||||
Shutdown();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <rex/logging.h>
|
||||
#include <rex/ui/vulkan/util.h>
|
||||
|
||||
REXCVAR_DEFINE_BOOL(vulkan_force_expand_point_sprites_in_vs, false, "GPU/Vulkan",
|
||||
REXCVAR_DEFINE_BOOL(vulkan_force_expand_point_sprites_in_vs, true, "GPU/Vulkan",
|
||||
"Force Vulkan point sprite expansion in the vertex shader, even when geometry "
|
||||
"shaders are available")
|
||||
.lifecycle(rex::cvar::Lifecycle::kInitOnly);
|
||||
|
||||
Reference in New Issue
Block a user