mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-25 22:25:07 +00:00
- Added new rendering budget configurations including VRAM limits and texture dimensions in seed_runtime.json and seed_runtime_opengl.json. - Introduced crash recovery parameters such as heartbeat timeouts and memory limits in the configuration files. - Updated cube logic to utilize new camera and control settings from the configuration. - Modified bgfx graphics backend to respect new rendering budget limits and handle texture loading accordingly. - Implemented crash recovery service enhancements to utilize new configuration parameters for better resource management. - Added unit tests to validate the integration of new rendering budgets and crash recovery configurations.
214 lines
5.4 KiB
JSON
214 lines
5.4 KiB
JSON
{
|
|
"schema_version": 2,
|
|
"configVersion": 2,
|
|
"launcher": {
|
|
"name": "Cube Demo",
|
|
"description": "3D cube room with first-person controls, lanterns, and physics interactions",
|
|
"enabled": true
|
|
},
|
|
"window": {
|
|
"title": "SDL3 Bgfx Demo",
|
|
"size": {
|
|
"width": 1024,
|
|
"height": 768
|
|
},
|
|
"mouse_grab": {
|
|
"enabled": true,
|
|
"grab_on_click": true,
|
|
"release_on_escape": true,
|
|
"start_grabbed": false,
|
|
"hide_cursor": true,
|
|
"relative_mode": true,
|
|
"grab_mouse_button": "left",
|
|
"release_key": "escape"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"entry": "scripts/cube_logic.lua",
|
|
"lua_debug": false
|
|
},
|
|
"paths": {
|
|
"project_root": "../",
|
|
"scripts": "scripts",
|
|
"shaders": "shaders"
|
|
},
|
|
"input": {
|
|
"bindings": {
|
|
"move_forward": "W",
|
|
"move_back": "S",
|
|
"move_left": "A",
|
|
"move_right": "D",
|
|
"fly_up": "Q",
|
|
"fly_down": "Z",
|
|
"jump": "Space",
|
|
"noclip_toggle": "N",
|
|
"music_toggle": "M",
|
|
"music_toggle_gamepad": "start",
|
|
"gamepad_move_x_axis": "leftx",
|
|
"gamepad_move_y_axis": "lefty",
|
|
"gamepad_look_x_axis": "rightx",
|
|
"gamepad_look_y_axis": "righty",
|
|
"gamepad_dpad_up": "dpup",
|
|
"gamepad_dpad_down": "dpdown",
|
|
"gamepad_dpad_left": "dpleft",
|
|
"gamepad_dpad_right": "dpright",
|
|
"gamepad_button_actions": {
|
|
"a": "gamepad_a",
|
|
"b": "gamepad_b",
|
|
"x": "gamepad_x",
|
|
"y": "gamepad_y",
|
|
"leftshoulder": "gamepad_lb",
|
|
"rightshoulder": "gamepad_rb",
|
|
"leftstick": "gamepad_ls",
|
|
"rightstick": "gamepad_rs",
|
|
"back": "gamepad_back",
|
|
"start": "gamepad_start"
|
|
},
|
|
"gamepad_axis_actions": {
|
|
"lefttrigger": "gamepad_lt",
|
|
"righttrigger": "gamepad_rt"
|
|
},
|
|
"gamepad_axis_action_threshold": 0.5
|
|
}
|
|
},
|
|
"scene": {
|
|
"rotation_speed": 0.9,
|
|
"cube_mesh": {
|
|
"path": "models/cube.stl",
|
|
"double_sided": true
|
|
},
|
|
"camera": {
|
|
"position": [0.0, 1.6, 10.0],
|
|
"fov": 0.78,
|
|
"near": 0.1,
|
|
"far": 50.0
|
|
},
|
|
"controls": {
|
|
"move_speed": 16.0,
|
|
"fly_speed": 3.0,
|
|
"jump_speed": 5.5,
|
|
"gravity": -12.0,
|
|
"max_fall_speed": -20.0,
|
|
"mouse_sensitivity": 0.0025,
|
|
"gamepad_look_speed": 2.5,
|
|
"stick_deadzone": 0.2,
|
|
"max_pitch_degrees": 85.0,
|
|
"move_forward_uses_pitch": true
|
|
},
|
|
"room": {
|
|
"half_size": 15.0,
|
|
"wall_thickness": 0.5,
|
|
"wall_height": 4.0,
|
|
"floor_half_thickness": 0.3,
|
|
"floor_top": 0.0,
|
|
"floor_subdivisions": 20,
|
|
"floor_color": [1.0, 1.0, 1.0],
|
|
"wall_color": [1.0, 1.0, 1.0],
|
|
"ceiling_color": [1.0, 1.0, 1.0]
|
|
},
|
|
"physics_cube": {
|
|
"enabled": true,
|
|
"half_extents": [1.5, 1.5, 1.5],
|
|
"mass": 1.0,
|
|
"color": [0.92, 0.34, 0.28],
|
|
"kick_strength": 6.0,
|
|
"gravity": [0.0, -9.8, 0.0],
|
|
"max_sub_steps": 10
|
|
},
|
|
"spinning_cube": {
|
|
"enabled": true,
|
|
"scale": 1.5,
|
|
"height": 5.0,
|
|
"color": [0.75, 0.45, 0.25]
|
|
},
|
|
"lanterns": {
|
|
"enabled": true,
|
|
"height": 8.0,
|
|
"size": 0.2,
|
|
"color": [1.0, 0.9, 0.6],
|
|
"corner_offset": 2.0,
|
|
"wall_offset": 2.0
|
|
}
|
|
},
|
|
"rendering": {
|
|
"bgfx": {
|
|
"renderer": "vulkan"
|
|
},
|
|
"materialx": {
|
|
"enabled": true,
|
|
"parameters_enabled": true,
|
|
"library_path": "MaterialX/libraries",
|
|
"library_folders": [
|
|
"stdlib",
|
|
"pbrlib",
|
|
"lights",
|
|
"bxdf",
|
|
"cmlib",
|
|
"nprlib",
|
|
"targets"
|
|
],
|
|
"materials": [
|
|
{
|
|
"shader_key": "floor",
|
|
"document": "MaterialX/resources/Materials/Examples/StandardSurface/standard_surface_wood_tiled.mtlx",
|
|
"material": "Tiled_Wood"
|
|
},
|
|
{
|
|
"shader_key": "wall",
|
|
"document": "MaterialX/resources/Materials/Examples/StandardSurface/standard_surface_brick_procedural.mtlx",
|
|
"material": "M_BrickPattern"
|
|
},
|
|
{
|
|
"shader_key": "ceiling",
|
|
"document": "MaterialX/resources/Materials/Examples/StandardSurface/standard_surface_marble_solid.mtlx",
|
|
"material": "Marble_3D"
|
|
},
|
|
{
|
|
"shader_key": "solid",
|
|
"document": "MaterialX/resources/Materials/Examples/StandardSurface/standard_surface_brass_tiled.mtlx",
|
|
"material": "Tiled_Brass"
|
|
}
|
|
]
|
|
},
|
|
"atmospherics": {
|
|
"ambient_strength": 0.006,
|
|
"fog_density": 0.006,
|
|
"fog_color": [0.03, 0.04, 0.06],
|
|
"sky_color": [0.02, 0.03, 0.05],
|
|
"gamma": 2.2,
|
|
"exposure": 1.15,
|
|
"enable_tone_mapping": true,
|
|
"enable_shadows": true,
|
|
"enable_ssgi": true,
|
|
"enable_volumetric_lighting": true,
|
|
"pbr_roughness": 0.28,
|
|
"pbr_metallic": 0.08
|
|
}
|
|
},
|
|
"budgets": {
|
|
"vram_mb": 512,
|
|
"max_texture_dim": 4096,
|
|
"gui_text_cache_entries": 256,
|
|
"gui_svg_cache_entries": 64
|
|
},
|
|
"crash_recovery": {
|
|
"heartbeat_timeout_ms": 5000,
|
|
"heartbeat_poll_interval_ms": 200,
|
|
"memory_limit_mb": 1024,
|
|
"gpu_hang_frame_time_multiplier": 10.0,
|
|
"max_consecutive_gpu_timeouts": 5,
|
|
"max_lua_failures": 3,
|
|
"max_file_format_errors": 2,
|
|
"max_memory_warnings": 3
|
|
},
|
|
"gui": {
|
|
"font": {
|
|
"use_freetype": true,
|
|
"font_path": "scripts/assets/fonts/Roboto-Regular.ttf",
|
|
"font_size": 18.0
|
|
},
|
|
"opacity": 1.0
|
|
},
|
|
"config_file": "config/seed_runtime.json"
|
|
}
|