@@ -150,7 +150,7 @@ struct GPUSettings
150150 float display_osd_scale = DEFAULT_OSD_SCALE;
151151 float display_osd_margin = 0 .0f ;
152152 float gpu_pgxp_tolerance = -1 .0f ;
153- float gpu_pgxp_depth_clear_threshold = DEFAULT_GPU_PGXP_DEPTH_THRESHOLD / GPU_PGXP_DEPTH_THRESHOLD_SCALE ;
153+ float gpu_pgxp_depth_clear_threshold = 0 . 0f ;
154154
155155 // texture replacements
156156 struct TextureReplacementSettings
@@ -209,6 +209,8 @@ struct GPUSettings
209209 std::string overlay_image_path;
210210
211211 float GetDisplayAspectRatioValue () const ;
212+ float GetPGXPDepthClearThreshold () const ;
213+ void SetPGXPDepthClearThreshold (float value);
212214
213215 ALWAYS_INLINE bool IsUsingSoftwareRenderer () const { return (gpu_renderer == GPURenderer::Software); }
214216 ALWAYS_INLINE bool IsUsingAccurateBlending () const { return (gpu_accurate_blending && !gpu_true_color); }
@@ -220,14 +222,6 @@ struct GPUSettings
220222
221223 ALWAYS_INLINE bool UsingPGXPCPUMode () const { return gpu_pgxp_enable && gpu_pgxp_cpu; }
222224 ALWAYS_INLINE bool UsingPGXPDepthBuffer () const { return gpu_pgxp_enable && gpu_pgxp_depth_buffer; }
223- ALWAYS_INLINE float GetPGXPDepthClearThreshold () const
224- {
225- return gpu_pgxp_depth_clear_threshold * GPU_PGXP_DEPTH_THRESHOLD_SCALE;
226- }
227- ALWAYS_INLINE void SetPGXPDepthClearThreshold (float value)
228- {
229- gpu_pgxp_depth_clear_threshold = value / GPU_PGXP_DEPTH_THRESHOLD_SCALE;
230- }
231225
232226 static constexpr GPURenderer DEFAULT_GPU_RENDERER = GPURenderer::Automatic;
233227 static constexpr GPUTextureFilter DEFAULT_GPU_TEXTURE_FILTER = GPUTextureFilter::Nearest;
@@ -236,7 +230,7 @@ struct GPUSettings
236230 static constexpr GPUWireframeMode DEFAULT_GPU_WIREFRAME_MODE = GPUWireframeMode::Disabled;
237231 static constexpr GPUDumpCompressionMode DEFAULT_GPU_DUMP_COMPRESSION_MODE = GPUDumpCompressionMode::ZstDefault;
238232 static constexpr float DEFAULT_GPU_PGXP_DEPTH_THRESHOLD = 300 .0f ;
239- static constexpr float GPU_PGXP_DEPTH_THRESHOLD_SCALE = 4096 .0f ;
233+ static constexpr float GPU_PGXP_DEPTH_THRESHOLD_SCALE = 65536 .0f ;
240234
241235 static constexpr DisplayDeinterlacingMode DEFAULT_DISPLAY_DEINTERLACING_MODE = DisplayDeinterlacingMode::Progressive;
242236 static constexpr DisplayCropMode DEFAULT_DISPLAY_CROP_MODE = DisplayCropMode::Overscan;
0 commit comments