Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3449a8e
WIP font render
kikonen Jun 12, 2024
5c55491
FIX font render
kikonen Jun 14, 2024
172b02a
FIX move fonts to text package
kikonen Jun 15, 2024
afe221f
FIX u_shadowIndex is redundant
kikonen Jun 21, 2024
a5f4a34
FIX shadow render fixes
kikonen Jun 21, 2024
8ba28bb
FIX more descriptive debug names for programs
kikonen Jun 21, 2024
bcf32c2
FIX simplify force logic of draw options
kikonen Jun 21, 2024
55c169b
FIX 4th shadow cascade is overkill and very expensive
kikonen Jun 21, 2024
a61c96b
FIX terrain priority was lost
kikonen Jun 21, 2024
dd0f03f
FIX logic to set "MAX_SHADOW_MAP_COUNT" for shader
kikonen Jun 21, 2024
161ad8d
FIX shadow is needed for further distance
kikonen Jun 21, 2024
95ed6d0
FIX pine_tree lods
kikonen Jun 21, 2024
c781c0c
FIX per vertex material is not used
kikonen Jun 20, 2024
ec03fb1
WIP changing mesh vao into "reserve + update" cycle
kikonen Jun 20, 2024
cf445ea
FIX added VertexVBO back (for comparison)
kikonen Jun 21, 2024
7b0595a
FIX smaller shadow map size
kikonen Jun 21, 2024
0e1c470
FIX try to ensure OIT buffer is cleared
kikonen Jun 21, 2024
f0793da
FIX no need to re-orthagonalize tangent
kikonen Jun 21, 2024
fd271c6
FIX VAO does not need to know about Mesh
kikonen Jun 21, 2024
2f2ccb2
FIX text draw using shared TextVAO
kikonen Jun 21, 2024
3547118
FIX billboard flag not working
kikonen Jun 21, 2024
2f51c35
FIX missing asserts
kikonen Jun 22, 2024
a44edb6
FIX dirty tracking for VBO/EBO buffer updates
kikonen Jun 22, 2024
42158bf
FIX text volume centered to text itself
kikonen Jun 22, 2024
baf9f87
FIX clones share material
kikonen Jun 23, 2024
db0b80c
FIX cleanup of logic
kikonen Jun 23, 2024
c0d6e21
FIX multidraw batching logic fixes
kikonen Jun 23, 2024
c2a684e
FIX pine tree needs blend further away
kikonen Jun 23, 2024
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
13 changes: 11 additions & 2 deletions learnopengl.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@
<ClCompile Include="src\loader\ParticleLoader.cpp" />
<ClCompile Include="src\animation\RigNode.cpp" />
<ClCompile Include="src\loader\PrefabLoader.cpp" />
<ClCompile Include="src\loader\TextLoader.cpp" />
<ClCompile Include="src\mesh\AssimpLoader.cpp" />
<ClCompile Include="src\mesh\LodMesh.cpp" />
<ClCompile Include="src\mesh\TransformRegistry.cpp" />
Expand All @@ -222,16 +223,18 @@
<ClCompile Include="src\mesh\TextMesh.cpp" />
<ClCompile Include="src\animation\AnimationSystem.cpp" />
<ClCompile Include="src\mesh\MeshSet.cpp" />
<ClCompile Include="src\mesh\vao\VertexVBO.cpp" />
<ClCompile Include="src\scene\AnimationUpdater.cpp" />
<ClCompile Include="src\scene\Updater.cpp" />
<ClCompile Include="src\text\TextSystem.cpp" />
<ClCompile Include="src\text\vao\AtlasTextureVBO.cpp" />
<ClCompile Include="src\mesh\vao\VertexIndexEBO.cpp" />
<ClCompile Include="src\mesh\vao\VertexTextureVBO.cpp" />
<ClCompile Include="src\particle\ParticleSystem.cpp" />
<ClCompile Include="src\pool\IdHash.cpp" />
<ClCompile Include="src\pool\Pool_impl.h" />
<ClCompile Include="src\pool\TypeHandle.cpp" />
<ClCompile Include="src\registry\FontRegistry.cpp" />
<ClCompile Include="src\text\FontRegistry.cpp" />
<ClCompile Include="src\pool\NodeHandle.cpp" />
<ClCompile Include="src\registry\NodeSnapshotRegistry.cpp" />
<ClCompile Include="src\render\BatchCommand.cpp" />
Expand Down Expand Up @@ -353,6 +356,8 @@
<ClCompile Include="src\render\WindowBuffer.cpp" />
<ClCompile Include="src\text\FontHandle.cpp" />
<ClCompile Include="src\text\TextDraw.cpp" />
<ClCompile Include="src\text\vao\TextVAO.cpp" />
<ClCompile Include="src\text\vao\TextVAO.h" />
<ClCompile Include="src\util\assimp_util.cpp" />
<ClCompile Include="src\util\glm_util.cpp" />
<ClCompile Include="src\util\Log.cpp" />
Expand Down Expand Up @@ -419,6 +424,7 @@
<ClInclude Include="src\loader\FlagContainer.h" />
<ClInclude Include="src\loader\MeshData.h" />
<ClInclude Include="src\loader\MeshLoader.h" />
<ClInclude Include="src\loader\TextLoader.h" />
<ClInclude Include="src\mesh\InstanceFlags.h" />
<ClInclude Include="src\mesh\LoadContext.h" />
<ClInclude Include="src\loader\converter\DocNode_impl.h" />
Expand All @@ -440,6 +446,8 @@
<ClInclude Include="src\mesh\MeshSet.h" />
<ClInclude Include="src\mesh\TransformRegistry.h" />
<ClInclude Include="src\mesh\TransformSSBO.h" />
<ClInclude Include="src\mesh\vao\VertexEntry.h" />
<ClInclude Include="src\mesh\vao\VertexVBO.h" />
<ClInclude Include="src\model\NodeFlags.h" />
<ClInclude Include="src\render\size.h" />
<ClInclude Include="src\scene\AnimationUpdater.h" />
Expand Down Expand Up @@ -484,6 +492,7 @@
<ClInclude Include="src\animation\AnimationSystem.h" />
<ClInclude Include="src\animation\BoneTransformSSBO.h" />
<ClInclude Include="src\scene\Updater.h" />
<ClInclude Include="src\text\TextSystem.h" />
<ClInclude Include="src\util\assimp_util.h" />
<ClInclude Include="src\mesh\vao\BoneEntry.h" />
<ClInclude Include="src\mesh\vao\VertexBoneVBO.h" />
Expand All @@ -508,7 +517,7 @@
<ClInclude Include="src\pool\Entry.h" />
<ClInclude Include="src\pool\IdHash.h" />
<ClInclude Include="src\pool\TypeHandle.h" />
<ClInclude Include="src\registry\FontRegistry.h" />
<ClInclude Include="src\text\FontRegistry.h" />
<ClInclude Include="src\pool\NodeHandle.h" />
<ClInclude Include="src\pool\Pool.h" />
<ClInclude Include="src\registry\NodeSnapshotRegistry.h" />
Expand Down
39 changes: 33 additions & 6 deletions learnopengl.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,6 @@
<ClCompile Include="src\mesh\Vertex.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\registry\FontRegistry.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\mesh\TextMesh.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -696,6 +693,24 @@
<ClCompile Include="src\loader\MeshLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\loader\TextLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\text\FontRegistry.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\text\TextSystem.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\mesh\vao\VertexVBO.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\text\vao\TextVAO.h">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\text\vao\TextVAO.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
Expand Down Expand Up @@ -1421,9 +1436,6 @@
<ClInclude Include="src\mesh\Vertex.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\registry\FontRegistry.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\mesh\TextMesh.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down Expand Up @@ -1733,6 +1745,21 @@
<ClInclude Include="src\mesh\InstanceFlags.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\loader\TextLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\text\FontRegistry.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\text\TextSystem.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\mesh\vao\VertexVBO.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\mesh\vao\VertexEntry.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="learnopengl.rc">
Expand Down
10 changes: 6 additions & 4 deletions scene/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ assets:

terrain_grid_size: 64

batch_size: 1000
batch_buffers: 300
batch_size: 50
batch_buffers: 200
batch_debug: false

draw_debug: false
Expand All @@ -129,8 +129,10 @@ assets:

shadow_polygon_offset_enabled: true
shadow_polygon_offset: [2, 0.5]
shadow_planes: [0.1, 25, 75, 150, 500]
shadow_map_sizes: [1024, 1024, 1024, 1024]
xshadow_planes: [0.1, 25, 75, 150, 500]
xshadow_map_sizes: [1024, 1024, 1024, 1024]
shadow_planes: [0.1, 40, 90, 500]
shadow_map_sizes: [2048, 1024, 1024]
shadow_render_frame_start: 0
shadow_render_frame_step: 1
shadow_visual: false
Expand Down
8 changes: 5 additions & 3 deletions scene/scene_airboat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@ entities:
tiling: 5
program: g_tex
pos: [0.0, 0.0, -20.0]
- name: Airboat
- id: airboat_{t}_{c}
mesh:
path: airboat_fixed_colors
program: g_tex
pos: [0.0, 0.0, 0.0]
clones:
- pos: [0.0, 0.0, 0.0]
- pos: [20.0, 00.0, 0.0]
- name: Directional light
type: origo
pos: [0, 25, 25]
light:
type: directional
diffuse: [0.9, 0.9, 0.7, 1.0]
intensity: 40000
- name: Giant wooden box
- id: giant_wooden_box_{t}_{c}
mesh:
path: quad
material:
Expand Down
9 changes: 4 additions & 5 deletions scene/scene_asteroids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ entities:
alpha: true
render_back: true
text:
font: fps_font
text: "- fps"
font:
name: fps_font
path: fonts/Vera.ttf
size: 36
program: g_font_render
shadow_program: shadow_font_render
pos: [-1.8, 0.95, -2.5]
Expand Down Expand Up @@ -144,7 +147,3 @@ entities:
type: directional
diffuse: [0.9, 0.9, 0.7, 1.0]
intensity: 50000
fonts:
- name: fps_font
path: fonts/Vera.ttf
size: 36
2 changes: 1 addition & 1 deletion scene/scene_audio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ entities:
reference_distance: 6
xautoplay: true
xlooping: true
- name: Four cubes
- id: four_cubes_{t}_{c}
mesh:
path: texture_cube_3
program: g_tex
Expand Down
11 changes: 5 additions & 6 deletions scene/scene_blend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ entities:
alpha: true
render_back: true
text:
font: hello_font
text: Hello world
program: font_render
fonts:
name: hello_font
path: fonts/LuckiestGuy.ttf
size: 72
program: g_font_render
shadow_program: shadow_font_render
pos: [-2.5, 0.0, -9.0]
scale: 0.01
Expand All @@ -129,7 +132,3 @@ entities:
type: directional
diffuse: [0.7, 0.7, 0.7, 1.0]
intensity: 40000
fonts:
- name: hello_font
path: fonts/LuckiestGuy.ttf
size: 72
79 changes: 66 additions & 13 deletions scene/scene_forest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,70 @@ entities:
x_step: 20
z_step: -20
- xid: pine_tree_forest_{t}
mesh:
path: fbx/scenery/trees/SM_TreePine_01b.FBX
materials:
- name: pine_trunk_pbr
alias: MI_TreeBarkPine_01a
map_pbr: pine_trunk_pbr
- name: pine_leaf_pbr
alias: MI_PineTree_01a
map_pbr: pine_leaf_pbr
alpha: true
render_back: true
meshes:
- path: fbx/scenery/trees/SM_TreePine_01b.FBX
lods:
- level: 0
distance: 200
materials:
- name: pine_trunk_pbr
alias: MI_TreeBarkPine_01a
map_pbr: pine_trunk_pbr
- name: pine_leaf_pbr
alias: MI_PineTree_01a
map_pbr: pine_leaf_pbr
alpha: true
blend: true
render_back: true
- path: fbx/scenery/trees/SM_TreePine_01b.FBX
lods:
- level: 1
distance: 300
materials:
- name: pine_trunk_pbr
alias: MI_TreeBarkPine_01a
map_pbr: pine_trunk_pbr
- name: pine_leaf_pbr
alias: MI_PineTree_01a
map_pbr: pine_leaf_pbr
alpha: true
render_back: true
- path: fbx/scenery/trees/SM_TreePine_01b.FBX
lods:
- level: 2
distance: 400
materials:
- name: pine_trunk_pbr
alias: MI_TreeBarkPine_01a
map_kd: pine_trunk_pbr/T_TreePineBark_01a_A.PNG
- name: pine_leaf_pbr
alias: MI_PineTree_01a
map_kd: pine_leaf_pbr/T_PineBranch_01a_A.PNG
alpha: true
render_back: true
- path: fbx/scenery/trees/SM_TreePine_01b.FBX
lods:
- level: 3
distance: 500
materials:
- name: pine_trunk_pbr
alias: MI_TreeBarkPine_01a
map_kd: pine_trunk_pbr/T_TreePineBark_01a_A.PNG
- name: pine_leaf_pbr
alias: MI_PineTree_01a
map_kd: pine_leaf_pbr/T_PineBranch_01a_A.PNG
alpha: true
- path: fbx/scenery/trees/SM_TreePine_01b.FBX
lods:
- level: 4
distance: 10000
materials:
- name: pine_trunk_pbr
alias: MI_TreeBarkPine_01a
map_kd: pine_trunk_pbr/T_TreePineBark_01a_A.PNG
- name: pine_leaf_pbr
alias: MI_PineTree_01a
map_kd: pine_leaf_pbr/T_PineBranch_01a_A.PNG
program: g_tex
pos: [-1000, 0.0, 0.0]
render_flags:
Expand All @@ -188,8 +241,8 @@ entities:
generator:
type: grid
repeat:
x_count: 20
z_count: 20
x_count: 200
z_count: 200
x_step: 20
z_step: -20
- name: wooden floor
Expand Down
Loading