{"id":34572719,"url":"https://github.com/christoskaramou/phasmaengine","last_synced_at":"2026-07-07T03:00:54.098Z","repository":{"id":40001392,"uuid":"133596158","full_name":"christoskaramou/PhasmaEngine","owner":"christoskaramou","description":"3D Graphics Engine","archived":false,"fork":false,"pushed_at":"2026-06-28T01:55:39.000Z","size":234707,"stargazers_count":48,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-06-28T03:15:37.624Z","etag":null,"topics":["cpp","dx12","lua","vulkan","webgpu"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christoskaramou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2018-05-16T01:59:15.000Z","updated_at":"2026-06-28T01:39:32.000Z","dependencies_parsed_at":"2025-10-26T02:38:35.756Z","dependency_job_id":"d4f5fa35-2fa5-48a8-ab98-88fb4ba0e925","html_url":"https://github.com/christoskaramou/PhasmaEngine","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/christoskaramou/PhasmaEngine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoskaramou%2FPhasmaEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoskaramou%2FPhasmaEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoskaramou%2FPhasmaEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoskaramou%2FPhasmaEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christoskaramou","download_url":"https://codeload.github.com/christoskaramou/PhasmaEngine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christoskaramou%2FPhasmaEngine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35212581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-07T02:00:07.222Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","dx12","lua","vulkan","webgpu"],"created_at":"2025-12-24T09:44:16.248Z","updated_at":"2026-07-07T03:00:54.089Z","avatar_url":"https://github.com/christoskaramou.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PhasmaEngine\n\nPhasmaEngine is a Vulkan and DirectX 12 3D engine for learning graphics techniques, with an experimental WebGPU C API layer. Vulkan runs on Windows and Linux; DX12 is Windows-only.\n\n![Screenshot](Phasma/Editor/EditorAssets/Images/ABeautifulGame.png)\n\n## Features\n\n### Rendering\n* Deferred Rendering\n* Ray Tracing — full and hybrid modes (Vulkan and DirectX 12 / DXR)\n* Hybrid RT transparency: transmission, refraction, Fresnel/TIR\n* Physically Based Rendering (PBR)\n* Image Based Lighting (IBL)\n* Screen Space Ambient Occlusion (SSAO)\n* Screen Space Reflections (SSR)\n* Cascaded Shadow Maps (GPU-culled cascades)\n* Bloom\n* Depth of Field\n* Motion Blur\n* Tone Mapping\n* FXAA\n* Temporal Anti-Aliasing with RCAS Upscale\n* Frustum Culling\n* GPU Occlusion Culling (two-phase temporal Hi-Z)\n* Mesh Level of Detail (LOD)\n* Render Graph\n* Day/Night Skybox with HDR environment maps\n\n### Shaders\n* HLSL shaders compiled via DXC/shaderc\n* Experimental WGSL support through PhasmaWebGPU\n* Shader hot-reload with file watching\n\n### Scene\n* Multiple model formats loading (via Assimp)\n* Mesh optimization (via meshoptimizer)\n* Directional, Point, Spot, and Area lights\n* Cameras and lights as scene nodes (Add Component)\n* Scene save/load (.pescene) and prefabs (save/instantiate node hierarchies)\n* Physics — Jolt rigid bodies, trigger zones, static terrain/voxel colliders; Box2D for 2D\n* Physics-driven walk camera (collide via forces) + auto-attached adaptive fly camera\n* Skeletal animation\n* Audio (miniaudio)\n* Particle system\n* Runtime UI — script-driven HUD panels, text, buttons, images\n* Trigger Zones — box regions with opt-in Script (on_enter/on_exit), Post-Process, Audio, Physics force-field, and spawn/streaming/camera sections\n* Post-Process Volumes \u0026 Scene Settings node (per-effect spatial blending)\n* Per-axis transforms and material editing\n\n### Worlds \u0026 Terrain\n* Voxel World node (cube voxels; Vulkan + DX12): streamed chunks with packed 8-byte vertices, temporal Hi-Z occlusion, distance LOD bands, alpha-blended water with sea-level worldgen, per-column edit persistence\n* Voxel worldgen options: procedural noise knobs (height/scale/seed/caves) or layered heightmaps (surface + strata thickness + features maps), elevation-banded surface blocks, scattered features (trees, rocks, roads, block paint) from a 22-layer texture atlas\n* Terrain node (smooth isosurface terrain): streamed Surface Nets tiles updated in place (no rebuild hitches), noise or heightmap worldgen, worldgen overhangs, persistent CSG sculpting (`terrain.sculpt` / `terrain.sculpt3d`, saved with the scene), painted caves layer, per-tile Jolt colliders following the camera\n* Map Painter — in-editor painting of every world input map (surface height, strata, features with a block-tile palette, terrain caves) with pan/zoom canvas, resize, and save + live rebuild\n\n### Editor (PhasmaEditor)\n* ImGui-based editor\n* Pinnable Properties panel\n* Script editor with live function browser (\"Show Functions\")\n* CPU/GPU metrics\n* Debug console\n* Lua scripting (incl. `tween.to` helpers for smooth animation/camera focus)\n* Event system\n* Editor module C++ hot reload (PhasmaEditorModule.dll)\n* Named editor actions invokable without mouse input (agents/automation)\n\n### MCP Integration\n\nPhasmaEngine has no in-engine LLM. Instead, PhasmaEditor runs an in-process MCP (Model Context Protocol) HTTP server at `http://127.0.0.1:8765/mcp`, letting **external** AI clients control the engine directly.\n\n**Supported clients:**\n- **Claude Code** — add `.claude/settings.json`:\n  ```json\n  { \"mcpServers\": { \"phasmaeditor\": { \"type\": \"http\", \"url\": \"http://127.0.0.1:8765/mcp\" } } }\n  ```\n- **Claude Desktop** — use `mcp-remote` bridge in `claude_desktop_config.json`:\n  ```json\n  \"phasmaeditor\": { \"command\": \"npx\", \"args\": [\"-y\", \"mcp-remote\", \"http://127.0.0.1:8765/mcp\"] }\n  ```\n\nToggle the server from **Connection → MCP Server** in the editor. The **Connection → RAG** submenu controls codebase indexing. Status bar shows live MCP and indexing state.\n\n**Available MCP tools:** scene/model management, camera, lights, materials, shaders, Lua execution, screenshots, mouse injection, editor actions, codebase search (BM25), file read/write, and more. See [PhasmaMCP README](Phasma/MCP/README.md) for the underlying library.\n\nPhasmaPlayer also has an opt-in loopback MCP (Lua execution, screenshots, state, plus script-registered tools) for testing shipped games.\n\n## Sample Models\n\nThe glTF sample models used for testing are **not bundled** with this repository — they are large and freely available upstream. Download them externally from the Khronos glTF Sample Models repo:\n\n\u003e https://github.com/KhronosGroup/glTF-Sample-Models\n\nKeep them outside the project tree. In the editor, use **File → Import** to cook a source model (glTF/FBX/OBJ/…) into the engine's portable `.pemesh` format (GPU-ready geometry + materials + embedded textures written alongside), or **File → Import → Folder** to mirror and cook a whole folder at once. The runtime (desktop **and** Android) loads only `.pemesh`; the repository itself ships only a primitives scene, so a clean checkout has no external asset dependencies.\n\n## Optional Sample Projects\n\n[`christoskaramou/PhasmaProjects`](https://github.com/christoskaramou/PhasmaProjects) is a companion repository for project data rather than engine source. It can contain ready-to-open project roots with `phasma_project.json`, `Assets/Scenes/*.pescene`, scripts, textures, cooked `.pemesh` meshes, and other runtime assets.\n\nDownload or clone it anywhere outside the engine checkout, for example beside `PhasmaEngine`:\n\n```bash\ngit clone https://github.com/christoskaramou/PhasmaProjects.git\n```\n\nEach project should look like this:\n\n```text\nPhasmaProjects/\n  MyProject/\n    phasma_project.json\n    Assets/\n      Scenes/\n      Scripts/\n      Textures/\n```\n\nThe manifest tells the editor and player which assets folder to use and, optionally, which scene to open first:\n\n```json\n{\n    \"version\": 1,\n    \"name\": \"MyProject\",\n    \"assets\": \"Assets\",\n    \"startup_scene\": \"Assets/Scenes/sponza.pescene\"\n}\n```\n\nThe easiest setup is through `PhasmaLauncher`: open the **Project** picker, select a project root that contains `phasma_project.json` (or select an `Assets` folder for older manifest-free projects), then choose a startup scene from `Assets/Scenes` if one is not already set by the manifest. The launcher writes the selection to `phasma_settings.json` next to the executable, and both `PhasmaEditor` and `PhasmaPlayer` use that active project assets root on launch.\n\nIf you run the editor or player directly, create or edit the executable-local `phasma_settings.json` yourself:\n\n```json\n{\n    \"project_path\": \"C:/path/to/PhasmaProjects/MyProject/\",\n    \"project_manifest\": \"C:/path/to/PhasmaProjects/MyProject/phasma_project.json\",\n    \"startup_scene\": \"Assets/Scenes/sponza.pescene\"\n}\n```\n\nUse forward slashes in paths on Windows. If the project does not have a manifest, omit `project_manifest` and point `project_path` directly at the assets folder.\n\n## Getting the Source\n\nPhasmaEngine uses Tracy as a Git submodule. For a normal clone, fetch submodules with the repository:\n\n```bash\ngit clone --recurse-submodules https://github.com/christoskaramou/PhasmaEngine.git\n```\n\nIf you already cloned without submodules, initialize them afterwards:\n\n```bash\ngit submodule update --init --recursive\n```\n\nFor a smaller day-to-day checkout that avoids downloading old reachable history, clone only current `master` with blob filtering:\n\n```bash\ngit clone --depth 1 --single-branch --branch master --filter=blob:none --recurse-submodules --shallow-submodules --also-filter-submodules https://github.com/christoskaramou/PhasmaEngine.git\n```\n\n## Building and Compiling\n\nPhasmaEngine uses CMake to configure and generate project files. The CMakeLists.txt is in the root folder.\n\n## Graphics API\n\nPhasmaEditor supports runtime graphics API selection:\n\n- Vulkan (default, Windows/Linux): `PhasmaEditor --api vulkan`\n- DirectX 12 (Windows-only): `PhasmaEditor.exe --api dx12`\n\nYou can also set `PHASMA_API` to `vulkan` or `dx12`, or write `graphics_api` / `api` in `phasma_settings.json` next to the executable.\n\nWebGPU support is experimental and lives in `PhasmaWebGPU`, a WebGPU C API layer over PhasmaCore. It builds with the `PE_WEBGPU` CMake option and runs through dedicated WebGPU sample/test executables rather than PhasmaEditor `--api` selection.\n\n## GitHub Release Builds\n\nDownload prebuilt packages from the [`latest` GitHub prerelease](https://github.com/christoskaramou/PhasmaEngine/releases/tag/latest):\n\n- [PhasmaEngine-Full-Windows.zip](https://github.com/christoskaramou/PhasmaEngine/releases/download/latest/PhasmaEngine-Full-Windows.zip)\n- [PhasmaEngine-Full-Linux.tar.gz](https://github.com/christoskaramou/PhasmaEngine/releases/download/latest/PhasmaEngine-Full-Linux.tar.gz)\n\nThe Windows package includes Vulkan and DX12 launchers; DX12 is Windows-only, so the Linux package ships the Vulkan backend.\n\n**CMake:**\nDownload [CMake](https://cmake.org/download/) and install it.\nSee [CMake documentation](https://cmake.org/runningcmake/) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristoskaramou%2Fphasmaengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristoskaramou%2Fphasmaengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristoskaramou%2Fphasmaengine/lists"}