diff --git a/src/pp/pp_vis/pp_vis_core.c b/src/pp/pp_vis/pp_vis_core.c index e3223926..9212e516 100644 --- a/src/pp/pp_vis/pp_vis_core.c +++ b/src/pp/pp_vis/pp_vis_core.c @@ -2753,7 +2753,7 @@ void V_TickForever(WaveLaneCtx *lane) V_Window *window = PushStruct(perm, V_Window); window->panel = panel; window->key = UI_RandKey(); // TODO: Don't use random keys - window->is_ent_window = 1; + window->is_prefab_window = 1; DllQueuePushNP(panel->first_window, panel->last_window, window, next_in_panel, prev_in_panel); ++panel->windows_count; ++V.windows_count; @@ -3077,9 +3077,9 @@ void V_TickForever(WaveLaneCtx *lane) { tab_name = Lit("Tiles"); } - else if (window->is_ent_window) + else if (window->is_prefab_window) { - tab_name = Lit("Entities"); + tab_name = Lit("Prefabs"); } else { @@ -3349,9 +3349,9 @@ void V_TickForever(WaveLaneCtx *lane) } ////////////////////////////// - //- Build spawn window + //- Build prefab window - if (window->is_ent_window) + if (window->is_prefab_window) { } } @@ -4612,18 +4612,18 @@ void V_TickForever(WaveLaneCtx *lane) } frame->emitters = G_PushStructuredBufferRef(frame->gpu_arena, gpu_emitters, V_Emitter); - // Upload gpu frame data + // Upload gpu frame { // Gpu frame - G_ResourceHandle gpu_frame = G_PushBufferFromCpuCopy( + G_ResourceHandle gpu_frame_res = G_PushBufferFromCpuCopy( frame->gpu_arena, frame->cl, StringFromStruct(&frame->shared_frame), .name = StringF(frame->arena, "Gpu frame [%F]", FmtSint(frame->tick)) ); - G_StructuredBufferRef gpu_frame_ref = G_PushStructuredBufferRef(frame->gpu_arena, gpu_frame, V_SharedFrame); + G_StructuredBufferRef gpu_frame = G_PushStructuredBufferRef(frame->gpu_arena, gpu_frame_res, V_SharedFrame); // Set constants - G_SetConstant(frame->cl, V_ShaderConst_Frame, gpu_frame_ref); + G_SetConstant(frame->cl, V_ShaderConst_Frame, gpu_frame); G_SetConstant(frame->cl, V_ShaderConst_NoiseTex, G_BasicNoiseTexture()); } @@ -4646,11 +4646,11 @@ void V_TickForever(WaveLaneCtx *lane) G_Compute(frame->cl, V_ClearParticlesCS, V_ThreadGroupSizeFromBufferSize(V_ParticlesCap)); } - // Clear albedo RT - G_ClearRenderTarget(frame->cl, albedo_target, VEC4(0, 0, 0, 0)); - // Discard screen RT G_DiscardRenderTarget(frame->cl, screen_target); + + // Clear albedo RT + G_ClearRenderTarget(frame->cl, albedo_target, VEC4(0, 0, 0, 0)); } // Sync diff --git a/src/pp/pp_vis/pp_vis_core.h b/src/pp/pp_vis/pp_vis_core.h index e1cee824..b6ebc544 100644 --- a/src/pp/pp_vis/pp_vis_core.h +++ b/src/pp/pp_vis/pp_vis_core.h @@ -202,7 +202,7 @@ Struct(V_Window) UI_Key key; b32 is_tile_window; - b32 is_ent_window; + b32 is_prefab_window; }; //////////////////////////////////////////////////////////// diff --git a/src/pp/pp_vis/pp_vis_gpu.g b/src/pp/pp_vis/pp_vis_gpu.g index aa3a26c6..5f4ed8e4 100644 --- a/src/pp/pp_vis/pp_vis_gpu.g +++ b/src/pp/pp_vis/pp_vis_gpu.g @@ -25,8 +25,7 @@ ComputeShader2D(V_PrepareShadeCS, 8, 8) { V_SharedFrame frame = G_Dereference(V_ShaderConst_Frame)[0]; RWTexture2D shade = G_Dereference(frame.shade_rw); - Vec2 shade_pos = SV_DispatchThreadID; - + Vec2 shade_pos = SV_DispatchThreadID + 0.5; if (all(shade_pos < countof(shade))) { // Clear shade @@ -40,7 +39,7 @@ ComputeShader2D(V_PrepareCellsCS, 8, 8) V_SharedFrame frame = G_Dereference(V_ShaderConst_Frame)[0]; RWTexture2D cells = G_Dereference(frame.cells); RWTexture2D drynesses = G_Dereference(frame.drynesses); - Vec2 cells_pos = SV_DispatchThreadID; + Vec2 cells_pos = SV_DispatchThreadID + 0.5; if (all(cells_pos < countof(cells))) { // Clear cell @@ -306,7 +305,7 @@ ComputeShader2D(V_ShadeCS, 8, 8) RWTexture2D drynesses = G_Dereference(frame.drynesses); SamplerState clamp_sampler = G_Dereference(frame.pt_clamp_sampler); - Vec2 shade_pos = SV_DispatchThreadID + Vec2(0.5, 0.5); + Vec2 shade_pos = SV_DispatchThreadID + 0.5; Vec2 world_pos = mul(frame.af.shade_to_world, Vec3(shade_pos, 1)); Vec2 cell_pos = mul(frame.af.world_to_cell, Vec3(world_pos, 1)); Vec2 tile_pos = mul(frame.af.world_to_tile, Vec3(world_pos, 1));