wip(render3d): one frame recording while one draws on Vulkan (double-buffered ring and pools), R3D_VK_LABELS, grass measuring switches (R3D_NOGRASS, R3D_BLADES, R3D_GRASS_S0/D0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-27 14:32:01 +03:00
parent 4e2087d6eb
commit f815f3e3cf
8 changed files with 100 additions and 19 deletions

View file

@ -36,6 +36,7 @@ property Layer {
last_cam: floats,
rough: float = 0.0,
blade: bool = false,
grass: bool = false, # ground-cover grass the game may hand to the GPU blades (R3D_NOGRASS skips it)
flower: bool = false,
card: bool = false,
cheap: bool = false, # distant cover: no shadows, no wind, flat lighting
@ -1134,6 +1135,7 @@ function scatter_draw_depth(render3d_st: mut Render3dState) -> void {
for i in 0 .. len(render3d_st.sc_layers) {
let l = render3d_st.sc_layers[i]
if not l.foliage or l.blade or l.flower { continue }
if render3d_st.sc_skip_grass and l.grass { continue }
if render3d_st.r3d_no_trees and l.imp != null { continue }
layer_update(render3d_st, l)
if l.n_lods > 1 and l.g_on {
@ -1155,6 +1157,7 @@ function scatter_draw(render3d_st: mut Render3dState) -> void {
if render3d_st.sc_skip_blade and l.blade { continue }
if render3d_st.sc_skip_flower and l.flower { continue }
if render3d_st.sc_skip_card and l.card { continue }
if render3d_st.sc_skip_grass and l.grass { continue }
if render3d_st.r3d_no_trees and l.imp != null and not l.card { continue }
layer_update(render3d_st, l)
layer_draw_near(render3d_st, l, false, null, false)
@ -1172,6 +1175,7 @@ function scatter_draw_casters(render3d_st: mut Render3dState, light_vp: floats)
let l = render3d_st.sc_layers[i]
if render3d_st.sc_skip_blade and l.blade { continue }
if render3d_st.sc_skip_card and l.card { continue }
if render3d_st.sc_skip_grass and l.grass { continue }
if render3d_st.r3d_no_trees and l.imp != null and not l.card { continue }
layer_update(render3d_st, l)
if l.imp != null {