13 Commits
Author SHA1 Message Date
emil28092005 c57bd5229f docs: update all docs for publication
- README.md: new — features, quick start, controls, MCP tools, requirements
- AGENTS.md: rewritten for pure P/Invoke Vulkan 1.3 (was Raylib/OpenGL)
- CORTEX_ENGINE_ARCHITECTURE.md: complete rewrite — current architecture,
  frame loop, UBO layout, push constants, shadow mapping, PBR, AI/MCP,
  physics, ImGui, video recording, content, testing
- VULKAN_IMPLEMENTATION_PLAN.md: marked as COMPLETE with all 21 phases
- scripts/run.sh: updated examples
- .gitignore: added Videos/, imgui.ini, cortex.mp4
- Removed tracked imgui.ini and video files
2026-06-19 17:02:33 +03:00
emil28092005 cca89040c3 feat: JoltPhysicsSharp integration — physics simulation
- Engine.Physics project with JoltPhysicsSharp 2.21.0
- PhysicsWorld: PhysicsSystem init/update/dispose, body creation/removal,
  transform sync (Jolt body → ECS Transform)
- RigidBody ECS component: MotionType (Static/Kinematic/Dynamic),
  ShapeType (Box/Sphere), mass, friction, restitution, damping
- Factory methods: DynamicBox, DynamicSphere, StaticBox, StaticPlane
- Main loop integration: create bodies on first frame, step physics,
  sync transforms back to ECS
- Demo scene: 6 dynamic cubes + 3 dynamic spheres fall from height,
  static floor plane. Torus knot and textured cube remain static.
- Collision layers: NonMoving (floor), Moving (dynamic objects)
- JobSystemThreadPool for multi-threaded physics
- 66/66 tests passing, 0 warnings, 0 errors
2026-06-17 16:45:43 +03:00
emil28092005 9bee806a6c docs: update roadmap — shadow mapping deferred 2026-06-17 16:39:07 +03:00
emil28092005 c82ff48119 fix: rlgl depth FBO shadows, correct normals, linear gamma, per-channel Fresnel
- Shadow mapping via rlgl: custom depth FBO (2048x2048, 24-bit depth texture)
  instead of color-attachment approach. Proper depth-only render pass.
- Shadow map bound via MaterialMapIndex.Emission (texture unit 1), sampled
  in shadow receiver shader with PCF 3x3 soft shadows.
- Fixed inverted normals: Cross(ac, ab) for CW winding in OBJ files.
- Linear workflow: pow(albedo, 2.2) before lighting, pow(result, 1/2.2) after.
- Per-channel Fresnel: vec3 F0 + (1-F0)*pow(1-HdotV,5) instead of F0.x.
- Single CollectLights call after BeginMode3D.
- Shadow pass after BeginDrawing (inside frame).
- Backface culling disabled globally for mixed-winding meshes.
- Point light support: Light.Point/Directional factory methods, attenuation,
  ImGui inspector with type combo, position/range for point lights.
- Floor rendered for both light types (shadow receiver or main shader).
- 66/66 tests passing.
2026-06-17 16:13:46 +03:00
emil28092005 f905fe3040 fix: restore rendering after shadow mapping attempt
Shadow mapping via DrawModelEx doesn't work — Raylib's material system
only supports texture unit 0, shadow map sampling needs unit 1.
Additional uniforms in fragment shader also broke NVIDIA GLSL uniform
layout, causing render artifacts. Reverted shader to pre-shadow state.
Shadow pass infrastructure (RenderShadowPass, shadow shader, RT) kept
but disabled. 66/66 tests passing.
2026-06-17 14:44:49 +03:00
emil28092005 2d30dec01c feat: Dear ImGui editor, GLTF materials, scene serialization
- ImGuiLayer: entity inspector (Transform/Material/Light/Camera editing),
  hierarchy panel, debug overlay with FPS graph (rlImgui-cs + ImGui.NET)
- GltfLoader.LoadWithMaterials: extracts PBR albedo, roughness, metallic,
  base color texture from glTF files
- SceneSerializer: save/load ECS world to/from JSON with custom
  Vector3/Quaternion converters, 6 tests
- ImGui disabled in tour/test mode to keep screenshots clean
- 66/66 tests passing
2026-06-17 14:12:02 +03:00
emil28092005 fb6e26a268 feat: modular HAL, Raylib backend, PBR shading, textures, 60 unit tests
- Replace hardcoded SDL3 windowing with IWindow/IInputState/Key abstractions
- Each render backend owns its window (Raylib GLFW, SDL3 for Vulkan)
- Raylib backend: DrawModelEx, custom GLSL shader with Fresnel, ACES
  tonemapping, gamma correction, hemisphere ambient
- Fix backface culling, mesh memory (NativeMemory.Alloc), texture loading
- Camera controllers use backend-agnostic Key enum (inverted yaw/strafe)
- Demo scene: 8 cubes, 7 spheres, torus knot OBJ with checker texture
- Extract ProceduralMesh + MeshMath from Program.cs to Engine.Graphics
- Vulkan backend deferred (compiles, untested, IWindow-compatible)
- 60 unit tests: ObjLoader, camera controllers, AiCommandProcessor,
  RenderBackendFactory, Timing, ProceduralMesh, MeshMath, Transform
- AGENTS.md for opencode integration
2026-06-17 13:49:12 +03:00
emil28092005 61f8c7065e feat: WASD free-fly camera with F toggle
- Add ICameraController interface and FreeFlyCameraController.
- WASD moves, Q/E up/down, Shift sprint, right-mouse + mouse look.
- Toggle between Orbit and FreeFly with F key.
- OrbitCameraController now implements ICameraController.
- Update Program.cs to switch active controller on F.
- Update CORTEX_ENGINE_ARCHITECTURE.md with camera controls.
- Debug/Release/ReleaseAOT all build.
2026-06-16 21:14:32 +03:00
emil28092005 6d3b5cca37 feat: world state, multiple lights, textures, stdio MCP, Claude config
- Add get_world_state AI command that dumps ECS entities with Transform,
  Camera, Material, Light, and Mesh summaries.
- Add set_material AI command to update albedo/roughness/metallic/texture.
- Expose both commands as MCP HTTP tools and stdio tools.
- Add Light component and support up to 4 directional lights via a Vulkan
  uniform buffer (descriptor set 0) with std140 layout.
- Move per-frame lighting/camera data into the uniform buffer; push constants
  now carry only MVP + material properties (96 bytes).
- Add Texture class for PNG loading and Vulkan image/view/sampler creation.
- Add per-entity combined image sampler descriptor set (set 1) and use it
  for albedo texture sampling in the fragment shader.
- Generate a checkerboard floor texture in Program.cs.
- Add McpStdioServer for headless stdio MCP (Claude Desktop compatible).
- Add claude_desktop_config.json and scripts/start_mcp_engine.sh.
- Update CORTEX_ENGINE_ARCHITECTURE.md with runtime notes, CLI arguments,
  Vulkan pipeline details, and MCP client configuration.
- All configs (Debug/Release/ReleaseAOT) build successfully.
2026-06-16 21:07:09 +03:00
emil28092005 751e403c0c feat: materials, floor grid, specular lighting, orbit camera
- Add Material component with Albedo, Roughness, Metallic.
- MeshRenderer reads Material and tints vertex color; falls back to default.
- Add Blinn-Phong specular using camera position pushed via push constants.
- Add floor plane and grid mesh in Program.cs.
- Add OrbitCameraController with right-mouse orbit and mouse-wheel zoom.
- Forward SDL events to InputMapping from Sdl3Window.PumpEvents.
- Update main loop to update camera and aspect ratio on resize.
- Recompile SPIR-V shaders.
- Update CORTEX_ENGINE_ARCHITECTURE.md with Material, lighting, and orbit camera.
2026-06-16 20:28:32 +03:00
emil28092005 9312810f0c feat: AI screenshot capture for visual analysis
- Add ScreenshotCapture class to Engine.Graphics using Vulkan image readback.
- Integrate screenshot capture into MeshRenderer; request triggers readback on next frame.
- Add SixLabors.ImageSharp 3.1.11 for PNG encoding (patched for CVE-2025-54575).
- Add capture_screenshot AI command and MCP tool.
- Wire screenshot request into Program.cs with demo command.
- Expose swapchain surface format and image accessor for readback.
- Add Screenshots/ to .gitignore.
- Update CORTEX_ENGINE_ARCHITECTURE.md with MCP, Silk.NET.Vulkan, ImageSharp, and screenshot capture.
2026-06-16 20:09:57 +03:00
emil28092005 608c3c24a8 feat: Step 3 Flecs.NET ECS integration with animated triangle
- Add Transform component and ECS world in Engine.Core.
- TriangleRenderer.RenderWorld queries entities and applies transforms.
- Animate a single triangle entity in Program.cs.
- Pin ppy.SDL3-CS to 2026.520.0 and add linux-x64 RID for bundled native SDL3.
- Add Flecs.NET.Debug/Release 4.0.4-build.546 per configuration.
- Update SDL3 API usage for the 2026.520.0 binding.
- Update architecture file to Silk.NET.Vulkan and Flecs 4.0.4.
2026-06-16 19:06:04 +03:00
emil28092005 2c4b47538d docs: add comprehensive architecture manifesto for Cortex Engine 2026-06-16 17:01:28 +03:00