Commit Graph
73 Commits
Author SHA1 Message Date
西风逍遥游 2e40d38a6f fix(webgpu): complete reflection bind layouts 2026-08-29 12:56:37 +08:00
西风逍遥游 8b43f9619f fix(webgpu): remove stale initialization path 2026-08-29 12:45:32 +08:00
西风逍遥游 4e64f69f90 Merge remote-tracking branch 'origin/dev' into codex/classic-rendering-chain
# Conflicts:
#	cmake/module_manifest.cmake
#	src/modules/dialogue/Dialogue.h
#	src/modules/graphics/Graphics.h
#	src/modules/graphics/RenderSystem3D.cpp
#	src/modules/graphics/vulkan/Graphics.cpp
#	src/modules/graphics/vulkan/Graphics.h
#	src/modules/graphics/vulkan/Graphics2D.cpp
#	src/modules/graphics/vulkan/GraphicsPipeline.cpp
#	src/modules/graphics/webgpu/Canvas.cpp
#	src/modules/graphics/webgpu/Graphics.cpp
2026-08-29 11:52:46 +08:00
西风逍遥游 a2a5ef8f5f feat(procgen): add procedural prototype kit 2026-08-28 14:55:36 +08:00
西风逍遥游 63246b8c68 fix: complete architecture consolidation contracts 2026-08-28 00:01:55 +08:00
西风逍遥游 293be41d66 Merge remote-tracking branch 'origin/dev' into codex/architecture-consolidation
# Conflicts:
#	cmake/module_manifest.cmake
#	docs/usr/modules/procgen.md
#	src/engine/CMakeLists.txt
#	src/engine/cmdline/Run.cpp
#	src/engine/common/ScriptModule.h
#	src/modules/animation/Animation.cpp
#	src/modules/physics/World.cpp
#	src/modules/physics/World3D.cpp
#	src/modules/procgen/Procgen.cpp
#	src/modules/procgen/Procgen.h
#	src/modules/scene/SceneCapabilities.cpp
#	src/modules/schema/Schema.cpp
#	src/modules/schema/Schema.h
2026-08-27 14:52:28 +08:00
西风逍遥游 a8b8e83128 refactor: consolidate engine architecture contracts 2026-08-27 12:54:48 +08:00
西风逍遥游 128fd5c95e feat(graphics): complete classic rendering chain 2026-08-26 22:35:20 +08:00
西风逍遥游 c624833351 feat(webgpu): add vk-bootstrap-style C++ layer to block infeasible API calls
Add a systematic C++ wrapper layer for the WebGPU backend, mirroring the
vulkan backend's vkbuilder patterns so invalid API usage is rejected at
compile time / type level instead of via scattered runtime flags.

New layer (src/modules/graphics/webgpu/):
- wgpu_types.h: cross-platform webgpu_cpp.h include + sv() helpers
- Capabilities: read-only snapshot of adapter/device limits (GetLimits),
  sample-count/format/bind-group predicates
- InitFlow: typed Instance->Adapter->Device state machine wrapping the async
  request + ProcessEvents busy-wait (skipping a step is a compile error)
- SamplerBuilder/BindGroupLayoutBuilder/PipelineBuilder: build the C++ wrapper
  descriptors directly (zero-init == WebGPU defaults), eliminating the
  writeMask=0 / sampleMask=0 / alphaMode default-mask traps

Graphics.cpp migration:
- initHeadless/initWithWindow now drive InitFlow; drop the 4 std::atomic<bool>
  flags, waitForAdapter/Device, createInstanceAndAdapter/requestDevice
- convert 8 bind-group-layout, 7 pipeline-layout, 3 2D-pipeline functions and
  makeWgslModule to build C++ wrapper descriptors directly (reinterpret_cast
  127 -> 114; remaining texture/buffer/renderpass conversions deferred)

Design spec: docs/dev/superpowers/specs/2026-08-26-webgpu-vkbuilder-style-cpp-layer.md

Verified: build/webgpu-native (native Dawn, MSVC Debug+Ninja) compiles and
links eve.exe (1633/1633). SSAO/decal stub-tightening (PR4) was dropped as
obsolete - dev already has real implementations.
2026-08-26 17:22:57 +08:00
西风逍遥游 378a40c058 perf(webgpu): create render pipelines lazily 2026-08-26 14:55:01 +08:00
西风逍遥游 567efa37e6 fix(webgpu): cast Cocoa window for AppleClang 2026-08-25 21:29:50 +08:00
西风逍遥游 9e9c6f9874 merge(dev): integrate WebGPU parity with latest rendering changes 2026-08-25 15:05:07 +08:00
西风逍遥游 78656bb33c fix(webgpu): preserve cascaded shadow draws 2026-08-25 14:22:36 +08:00
西风逍遥游 1d399534d4 fix(graphics): preserve mixed 2d draw order 2026-08-25 13:34:11 +08:00
西风逍遥游 52e30fa622 fix(webgpu): honor mesh texture sampler state 2026-08-25 13:18:06 +08:00
西风逍遥游 7ed1f25ffe fix(webgpu): align voxel validation semantics 2026-08-25 13:04:58 +08:00
西风逍遥游 9d41bdbe46 feat(webgpu): add gpu-driven depth occlusion 2026-08-25 12:50:29 +08:00
西风逍遥游 a48ad07227 fix(webgpu): align cascaded grass lighting 2026-08-25 12:36:42 +08:00
西风逍遥游 764cfc6fc0 fix(webgpu): wait for native texture readbacks 2026-08-25 12:03:02 +08:00
西风逍遥游 1250aee5bb fix(webgpu): reject silent hair shader substitution 2026-08-25 11:49:23 +08:00
西风逍遥游 80eb1ff749 fix(webgpu): preserve sprite stack shader semantics 2026-08-25 11:40:10 +08:00
西风逍遥游 73126b11bd feat(webgpu): port grass rendering 2026-08-25 11:33:43 +08:00
西风逍遥游 13d346a475 fix(webgpu): align cascaded shadow rendering 2026-08-25 10:10:30 +08:00
西风逍遥游 ebecf525b6 fix(webgpu): align texture sampling and mipmaps 2026-08-25 09:34:36 +08:00
西风逍遥游 f8d46c5d5b fix(webgpu): match Vulkan 2d lighting 2026-08-25 09:27:42 +08:00
西风逍遥游 2067d3ab89 feat(webgpu): add visibility-buffer resolve 2026-08-25 08:50:24 +08:00
西风逍遥游 76f5ffcdf6 feat(webgpu): add compute-culling indirect draws 2026-08-25 08:21:42 +08:00
西风逍遥游 cc3efcc224 feat(webgpu): enable deferred posts and macOS surfaces 2026-08-25 07:48:20 +08:00
西风逍遥游 fac833f542 feat(webgpu): add anisotropic hair rendering 2026-08-25 07:33:37 +08:00
西风逍遥游 8db82847db feat(webgpu): enable font atlas rendering 2026-08-25 07:27:23 +08:00
西风逍遥游 0002840ea1 fix(webgpu): retain custom shader modules through pipeline creation 2026-08-25 06:49:50 +08:00
西风逍遥游 2ec960db04 feat(webgpu): match deferred decals with Vulkan 2026-08-25 06:32:08 +08:00
西风逍遥游 115c9862ce feat(webgpu): support alpha-cutout deferred passes 2026-08-25 02:45:57 +08:00
西风逍遥游 16c0439989 feat(webgpu): align core resource and surface rendering 2026-08-25 02:33:12 +08:00
西风逍遥游 2b9947b198 Merge remote-tracking branch 'origin/dev' into codex/model3d-pipeline-stage12
# Conflicts:
#	src/modules/graphics/Mesh.cpp
#	src/modules/graphics/Mesh.h
2026-08-25 02:17:43 +08:00
西风逍遥游 5844b9a663 feat(model3d): complete stage 1-2 import pipeline 2026-08-24 23:58:14 +08:00
西风逍遥游 84777ff6c1 Merge origin/dev into codex/animation-mainstream 2026-08-24 22:46:53 +08:00
西风逍遥游 d664b15f10 feat(animation): add built-in GPU skinned mesh pipeline 2026-08-24 22:17:55 +08:00
西风逍遥游 04b8824f56 feat(graphics): add unified transparency rendering 2026-08-24 16:00:37 +08:00
西风逍遥游 426059d299 Merge pull request #195 from EVEngine/codex/animskin-script-skinning-writeback
feat(animation): script-playable skeletal animation via AnimSkin writeback
2026-08-23 15:02:29 +08:00
西风逍遥游 c65daede2e feat(animation): script-playable skeletal animation via AnimSkin writeback
AnimSkin can now write CPU-skinning results back to the render mesh so skeletal animation actually plays from scripts:
- capture bind normals at fromModel and skin them per pose (updateSkinnedNormals / getSkinnedNormals, cofactor inverse-transpose + normalize)
- packed getSkinnedPositions() array getter, matching AnimLattice's script pattern
- one-call applyToMesh(gfx, mesh, pose): skin positions+normals then in-place gpu.updateMeshVertices
- Renderable3D.getMesh() script binding so createRenderable meshes are reachable
- Mesh::gpuVertexCount so getVertexCount() is correct for non-morph meshes (both backends)
- tests: packed positions == skinPositionsTo, normals follow pose and stay unit length, applyToMesh render test with in-place updates
- docs: animation/graphics user guides + design spec
2026-08-23 14:24:11 +08:00
西风逍遥游 5c3a4e2c0d feat(graphics): add in-place texture pixel updates (updateTexture) 2026-08-22 23:47:33 +08:00
西风逍遥游 9d4148cb6f fix(webgpu): mirror clip Y for WebGPU NDC and black default env cubemap
WebGPU NDC is Y-up while the engine feeds Vulkan-convention (Y-down) clip
matrices, so every 3D pass (mesh, clustered, gbuffer, shadow, voxel) rendered
vertically flipped - the floor appeared on top and lighting/AO landed in the
wrong places. Mirror clip Y in the vertex shaders.

The default env cubemap was pure white while RenderSystem3D passes
envIntensity=1.0 by default, washing the whole scene toward white; make the
default black so only an explicitly set envMap contributes IBL.

Also fix the half-res AO UV mapping (was overrunning into [0,2] and clamping
to the AO edge) and add the missing Vulkan setMesh3DSSAO override so the
native desktop build compiles.
2026-08-22 02:25:29 +08:00
西风逍遥游 83c0c2044e fix(webgpu): denoise SSAO with half-res target and softer weights 2026-08-22 01:37:38 +08:00
西风逍遥游 be4b8af5f1 feat(webgpu): 2D custom shader entry via newShaderFromWgsl 2026-08-22 00:18:29 +08:00
西风逍遥游 35499fbad8 feat(webgpu): clustered-forward lighting with SSBO light tables 2026-08-22 00:10:43 +08:00
西风逍遥游 b9af46b315 feat(webgpu): voxel vertex AO baking with fixed instance vertex layout 2026-08-21 23:43:03 +08:00
西风逍遥游 d15fd74359 feat(webgpu): screen-space ambient occlusion via G-buffer depth 2026-08-21 23:27:45 +08:00
西风逍遥游 acb5fbe09a feat(webgpu): render 3D scenes into offscreen canvases
begin3DFrameToCanvas no longer throws: the 3D pass renders into the target
canvas (RGBA8Unorm, 1-sample) using a dedicated 1x mesh3d pipeline variant,
since the scene pipelines follow the active MSAA count. renderScene3DToCanvas
also gets validation scopes matching render3D. The async frame readback now
follows the last 3D target (scene color or canvas) so screenshots work for
canvas-rendered frames too.

Known limitation: reading back a canvas that was also drawn as a 2D overlay in
the same frame can return black (emdawnwebgpu resource-state quirk).
2026-08-21 21:53:38 +08:00
西风逍遥游 59234f4931 feat(webgpu): MSAA for the 3D scene target
The scene color pass now renders into a multisampled attachment and resolves
to the single-sample color texture used by compositing and frame readback.
The mesh3d/voxel/custom-shader pipelines follow the active sample count and
are rebuilt when setMsaaSamples changes; WebGPU supports 1x/4x only, so values
>= 2 clamp to 4. setMsaaSamples also recreates the offscreen targets.
2026-08-21 21:15:52 +08:00