Commit Graph

150 Commits

Author SHA1 Message Date
Nick Fisher
8e0ba8ac4e fix: glTF instancing when loaded via buffer 2025-01-07 08:25:48 +08:00
Nick Fisher
cc1b55b6c9 internal: remove vertexScale from unlit material and multiply by alpha 2025-01-07 08:25:48 +08:00
Nick Fisher
96fe2c89ea internal: add FFI method to check for valid renderable 2025-01-07 08:25:48 +08:00
Nick Fisher
8d8acef481 feat: remove bounding box from SceneAsset and create renderable wireframe bounding box in ThermionAsset 2025-01-07 08:25:48 +08:00
Nick Fisher
f8ae90b631 internal: add destroyRenderTargetRenderThread 2025-01-07 08:25:48 +08:00
Nick Fisher
b158062ce8 internal: expose View_getRenderTarget and set (Dart) FFIView.renderTarget property on construction 2025-01-07 08:25:48 +08:00
Nick Fisher
e9c14139c2 chore: disable grid center sphere and fix priority 2025-01-07 08:25:48 +08:00
Nick Fisher
f873f7da66 feat: add setTransparencyMode to Dart Material class 2025-01-07 08:25:48 +08:00
Nick Fisher
fc4842ed6d chore: remove colors from Gizmo 2025-01-07 08:25:48 +08:00
Nick Fisher
eb4e70a7cf chore: remove colors from Gizmo 2025-01-07 08:25:48 +08:00
Nick Fisher
0facb3f906 internal: add TMaterial type 2025-01-07 08:25:48 +08:00
Nick Fisher
355c28477b internal: add Material_createInstance 2025-01-07 08:25:48 +08:00
Nick Fisher
c1a294315a internal: expose Engine getters (TransformManager, RenderableManager), and build/desotry material methods 2025-01-07 08:25:48 +08:00
Nick Fisher
f27628e719 internal: add createGrid/destroyMaterial render thread methods 2025-01-07 08:25:48 +08:00
Nick Fisher
fd1faa6023 feat: allow passing custom material for grid overlay 2025-01-07 08:25:48 +08:00
Nick Fisher
1b979252db feat: re-implement grid overlay 2025-01-07 08:25:48 +08:00
Nick Fisher
852cb58ba9 fix: move material/instance creation to render thread 2025-01-07 08:25:48 +08:00
Nick Fisher
7cf1468f38 feat: more rotation gizmo improvements 2025-01-07 08:25:48 +08:00
Nick Fisher
62cd85c148 feat: rotation gizmo improvements 2025-01-07 08:25:48 +08:00
Nick Fisher
def85614d8 feat: add rotation gizmo 2025-01-07 08:25:48 +08:00
Nick Fisher
0ad73d06e0 internal: pass NameComponentManager to GltfSceneAsset, used for finding child entities by name 2025-01-07 08:25:48 +08:00
Nick Fisher
6b883f3352 chore: update hit test entities used for gizmo 2025-01-07 08:25:48 +08:00
Nick Fisher
ffa0f77a42 chore: ignore TRACE when ENABLE_TRACING not set 2025-01-07 08:25:48 +08:00
Nick Fisher
26ae21910f feat: add rotation gizmo asset + resource file 2025-01-07 08:25:48 +08:00
Nick Fisher
29c35f9037 refactor: Gizmo internals 2025-01-07 08:25:48 +08:00
Nick Fisher
1e1d6fdcc9 chore: add dummy bounding box to GridOverlay 2025-01-07 08:25:48 +08:00
Nick Fisher
113f769160 chore: regenerate materials 2025-01-07 08:25:48 +08:00
Nick Fisher
278575c3e2 internal: add bounding box to SceneAsset & subclasses 2025-01-07 08:25:48 +08:00
Nick Fisher
fe0f63c4cb chore: update gizmo materials 2025-01-07 08:25:48 +08:00
Nick Fisher
8a894f7e88 refactor: add createGizmoRenderThread 2025-01-07 08:25:48 +08:00
Nick Fisher
6b36d67ed7 feat: add gizmo.glb to assets/resources 2025-01-07 08:25:48 +08:00
Nick Fisher
5564be9ce9 feat: add TRACE macro 2025-01-07 08:25:48 +08:00
Nick Fisher
6d5bc305dc fix SceneManager_createCameraRenderThread 2025-01-07 08:25:48 +08:00
Nick Fisher
1c5b5c890b reimplement grid as SceneAsset 2025-01-07 08:25:48 +08:00
Nick Fisher
80ca4b97a9 add create/set camera render thread functions 2025-01-07 08:25:48 +08:00
Nick Fisher
fe37d45e1a return null entity for grid overlay 2025-01-07 08:25:48 +08:00
Nick Fisher
bf3d4f7c0e add dithering to view 2025-01-07 08:25:48 +08:00
Nick Fisher
d53a8b20b8 move Geometry asset builder from header to own implementation 2025-01-07 08:25:48 +08:00
Nick Fisher
ed444b0615 feature!:
This is a breaking change needed to fully implement instancing and stencil highlighting.

Previously, users would work directly with entities (on the Dart side, ThermionEntity), e.g.

final entity = await viewer.loadGlb("some.glb");

However, Filament "entities" are a lower-level abstraction.

Loading a glTF file, for example, inserts multiple entities into the scene.

For example, each mesh, light, and camera within a glTF asset will be assigned an entity. A top-level (non-renderable) entity will also be created for the glTF asset, which can be used to transform the entire hierarchy.

"Asset" is a better representation for loading/inserting objects into the scene; think of this as a bundle of entities.

Unless you need to work directly with transforms, instancing, materials and renderables, you can work directly with ThermionAsset.
2024-11-27 15:02:37 +11:00
Nick Fisher
b7bc46b94a feat: re-add uvScale, vertexScale to unlit material 2024-11-21 12:30:20 +08:00
Nick Fisher
bc8edb7eb4 fix: remove MaterialInstance from SceneManager storage when destroyed 2024-11-21 12:29:54 +08:00
Nick Fisher
5deb2ad7cf chore: factor out SceneManager_ methods 2024-11-21 11:16:54 +08:00
Nick Fisher
26eba7ae09 fix!: update Makefile & rebuild materials for Vulkan 2024-11-21 10:07:08 +08:00
Nick Fisher
0b9f3160d9 feat: add MaterialInstance.setDepthFunc 2024-11-15 22:56:40 +08:00
Nick Fisher
52f041afba chore: move TMaterialInstance FFI methods to own file/header 2024-11-15 22:24:07 +08:00
Nick Fisher
05cb4325da chore: rebuild materials 2024-11-15 22:23:07 +08:00
Nick Fisher
436873a455 successfully creating D3D texture with D3D11_RESOURCE_MISC_SHARED_NTHANDLE;
successfully allocating with VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT

working copying vulkan texture

successfully passing D3D texture back to Flutter

chore: Dart/Windows sample project: remove unnnecessary InvalidateRect from update()

chore: Dart/Windows sample project: add generated bindings

successfully blitting from Vulkan swapchain to D3D texture

working Vulkan texture integration with Flutter

refactor to allow disposal of resources in destructors

handle destroyTexture correctly

correctly implement surface resizing/destruction

move Windows engine to Vulkan backend and flush after creating swapchain

add vulkan + vkshaders to Windows libs

update materials with Vulkan

move Vulkan implementation to thermion_Dart

remove extras folder

thermion_flutter plugin updates

update build hook to copy .lib file to output directory and use -vulkan lib zip file

thermion_flutter cleanup

reinstate stereoscopic on Windows

add dxgi and d3d11.lib to windows header pragma

update cli_windows sample project

copy filament/vulkan headers to output directory. This was originally added to facilitate linking on Windows (where thermion_flutter_plugin.cpp needs the Vulkan-related headers), but this doesn't actually solve the problem because there's no way that I've found to get the directory structure correct in the Dart native_assets build directory unless you explicitly address each inidivual file. The current approach is therefore to just keep a permanent copy of the headers in the thermion_filament directory (meaning these will need to be updated manually if the Filament version changes). However, I decided to keep the changes to build.dart because it doesn't have much negative impact and may be helpful in future.

disable stereoscopic on Windows and disable handle use after free checks

use filament headers for thermion_flutter

throw Exception for MSAA on Windows (note that passing msaa:true for setAntiAliasing doesn't actually set MSAA on other platforms, but at least it won't cause the engine to crash)

change header include path for Windows/Vulkan

change header include path for Windows/Vulkan

add filament/vulkan headers for flutter (Windows)

ensure destroyTexture platform methods accept an integer rather than a list

handle Android/Windows swapchain creation separately
2024-11-11 12:49:40 +08:00
Nick Fisher
6472670ec3 add createRenderTargetRenderThread 2024-11-11 12:49:40 +08:00
Nick Fisher
14b815e009 remove unnecessary _context property from FilamentViewer 2024-11-11 12:49:40 +08:00
Nick Fisher
124938dbc2 temporarily disable UnprojectTexture 2024-11-02 10:23:36 +08:00