Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #60

Merged
merged 15 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
* 1.5.1

- Fog now driven from C++ (and, by extension, the editor)

- Improved UX when opening brush menu for the first time

- Fixed the preview jank when using a layered brush.
The preview should now appear stable in the viewport

- Tuned some gBuffer texture storage resolution, transparency buffer storage resolution, & turned down default shadow quality
This is in an effort to get mid-end cards running at >60fps on 4k

* 1.5.0

- @Shawnecy Chased down a divide by zero in the lighting shader
Expand Down
2 changes: 1 addition & 1 deletion external/bonsai_stdlib
2 changes: 1 addition & 1 deletion generated/block_array_h_texture_688856411.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// external/bonsai_stdlib/src/texture.h:19:0
// external/bonsai_stdlib/src/texture.h:35:0

struct texture_ptr_block
{
Expand Down
2 changes: 1 addition & 1 deletion generated/block_array_h_texture_688856411_0.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// external/bonsai_stdlib/src/texture.h:16:0
// external/bonsai_stdlib/src/texture.h:32:0

struct texture_block
{
Expand Down
2 changes: 1 addition & 1 deletion generated/block_array_voxel_stack_element_688853862.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/world_chunk.cpp:4051:0
// src/engine/world_chunk.cpp:4054:0

struct voxel_stack_element_block
{
Expand Down
2 changes: 1 addition & 1 deletion generated/do_editor_ui_for_compound_type_engine_debug.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:413:0
// src/engine/editor.cpp:416:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, engine_debug *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:434:0
// src/engine/editor.cpp:437:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, engine_resources *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down
2 changes: 1 addition & 1 deletion generated/do_editor_ui_for_compound_type_engine_settings.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:431:0
// src/engine/editor.cpp:434:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, engine_settings *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down
112 changes: 112 additions & 0 deletions generated/do_editor_ui_for_compound_type_g_buffer_render_group.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
// src/engine/editor.cpp:404:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, g_buffer_render_group *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
{
if (Element)
{
// NOTE(Jesse): This is wacky as fuck, but it's a pretty easy way to
// support not drawing the toggl-y thing if we just want to dump the members.
b32 DrawChildren = True;
b32 DidToggle = False;
if (Name.Count)
{
if (ToggleButton(Ui, FSz("v %S", Name), FSz("> %S", Name), UiId(Window, "toggle g_buffer_render_group", Element), &DefaultUiRenderParams_Generic))
{
DidToggle = True;
PushNewRow(Ui);
}
else
{
DrawChildren = False;
}
}

if (DrawChildren)
{
PushTableStart(Ui);
if (DidToggle) { OPEN_INDENT_FOR_TOGGLEABLE_REGION(); }
DoEditorUi(Ui,
Window,
&Element->FBO,
CSz("FBO"),
Params
);






DoEditorUi(Ui,
Window,
&Element->Textures,
CSz("Textures"),
Params
);






DoEditorUi(Ui,
Window,
&Element->gBufferShader,
CSz("gBufferShader"),
Params
);






DoEditorUi(Ui,
Window,
&Element->InverseViewMatrix,
CSz("InverseViewMatrix"),
Params
);






DoEditorUi(Ui,
Window,
&Element->InverseProjectionMatrix,
CSz("InverseProjectionMatrix"),
Params
);






DoEditorUi(Ui,
Window,
&Element->ViewProjection,
CSz("ViewProjection"),
Params
);
if (DidToggle) { CLOSE_INDENT_FOR_TOGGLEABLE_REGION(); }
PushTableEnd(Ui);
}
else
{
PushNewRow(Ui);
}

}
else
{
PushColumn(Ui, Name, Params);
PushColumn(Ui, CSz("(null)"), Params);
PushNewRow(Ui);
}

}

39 changes: 38 additions & 1 deletion generated/do_editor_ui_for_compound_type_graphics.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:404:0
// src/engine/editor.cpp:407:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, graphics *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down Expand Up @@ -38,6 +38,43 @@ DoEditorUi(renderer_2d *Ui, window_layout *Window, graphics *Element, cs Name, u



DoEditorUi(Ui,
Window,
&Element->SunBasis,
CSz("SunBasis"),
Params
);






DoEditorUi(Ui,
Window,
&Element->FogPower,
CSz("FogPower"),
Params
);





PushNewRow(Ui);

DoEditorUi(Ui,
Window,
&Element->FogColor,
CSz("FogColor"),
Params
);






DoEditorUi(Ui,
Window,
&Element->SkyColor,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:428:0
// src/engine/editor.cpp:431:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, graphics_settings *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down
51 changes: 50 additions & 1 deletion generated/do_editor_ui_for_compound_type_level_editor.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:419:0
// src/engine/editor.cpp:422:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, level_editor *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down Expand Up @@ -111,6 +111,55 @@ DoEditorUi(renderer_2d *Ui, window_layout *Window, level_editor *Element, cs Nam



DoEditorUi(Ui,
Window,
Cast(b8*,&Element->RootChunkNeedsNewMesh),
CSz("RootChunkNeedsNewMesh"),
&DefaultUiRenderParams_Checkbox
);





PushNewRow(Ui);

DoEditorUi(Ui,
Window,
&Element->MostRecentSelectionRegionMin,
CSz("MostRecentSelectionRegionMin"),
Params
);






DoEditorUi(Ui,
Window,
&Element->NextSelectionRegionMin,
CSz("NextSelectionRegionMin"),
Params
);






DoEditorUi(Ui,
Window,
&Element->EditorPreviewRegionMin,
CSz("EditorPreviewRegionMin"),
Params
);






DoEditorUi(Ui,
Window,
&Element->EngineDebugViewModeToggleBits,
Expand Down
2 changes: 1 addition & 1 deletion generated/do_editor_ui_for_compound_type_render_debug.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:407:0
// src/engine/editor.cpp:410:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, render_debug *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down
2 changes: 1 addition & 1 deletion generated/do_editor_ui_for_compound_type_ui_debug.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:410:0
// src/engine/editor.cpp:413:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, ui_debug *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down
2 changes: 1 addition & 1 deletion generated/do_editor_ui_for_enum_engine_debug_view_mode.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:416:0
// src/engine/editor.cpp:419:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, engine_debug_view_mode *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down
2 changes: 1 addition & 1 deletion generated/do_editor_ui_for_enum_resolution_setting.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:422:0
// src/engine/editor.cpp:425:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, resolution_setting *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down
2 changes: 1 addition & 1 deletion generated/do_editor_ui_for_enum_shader_language_setting.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/editor.cpp:425:0
// src/engine/editor.cpp:428:0

link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, shader_language_setting *Element, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic)
Expand Down
1 change: 0 additions & 1 deletion generated/do_editor_ui_for_radio_enum_world_edit_tool.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ RadioButtonGroup_world_edit_tool( renderer_2d *Ui,
{ CSz("Brush"), UiId(Window, Cast(void*, Element), Cast(void*, "world_edit_tool WorldEdit_Tool_Brush")), WorldEdit_Tool_Brush },
{ CSz("Eyedropper"), UiId(Window, Cast(void*, Element), Cast(void*, "world_edit_tool WorldEdit_Tool_Eyedropper")), WorldEdit_Tool_Eyedropper },
{ CSz("BlitEntity"), UiId(Window, Cast(void*, Element), Cast(void*, "world_edit_tool WorldEdit_Tool_BlitEntity")), WorldEdit_Tool_BlitEntity },
{ CSz("StandingSpots"), UiId(Window, Cast(void*, Element), Cast(void*, "world_edit_tool WorldEdit_Tool_StandingSpots")), WorldEdit_Tool_StandingSpots },
};

ui_toggle_button_handle_buffer ButtonBuffer = {
Expand Down
22 changes: 22 additions & 0 deletions generated/do_editor_ui_for_vector_type_688873645.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,26 @@ DoEditorUi(renderer_2d *Ui, window_layout *Window, Quaternion *Value, cs Name, u

PushNewRow(Ui);
}
link_internal void
DoEditorUi(renderer_2d *Ui, window_layout *Window, m4 *Value, cs Name, ui_render_params *Params = &DefaultUiRenderParams_Generic, EDITOR_UI_VALUE_RANGE_PROTO_DEFAULTS)
{
/* PushTableStart(Ui); */
if (Name.Count) { PushColumn(Ui, CS(Name), &DefaultUiRenderParams_Blank); }

if (Value)
{
u32 Start = StartColumn(Ui, &DefaultUiRenderParams_Blank);
PushTableStart(Ui);
DoEditorUi(Ui, Window, &Value->E[0], {}, Params, EDITOR_UI_VALUE_RANGE_INSTANCE_NAMES );
DoEditorUi(Ui, Window, &Value->E[1], {}, Params, EDITOR_UI_VALUE_RANGE_INSTANCE_NAMES );
DoEditorUi(Ui, Window, &Value->E[2], {}, Params, EDITOR_UI_VALUE_RANGE_INSTANCE_NAMES );
DoEditorUi(Ui, Window, &Value->E[3], {}, Params, EDITOR_UI_VALUE_RANGE_INSTANCE_NAMES );
PushTableEnd(Ui);
/* PushNewRow(Ui); */
EndColumn(Ui, Start);
}
/* PushTableEnd(Ui); */

PushNewRow(Ui);
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/world_chunk.cpp:4364:0
// src/engine/world_chunk.cpp:4367:0

random_series ColorEntropy = {4654376543246};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/world_chunk.cpp:4604:0
// src/engine/world_chunk.cpp:4607:0

random_series ColorEntropy = {4654376543246};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/world_chunk.cpp:4588:0
// src/engine/world_chunk.cpp:4591:0

random_series ColorEntropy = {4654376543246};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/world_chunk.cpp:4468:0
// src/engine/world_chunk.cpp:4471:0

random_series ColorEntropy = {4654376543246};

Expand Down
2 changes: 1 addition & 1 deletion generated/gen_constructor_voxel_stack_element.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/world_chunk.cpp:4048:0
// src/engine/world_chunk.cpp:4051:0

link_internal voxel_stack_element
VoxelStackElement( v3i VoxSimP , voxel_rule_direction Dir )
Expand Down
2 changes: 1 addition & 1 deletion generated/generate_cursor_voxel_stack_element.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/world_chunk.cpp:4054:0
// src/engine/world_chunk.cpp:4057:0

struct voxel_stack_element_cursor
{
Expand Down
2 changes: 1 addition & 1 deletion generated/rectalinear_iteration_pattern_398799212.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/world_chunk.cpp:4324:0
// src/engine/world_chunk.cpp:4327:0

DimIterator(x, y, z, UpdateDim)
{
Expand Down
2 changes: 1 addition & 1 deletion generated/rectalinear_iteration_pattern_416827956.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// src/engine/world_chunk.cpp:4495:0
// src/engine/world_chunk.cpp:4498:0

DimIterator(x, y, z, UpdateDim)
{
Expand Down
Loading
Loading