DEADSOFTWARE

gl: fix particle size with r_scale_resolution>1
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 13 Feb 2023 00:53:19 +0000 (03:53 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 9 Jun 2023 09:10:33 +0000 (12:10 +0300)
src/game/renders/opengl/r_map.pas

index c9a4d3370393095ea4e2f363027b357ea1c13b0e..eb69057102cc93d82fcbc59885aaac33f8a8acf7 100644 (file)
@@ -1110,15 +1110,16 @@ implementation
   end;
 
   procedure r_Map_DrawParticles (x, y, w, h: Integer);
-    var i, fx, fy: Integer;
+    var i, fx, fy: Integer; factor: Single;
   begin
     if gpart_dbg_enabled and (Particles <> nil) then
     begin
       r_Draw_EnableTexture2D(false);
-      if (g_dbg_scale < 0.6) then
+      factor := r_pixel_scale * g_dbg_scale;
+      if factor < 0.6 then
         glPointSize(1)
-      else if (g_dbg_scale > 1.3) then
-        glPointSize(g_dbg_scale + 1)
+      else if factor > 1.3 then
+        glPointSize(factor + 1)
       else
         glPointSize(2);
       glDisable(GL_POINT_SMOOTH);