Compare commits

..

1263 Commits

Author SHA1 Message Date
mafiesto4 6f83330321 Fix building game for linux on windows 2021-03-28 21:31:21 +02:00
mafiesto4 0a7f2fc043 Improve deploy of editor on linux 2021-03-28 21:14:03 +02:00
mafiesto4 c32e869c56 Fix packaging Editor on Linux 2021-03-28 20:11:24 +02:00
mafiesto4 23d38fc387 Fix regression in Bezier curve tangents calculation for Quaternions
85167b2d4b
2021-03-28 18:45:10 +02:00
mafiesto4 6d2092f9e8 Fix rendering volumetric fog influence from local lights with shadows 2021-03-27 20:06:57 +01:00
mafiesto4 0754434295 Fix UWP build 2021-03-27 19:27:22 +01:00
mafiesto4 732f74e5c9 Fix assertion on engine close due to rare invalid storage object refs count 2021-03-27 19:27:04 +01:00
mafiesto4 7de7c8806e Update particle assets (sprite rendering module values change) 2021-03-27 12:22:17 +01:00
mafiesto4 ebf2b0a2f3 Fix asset path used in registry
#394
2021-03-26 22:24:44 +01:00
mafiesto4 97fd733c3e Fix issue when spline point is deleted externally while being selected
#393
2021-03-26 22:00:15 +01:00
mafiesto4 c191815b82 Use static linking for Assimp on Linux, strip it from unused symbols and formats support 2021-03-26 21:30:30 +01:00
mafiesto4 7cf464aabb Tweak 2021-03-25 23:44:55 +01:00
mafiesto4 1a8456ea57 Tweak 2021-03-25 23:16:04 +01:00
mafiesto4 4847479dae Add Editor for Linux to Github Actions 2021-03-25 22:55:13 +01:00
mafiesto4 dbe5886ffe Possible fix for Editor build on Linux 2021-03-25 22:31:18 +01:00
mafiesto4 16a4b0dd8a Update libs for linux build 2021-03-25 22:23:25 +01:00
mafiesto4 0be815cddd Possible fix for missing include 2021-03-25 21:50:16 +01:00
mafiesto4 9f79d0e3c4 Add support for vertical and horizontal panels to arrange children based on the child anchor
#385
2021-03-25 21:45:29 +01:00
mafiesto4 d3bdc3cf8b Fix UI not being updated with particular panels used when changing child control anchors
#385
2021-03-25 21:27:42 +01:00
mafiesto4 5c495b987b Add Shift+Home shortcut to Text Boxes
#386
2021-03-25 21:14:37 +01:00
mafiesto4 2b741cae58 Fix navmesh tiles set resizing
#369
2021-03-25 20:52:58 +01:00
mafiesto4 44fc1f9d05 Fix using nested types in scripting api 2021-03-24 22:08:49 +01:00
mafiesto4 6982997a2b Fixes for serialization problems with custom structures 2021-03-24 22:08:40 +01:00
mafiesto4 de2db94b85 Add DrawCylinder and DrawWireCylinder to DebugDraw 2021-03-24 22:08:15 +01:00
mafiesto4 3f230415c4 Merge branch 'stefnotch-patch-7' 2021-03-24 22:04:37 +01:00
mafiesto4 b79f090364 Merge branch 'patch-7' of git://github.com/stefnotch/FlaxEngine into stefnotch-patch-7 2021-03-24 22:04:30 +01:00
mafiesto4 9db2feb674 Add passing custom compiler switch when invoking child Flax.Build process during deployment 2021-03-24 19:32:10 +01:00
mafiesto4 624d24d209 Remove unused using declaration 2021-03-24 19:31:42 +01:00
mafiesto4 3dbbcc3a8c Add support for using automated codesign for binaries in deployment 2021-03-24 19:31:22 +01:00
stefnotch 2c0520cc9d Update Matrix3x3.cs 2021-03-24 11:08:41 +01:00
mafiesto4 c0d0083cc2 Fix using orientation around selection in prefab window
#276
2021-03-23 11:06:13 +01:00
mafiesto4 934258aadb Fix UICanvas to face camera plane instead of camera position
#371
2021-03-23 10:25:31 +01:00
mafiesto4 16f81cc184 Fix updating Label layout after font change when using automatic size
#380
2021-03-23 09:32:12 +01:00
mafiesto4 e8c9856665 Fix Vertical/Horizontal panels issue with anchored child controls
#378
2021-03-23 09:24:56 +01:00
mafiesto4 fad1e6fdfc Fix regression from d65ae8de96 2021-03-23 09:17:45 +01:00
mafiesto4 fcd86bccf5 Fix scripting reload without scenes loaded
#375
2021-03-22 23:41:21 +01:00
mafiesto4 319bee0838 Fix Debug Log window info label 2021-03-22 23:29:54 +01:00
mafiesto4 f92dd5d34a Fix missing attribute 2021-03-22 20:15:34 +01:00
mafiesto4 d65ae8de96 Fix saving assets with path containing invalid slashes 2021-03-22 20:05:15 +01:00
mafiesto4 39a6d0d292 Add Unix network impl for Android 2021-03-22 11:23:25 +01:00
mafiesto4 78f8066d4d Fix code style 2021-03-22 10:24:22 +01:00
mafiesto4 b3e16a6b66 Fix material not updating on connection removal
#372
2021-03-22 10:24:15 +01:00
mafiesto4 cb96a87659 Fix crash when material is generated at 2 threads at once 2021-03-21 20:25:25 +01:00
mafiesto4 22812ad21e Fix game build 2021-03-21 15:34:15 +01:00
mafiesto4 a3eddd5b3b Fix bindings cache to rely on project name and version 2021-03-21 14:19:34 +01:00
mafiesto4 e095b610fd Bump the version number 2021-03-21 14:19:14 +01:00
mafiesto4 851fd1a6d0 Tweaks for prefabs first selection 2021-03-21 14:00:23 +01:00
mafiesto4 3bfb0e6cac Merge branch 'honzapatCZ-prefab-first' into 1.1 2021-03-21 13:46:59 +01:00
mafiesto4 cec4db1531 Merge branch 'prefab-first' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-prefab-first 2021-03-21 13:46:33 +01:00
mafiesto4 1c140a5b0e Fix crash in navmesh builder when scene gets unloaded after navmesh tile gets dirty 2021-03-21 13:44:30 +01:00
mafiesto4 f413431667 Add error check to prevent changing parent of the Scene actor 2021-03-21 13:27:45 +01:00
mafiesto4 160dfa5dc7 Fix Label text alignment in auto size text
#308
2021-03-20 18:49:31 +01:00
mafiesto4 0d12ccef64 Fix invalid Timeline layout UI when opening timeline data 2021-03-20 18:43:31 +01:00
mafiesto4 40a3fb96a2 Fix ParticleSystemWindow overlapping text bug
#239
2021-03-20 18:40:06 +01:00
mafiesto4 fac7c8aa6a Fix possible exception in actor editor bounds getters
#286
2021-03-20 17:56:55 +01:00
mafiesto4 7dd67b5ae3 Fix Label auto-height and auto-width when text overflows the lines and it's wrapped
#358
2021-03-20 13:06:35 +01:00
mafiesto4 59b975499f Fix WorldSpaceFaceCamera bug
#370
2021-03-20 12:15:50 +01:00
mafiesto4 7010c52af3 Fix missing selection type in CustomEditorPresenter 2021-03-19 17:15:18 +01:00
mafiesto4 29e06eb696 Add WorldSpaceFaceCamera mode to UICanvas
#359
2021-03-19 15:46:33 +01:00
mafiesto4 7ff5ebb45d Fix using scale mode Gizmo 2021-03-19 12:21:09 +01:00
mafiesto4 54753a49ed Add support for spawning Collision Data as Mesh Collider in viewport drag&drop 2021-03-19 12:15:50 +01:00
mafiesto4 4efd411045 Add improvements for objects spawning in editor viewport
#367
2021-03-19 12:15:13 +01:00
mafiesto4 b5845d2e12 Merge branch 'jb-perrier-canvasculling' into 1.1 2021-03-19 10:15:47 +01:00
mafiesto4 f1b100841d Merge branch 'canvasculling' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-canvasculling 2021-03-19 10:15:42 +01:00
mafiesto4 8626350e5f Fix possible issue for prefab reference value for default value object that might be deleted on prefab apply 2021-03-19 10:14:58 +01:00
mafiesto4 4ae3fccfd9 Improve focusing on selected object in Editor
#328
2021-03-18 22:20:27 +01:00
mafiesto4 255b2c85c8 Add bounds calculation for Spline 2021-03-18 21:51:15 +01:00
mafiesto4 8ef8b89fd5 Add constructor to BoundingBox for single point empty box construction 2021-03-18 21:50:05 +01:00
honzapatCZ f70b116fcb renamed 2021-03-18 19:18:59 +01:00
jb-perrier e0ae2984ae UICanvas frustum culling. 2021-03-18 18:59:32 +01:00
mafiesto4 544a11562c Add mouse centering in Editor Viewport if initial location is too close to the edge 2021-03-18 18:23:58 +01:00
honzapatCZ f688cd0c69 prefab first 2021-03-18 18:23:17 +01:00
mafiesto4 f32ea92336 Fix editor viewport camera orbiting issues
#354
2021-03-18 18:23:11 +01:00
mafiesto4 66c1b73635 Add F to focus camera view in asset previews 2021-03-18 17:55:07 +01:00
mafiesto4 759dc98737 Fix Rename Popup direction near screen edges
#317
2021-03-18 16:48:07 +01:00
mafiesto4 ac511cbadc Improve documentation comments for Control properties that are based on Pivot property 2021-03-18 16:34:54 +01:00
mafiesto4 7a12a6c280 Fix updating UICanvas when using World/Camera Space
#361
2021-03-18 15:59:01 +01:00
mafiesto4 abe635ad9b Fix exception in Custom Editors UI due to invalid reference value processing
#325
2021-03-18 15:12:25 +01:00
mafiesto4 960a122550 Revert children clipping to be called outside DrawChildren (regression from #355) 2021-03-18 14:26:00 +01:00
mafiesto4 922201d1c0 Fix bug with Vector Parameters in Animation Graph
#272
2021-03-18 14:18:40 +01:00
mafiesto4 5c171c8b58 Fix control Offsets updating for control bounds when changing anchors
#312
2021-03-18 13:16:17 +01:00
mafiesto4 6a6eb96793 Fix code style 2021-03-18 11:15:27 +01:00
mafiesto4 968f536cdb Merge branch 'jb-perrier-ui' into 1.1 2021-03-18 11:09:32 +01:00
mafiesto4 8078b9543d Merge branch 'ui' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-ui 2021-03-18 11:09:28 +01:00
mafiesto4 00842e89cb Merge branch 'master' into 1.1 2021-03-18 11:04:25 +01:00
mafiesto4 8c021b0252 Merge branch 'stefnotch-patch-6' 2021-03-18 11:03:14 +01:00
mafiesto4 56b0d885a6 Merge branch 'stefnotch-tweak-camera-projectpoint' into 1.1 2021-03-18 10:59:59 +01:00
mafiesto4 1f7a7a5488 Merge branch 'tweak-camera-projectpoint' of git://github.com/stefnotch/FlaxEngine into stefnotch-tweak-camera-projectpoint 2021-03-18 10:59:54 +01:00
mafiesto4 845da14e6a Fix UIControl setup on IsActive changes
#326
2021-03-18 10:56:48 +01:00
mafiesto4 a21f6d1b9f Fix order of new objects in Prefab after apply
#357
2021-03-18 09:20:47 +01:00
mafiesto4 42366ee66a Fix synchronizing nested prefabs when adding new ObjectsLookupIdMapping
#351
2021-03-18 00:04:58 +01:00
stefnotch 1940707b06 Update documentation comment for ClosestPointPointLine 2021-03-17 22:27:15 +01:00
jb-perrier c8b57d417c Convert Control to ContainerControl. 2021-03-17 20:53:42 +01:00
jb-perrier fb70368c8d Fix image ordering. 2021-03-17 20:22:27 +01:00
jb-perrier 5af3a22fd0 Add DrawSelf. 2021-03-17 20:22:06 +01:00
mafiesto4 df497bf684 Fix UIControl invalid showing in prefab window using nested prefab with UI 2021-03-17 19:25:12 +01:00
mafiesto4 675bb93fd5 Fix missing prefab instanced actors events sending on changes apply (regression) 2021-03-17 19:24:29 +01:00
mafiesto4 960268f756 Fix UICanvas state synchronization when working with prefabs 2021-03-17 19:23:54 +01:00
mafiesto4 92cfcbff8c Fix actor layer editor setup 2021-03-17 18:29:53 +01:00
mafiesto4 0c74e2ff9d Fix crash on prefab sync on instance with missing objects 2021-03-17 18:29:15 +01:00
mafiesto4 f194004ebf Fix synchronizing ActiveInTreeChanged property with event after prefab changes apply 2021-03-17 17:15:37 +01:00
mafiesto4 30615e842d Fix crash on Actor deserialization if parentId is missing but actor already has a parent 2021-03-17 17:14:57 +01:00
mafiesto4 c4d457d7b7 Fix control Offsets margin diff deserialziation 2021-03-17 17:01:10 +01:00
mafiesto4 518df5e62b Add skipping textbox scrolling if it has no selection 2021-03-17 13:44:38 +01:00
mafiesto4 e6d3242670 Fix invalid UIControl event blocking for prefab editor 2021-03-17 11:58:26 +01:00
mafiesto4 2a2d9f54de Fix UIControl location deserialization when using prefabs and anchors
#218
2021-03-17 11:55:17 +01:00
mafiesto4 0122bf68bf Fix skipping UICanvas diff serialization for Size property if render mode is ScreenSpace 2021-03-17 11:54:36 +01:00
mafiesto4 aa1c200bf8 Fix exception on engine closing in some cases 2021-03-17 11:12:20 +01:00
mafiesto4 8fb27e6f83 Fix missing UICanvas linkage in prefab preview
#218
2021-03-17 11:12:08 +01:00
mafiesto4 4eeadf87fb Fix warning 2021-03-17 10:28:14 +01:00
mafiesto4 a479f1daf6 Fix preserving objects order in prefab instances on apply (based on the prefab)
Fixes #346
2021-03-17 00:24:29 +01:00
mafiesto4 691df4cb80 Fix Dpi issues when RootWindow is null
Fix #344
2021-03-17 00:04:16 +01:00
mafiesto4 878fee505f Fix updating UI layout after changing control order 2021-03-16 23:38:56 +01:00
mafiesto4 1262243af9 Fix compilation 2021-03-16 23:14:29 +01:00
mafiesto4 b9ca496aff Fix compilation 2021-03-16 22:32:02 +01:00
mafiesto4 1567f8723d Fix typo 2021-03-16 22:31:51 +01:00
mafiesto4 3e56cd2c70 Add Network implementation for Unix 2021-03-16 22:15:46 +01:00
mafiesto4 bb6bbe9793 Tweaks for network impl on Win32 2021-03-16 22:15:46 +01:00
mafiesto4 ec7d892412 Add stripping binaries for editor distribution build 2021-03-16 22:15:46 +01:00
mafiesto4 5cad37fa50 Fix packaged editor usage 2021-03-16 22:15:46 +01:00
stefnotch 1d0faddd2a Fix game build 2021-03-15 21:22:41 +01:00
stefnotch fb28cae2b4 Move ScreenToGameViewport from Engine to Screen
And make it accessible from the C# side
2021-03-15 20:18:53 +01:00
stefnotch 97ab226d7e Update Camera.ProjectPoint documentation to be clearer 2021-03-15 20:18:13 +01:00
mafiesto4 4dbc770d75 Merge branch 'stefnotch-fix-dpi-issues-2' into 1.1 2021-03-15 18:40:28 +01:00
stefnotch b151ab497f Fix UICanvas high DPI issues 2021-03-15 17:30:35 +01:00
stefnotch 85ab871d48 Call the correct DPI getter
See also https://github.com/FlaxEngine/FlaxEngine/pull/267
2021-03-15 15:40:32 +01:00
mafiesto4 afea02d92f Allow lack of Game Settings in Editor 2021-03-14 23:58:19 +01:00
mafiesto4 b2c824b77e Fix various memory leaks on exit 2021-03-14 23:58:03 +01:00
mafiesto4 76e056698b Fix memory leak for Mono image refs 2021-03-14 23:57:37 +01:00
mafiesto4 1d575f51b6 Fix code style and optimize 2021-03-14 19:35:50 +01:00
mafiesto4 3abea4ec23 Merge branch 'honzapatCZ-patch-declarationSort' into 1.1 2021-03-14 19:29:07 +01:00
mafiesto4 146dffa732 Merge branch 'patch-declarationSort' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-patch-declarationSort 2021-03-14 19:29:02 +01:00
mafiesto4 54c10dd78d Fix code style 2021-03-14 19:27:49 +01:00
mafiesto4 c3c28413d7 Merge branch 'jb-perrier-ortho' into 1.1 2021-03-14 19:24:28 +01:00
mafiesto4 802893a214 Merge branch 'ortho' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-ortho 2021-03-14 19:24:24 +01:00
mafiesto4 97e44aee61 Merge branch 'jb-perrier-fullscreen' into 1.1 2021-03-14 19:18:43 +01:00
mafiesto4 3c5bbe5075 Merge branch 'fullscreen' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-fullscreen 2021-03-14 19:18:38 +01:00
mafiesto4 9ed0138a17 Fix crash on using Space char in font with no font atlases initialized 2021-03-14 19:01:42 +01:00
mafiesto4 bdd8242a0f Fix rotation gizmo
Revert 74d4bb8dc6
2021-03-14 19:01:08 +01:00
mafiesto4 2a8dc0ddba Re-add libs 2021-03-14 17:49:47 +01:00
mafiesto4 ecb788b28a Remove annoying link 2021-03-14 17:49:20 +01:00
mafiesto4 82a0039926 Fix binaries deploy in cooker 2021-03-13 12:49:13 +01:00
mafiesto4 722861b929 Add script to package editor for linux 2021-03-13 12:49:13 +01:00
mafiesto4 1d6240aca5 Fix output executable file flag 2021-03-13 12:49:13 +01:00
mafiesto4 437f7e6f9c Add libs 2021-03-13 12:49:13 +01:00
mafiesto4 c18e5f522a Fix link files usage to prevent issues with git changes status 2021-03-13 12:49:12 +01:00
mafiesto4 544a043c56 Fix crash for empty text in Text Render
Fixes #327
2021-03-12 15:33:09 +01:00
mafiesto4 a2be4bb74a Fix deserialization of UTF-8 string for C# object properties
Closes #320
2021-03-12 13:50:03 +01:00
mafiesto4 4d85a5ac3d Fix importing models with Assimp 2021-03-11 22:58:00 +01:00
mafiesto4 8db1a9b9ca Add support for exporting compressed textures in Editor on Linux using detex lib 2021-03-11 22:40:01 +01:00
mafiesto4 b4dcaef61a Add support for Game Cooker on Linux 2021-03-11 22:39:03 +01:00
mafiesto4 b04321bdd2 Fix bug in shader generator on Linux 2021-03-11 21:03:58 +01:00
mafiesto4 a1a9dfa6a2 Use color in linear format in TextureTool sampler operations 2021-03-11 19:59:34 +01:00
mafiesto4 6b614d5d57 Add support for importing textures with options in TextureTool with stb 2021-03-11 19:59:34 +01:00
mafiesto4 1eafae8888 Add support for converting textures in TextureTool with stb 2021-03-11 19:59:34 +01:00
mafiesto4 03f4e78158 Add support for compressing textures in TextureTool with stb 2021-03-11 19:59:34 +01:00
jb-perrier ba75cabdda Enable ALT+ENTER DX12. 2021-03-11 18:02:55 +01:00
jb-perrier cc5849100b Fix DX12 Fullscreen. 2021-03-11 18:02:17 +01:00
jb-perrier 6813cb607e Fix Fullscreen switch. 2021-03-11 17:58:25 +01:00
jb-perrier 74280b7411 Enable ALT+ENTER. 2021-03-11 17:57:26 +01:00
jb-perrier ee33c97db6 Refactoring, docs. 2021-03-09 00:03:32 +01:00
mafiesto4 d672826808 Merge branch 'stefnotch-ui-fixes' into 1.1 2021-03-08 22:36:49 +01:00
mafiesto4 0bf4ab9cb6 Merge branch 'ui-fixes' of git://github.com/stefnotch/FlaxEngine into stefnotch-ui-fixes 2021-03-08 22:36:46 +01:00
mafiesto4 84265322d5 Post merge fixes, tweaks, cleanup and improvements 2021-03-08 22:30:49 +01:00
mafiesto4 7fbb008ddd Merge branch 'honzapatCZ-better-uicontrol-editor' into 1.1 2021-03-08 22:01:38 +01:00
mafiesto4 d06433deed Merge branch 'better-uicontrol-editor' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-better-uicontrol-editor 2021-03-08 22:01:30 +01:00
mafiesto4 7b02a4b33b Merge branch 'GoaLitiuM-label_text_clip_margin_fix' into 1.1 2021-03-08 21:53:41 +01:00
mafiesto4 b7814e119b Merge branch 'label_text_clip_margin_fix' of git://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-label_text_clip_margin_fix 2021-03-08 21:53:35 +01:00
mafiesto4 0db1f5e965 Fix selection in high dpi 2021-03-08 20:57:35 +01:00
mafiesto4 33e88acf90 Merge branch 'GoaLitiuM-textbox_dpi_fix' into 1.1 2021-03-08 20:52:14 +01:00
mafiesto4 fcc0ca1772 Merge branch 'textbox_dpi_fix' of git://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-textbox_dpi_fix 2021-03-08 20:52:12 +01:00
mafiesto4 4502d29710 Merge branch 'stefnotch-fix-per-window-dpi' 2021-03-08 20:50:52 +01:00
mafiesto4 81f3a65a5f Merge branch 'fix-per-window-dpi' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-per-window-dpi
# Conflicts:
#	Source/Editor/Utilities/Utils.cs
#	Source/Editor/Windows/Assets/MaterialWindow.cs
#	Source/Editor/Windows/Assets/ParticleEmitterWindow.cs
#	Source/Engine/Platform/Linux/LinuxWindow.cpp
#	Source/Engine/Platform/Windows/WindowsWindow.cpp
2021-03-08 20:50:31 +01:00
mafiesto4 044234a55b Improve warning messages 2021-03-08 13:12:28 +01:00
mafiesto4 2f7a84822a Fix importing models with custom UnitScaleFactor 2021-03-08 13:12:15 +01:00
mafiesto4 aa28f9ef52 Optimize material shaders binding by caching time param once per draw pass 2021-03-08 12:47:14 +01:00
mafiesto4 c1b9dc4b2e Add support for using Level.SpawnActor to add scene from code 2021-03-08 12:27:05 +01:00
mafiesto4 fc13351a2b Fix crash on exit when loading storage file fails 2021-03-08 11:33:41 +01:00
mafiesto4 5f7830d09e Fixes and code cleanup for Flax Storage types 2021-03-08 11:33:19 +01:00
mafiesto4 30b71b9d65 Fix crash on close when using Vulkan/D3D12 rendering backend with async task being canceled 2021-03-08 11:32:47 +01:00
mafiesto4 f0e737fd4b Fix crash due to missing inlined buffer size in StringConverter 2021-03-08 10:31:37 +01:00
mafiesto4 5de2998774 Format code 2021-03-08 09:30:52 +01:00
mafiesto4 85c29c3d2b Merge branch 'network' of git://github.com/jb-perrier/FlaxEngine into 1.1
# Conflicts:
#	Source/Engine/Platform/Win32/Win32Network.cpp
2021-03-08 09:30:25 +01:00
mafiesto4 0a59c61100 Merge branch 'honzapatCZ-patch-3' into 1.1 2021-03-08 09:23:55 +01:00
mafiesto4 d9a516206c Merge branch 'patch-3' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-patch-3 2021-03-08 09:23:51 +01:00
honzapatCZ cbe97ef3f0 typo 2021-03-07 22:42:14 +01:00
mafiesto4 77b21de534 Fix UTF-8 and UTF-16 encoding support usage in Json resources
Closes #310
Closes #27
2021-03-07 21:30:01 +01:00
mafiesto4 400cc97100 Add StringUtils::ConvertUTF162UTF8 2021-03-07 21:05:19 +01:00
mafiesto4 2b42e9256c Cleanup and optimize StringUtils::ConvertUTF82UTF16 2021-03-07 18:09:26 +01:00
mafiesto4 862c02da6a Move some String methods impl into source from header 2021-03-07 16:57:40 +01:00
GoaLitiuM 4795ffdf3d Fix text not getting clipped in Label with negative margins 2021-03-07 15:45:34 +02:00
honzapatCZ 406db6704f Now its an editor option 2021-03-07 11:30:18 +01:00
mafiesto4 7cb0ac3603 Fix marking asset as edited when using Multi Blend node positions in Anim Graph
Closes #251
2021-03-07 10:31:31 +01:00
mafiesto4 b8d03636dc Merge branch 'master' into 1.1
# Conflicts:
#	.gitignore
2021-03-07 10:04:44 +01:00
honzapatCZ 2e687edd99 ui editor 2021-03-06 15:09:45 +01:00
jb-perrier a82c669504 Tweaks again ... 2021-03-06 13:19:49 +01:00
mafiesto4 8f4d88d607 Merge branch 'honzapatCZ-elementContainers' into 1.1 2021-03-05 19:06:35 +01:00
mafiesto4 28fea66282 Merge branch 'elementContainers' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-elementContainers 2021-03-05 19:06:28 +01:00
mafiesto4 268db124d9 Fix crash if actor in ViewportIconsRenderer::DrawIcons is null 2021-03-05 19:00:45 +01:00
mafiesto4 180efe86e6 Fix culling for Volumetric Fog particles to include particle radius 2021-03-05 14:36:59 +01:00
mafiesto4 dd1dd2ef8a Add Particle Radius to in-built particle attributes 2021-03-05 14:33:31 +01:00
mafiesto4 dbc88af339 Update Volumetric Fog asset 2021-03-05 14:23:45 +01:00
mafiesto4 89c966fee6 Merge branch 'GoaLitiuM-vscode_solution_files' into 1.1 2021-03-05 14:19:19 +01:00
mafiesto4 9f4c916016 Merge branch 'vscode_solution_files' of git://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-vscode_solution_files 2021-03-05 14:19:16 +01:00
mafiesto4 86f3007887 Optimize particle attributes offsets binding to shader 2021-03-05 13:58:17 +01:00
mafiesto4 758f260574 Add instancing as required for Volumetric Fog 2021-03-05 13:58:17 +01:00
mafiesto4 2e17a94216 Fix material Sphere Mask node if radius is specified as integer 2021-03-05 13:58:16 +01:00
mafiesto4 96cd3e560c Fix sampling particle position/velocity in material for emitters simulated in Local space 2021-03-05 13:58:16 +01:00
mafiesto4 1dee615d6e Add Volumetric Fog support for particles to modify local fog 2021-03-05 13:58:15 +01:00
mafiesto4 dfb502621d Fix crash in InputQueue handling when window object is deleted 2021-03-05 13:58:15 +01:00
honzapatCZ 06f3d68716 sub folder for element containers + horizontal panel + shorthands for horizontal and vertical panel 2021-03-04 23:39:38 +01:00
mafiesto4 d7bf276deb Merge branch 'stefnotch-patch-5' 2021-03-04 22:59:00 +01:00
mafiesto4 117008babd Merge branch 'patch-5' of git://github.com/stefnotch/FlaxEngine into stefnotch-patch-5 2021-03-04 22:58:55 +01:00
mafiesto4 68991d1222 Merge branch 'W2Wizard-patch-1' 2021-03-04 22:51:23 +01:00
honzapatCZ d09bd12e5b declaration at end 2021-03-04 19:57:15 +01:00
honzapatCZ 4593e4c669 declaration order sorting 2021-03-04 19:46:27 +01:00
mafiesto4 3cba76277b Fix CSG build crash
Closes #289
2021-03-04 09:45:58 +01:00
stefnotch a7d0853519 Update .gitignore 2021-03-03 18:58:53 +01:00
honzapatCZ e04f482e52 kinda mandatory 2021-03-03 18:32:52 +01:00
jb-perrier ae3ce49b92 Merge branch '1.1' of https://github.com/FlaxEngine/FlaxEngine into ortho 2021-03-02 18:27:33 +01:00
jb-perrier 512df5f673 Tweaks. 2021-03-02 18:27:14 +01:00
GoaLitiuM 69a3587f5d Set solution file as default launch solution for Omnisharp 2021-03-02 18:40:12 +02:00
GoaLitiuM 9f1c55edce Generate Visual Studio solution files for VSCode solutions 2021-03-02 18:38:05 +02:00
GoaLitiuM 8ccb4f5857 Support generating multiple project formats at once 2021-03-02 17:35:52 +02:00
mafiesto4 9c80354acf Fix dock window icon rectangle calculation if icon is used 2021-03-02 13:44:16 +01:00
mafiesto4 835cb93261 Add integration with Rider IDE 2021-03-02 13:43:50 +01:00
W2.Wizard 2193dfcbc1 Use remap function instead 2021-03-02 00:10:43 +01:00
jb-perrier 1deadf84b1 Tweaks. 2021-03-01 16:25:08 +01:00
jb-perrier 8a9f86705b Merge branch '1.1' of https://github.com/FlaxEngine/FlaxEngine into ortho
 Conflicts:
	Source/Editor/Viewport/EditorViewport.cs
2021-03-01 16:21:58 +01:00
jb-perrier 111eaf1cf9 Tweaks. 2021-03-01 16:19:00 +01:00
mafiesto4 d6b566a3fe Add support for accessing Game Settings and related assets in C# API in game build 2021-03-01 16:17:01 +01:00
mafiesto4 e218cc417f Fix findRandomPointAroundCircle in Detour lib to return points inside circle 2021-03-01 14:37:19 +01:00
mafiesto4 99bc3289e8 Add FindRandomPoint and FindRandomPointAroundCircle to the navigation utilities 2021-03-01 14:32:35 +01:00
mafiesto4 31d1932d55 Fix debug shapes leftovers update in editor after playmode
Fixes #223
2021-03-01 14:32:06 +01:00
mafiesto4 8f633523cd Update Recast navigation lib to e75adf86f91eb3082220085e42dda62679f9a3ea 2021-03-01 14:31:28 +01:00
mafiesto4 21d96c6baf Fix loading game assets in cooked build via path relative to the project folder 2021-03-01 13:00:07 +01:00
mafiesto4 489e8ddc42 Format code 2021-03-01 11:55:31 +01:00
mafiesto4 113fe30d5a Merge branch 'jb-perrier-render2dtint' into 1.1 2021-03-01 11:52:26 +01:00
mafiesto4 0ccffb7691 Merge branch 'render2dtint' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-render2dtint 2021-03-01 11:52:23 +01:00
mafiesto4 8750b61221 Merge branch 'honzapatCZ-patch-1' into 1.1 2021-03-01 11:50:59 +01:00
mafiesto4 db921bad10 Merge branch 'patch-1' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-patch-1 2021-03-01 11:50:54 +01:00
mafiesto4 e0c6f7e8b2 Fix placement and usage of the new instance creation button in GenericEditor 2021-03-01 11:44:18 +01:00
mafiesto4 b4e09a9d55 Fix adding items in Array/List editors if element type is reference (eg. class) 2021-03-01 11:43:46 +01:00
mafiesto4 dbec1389e8 Fix using Scripts in async 2021-03-01 10:46:06 +01:00
mafiesto4 a7bb25b7d5 Add support for resizing textures with stb in TextureTool 2021-02-28 19:14:30 +01:00
mafiesto4 90e385c3c3 Update stb lib 2021-02-28 19:13:05 +01:00
jb-perrier ce45070d63 Tweaks. 2021-02-28 17:45:38 +01:00
mafiesto4 1be5815df3 Add alpha channel detection in stb texture importer 2021-02-28 17:16:45 +01:00
mafiesto4 51e62c7e9d Fix file copy on unix systems 2021-02-28 17:02:02 +01:00
mafiesto4 b3fdc9eddd Add ShowFileExplorer on Linux 2021-02-28 16:45:16 +01:00
mafiesto4 08a428416c Fix 2021-02-28 16:41:58 +01:00
jb-perrier aaecb6f7fd Cleanup. 2021-02-28 16:28:41 +01:00
jb-perrier eb1a520986 Support focus actor in orthographic mode ( F key ), preserve camera direction. 2021-02-28 16:27:57 +01:00
mafiesto4 7ec57f8ddb Add support for opening url links on Linux 2021-02-28 16:15:20 +01:00
mafiesto4 957b92eac7 Fix windows cleanup to prevent unmapped leftovers on Linux X11 2021-02-28 16:11:59 +01:00
jb-perrier 19bf30558b Typo. 2021-02-28 15:56:19 +01:00
mafiesto4 a0740c162a Fix using bundled mono for VS Code build tasks 2021-02-28 15:03:51 +01:00
mafiesto4 98a753267f Linux support improvements 2021-02-28 14:56:57 +01:00
mafiesto4 657de4b62c Fix Linxu build 2021-02-28 13:28:33 +01:00
mafiesto4 a293265058 Add more files to ignore for watchers in VS Code project 2021-02-28 13:22:39 +01:00
Nejcraft a1e7f4f689 some quotes from discord 2021-02-28 09:26:54 +01:00
jb-perrier a1e8056070 Missing empty line. 2021-02-28 00:41:38 +01:00
jb-perrier 86ce671c0d Add doc. 2021-02-28 00:40:41 +01:00
jb-perrier 16056a00e0 Add inherit param. 2021-02-28 00:37:30 +01:00
jb-perrier 89538cb5cd Use wheel option, and tweaks/fixes. 2021-02-27 23:38:56 +01:00
jb-perrier 39e41d8528 Add Mouse Wheel Sensitivity option. 2021-02-27 23:38:06 +01:00
jb-perrier 0d82be3ac8 Current tint mult by previous one. 2021-02-27 22:43:56 +01:00
mafiesto4 f999f337b5 Merge branch 'jb-perrier-orientation' into 1.1 2021-02-27 20:51:38 +01:00
mafiesto4 af792ff677 Merge branch 'orientation' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-orientation 2021-02-27 20:51:31 +01:00
mafiesto4 fbecd01435 Merge branch 'visject-improvements-6' of git://github.com/stefnotch/FlaxEngine into stefnotch-visject-improvements-6 2021-02-27 20:44:29 +01:00
mafiesto4 8d40ab5883 Add more info for mono usage 2021-02-27 20:36:01 +01:00
jb-perrier 4972092150 Fix when no focus. 2021-02-27 20:35:34 +01:00
jb-perrier 3472daf97d Add ortho scale on MouseScroll. 2021-02-27 20:27:06 +01:00
jb-perrier f939eec924 Tweak Render2D Tint. 2021-02-27 18:18:34 +01:00
jb-perrier ab77e5ef31 Add Tint to Render2D. 2021-02-27 18:14:20 +01:00
jb-perrier 20edcdc64b Merge branch '1.1' of https://github.com/FlaxEngine/FlaxEngine into orientation 2021-02-27 17:02:42 +01:00
mafiesto4 93541b6ed5 Merge branch 'master' into 1.1 2021-02-27 16:42:53 +01:00
mafiesto4 ca3948ad69 Format code 2021-02-27 16:29:30 +01:00
mafiesto4 88db7c2d5f Merge branch 'honzapatCZ-patch-2' into 1.1 2021-02-27 16:25:59 +01:00
mafiesto4 8857a7a0ae Merge branch 'patch-2' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-patch-2 2021-02-27 16:25:55 +01:00
jb-perrier 1d5f98a730 Fix camera orientations. 2021-02-27 15:39:26 +01:00
Nejcraft 84015f78fc Ported Vecctor3 ClampLength to others and remade it using refs 2021-02-27 12:07:26 +01:00
mafiesto4 6cea33caea Merge branch 'GoaLitiuM-textboxbase_changes' into 1.1 2021-02-27 00:59:25 +01:00
mafiesto4 233bffdf63 Merge branch 'textboxbase_changes' of git://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-textboxbase_changes 2021-02-27 00:59:22 +01:00
mafiesto4 3bc664df37 Format code 2021-02-27 00:55:49 +01:00
mafiesto4 05eac5aeb6 Merge branch 'honzapatCZ-patch-1' into 1.1 2021-02-27 00:53:46 +01:00
mafiesto4 26244df222 Merge branch 'patch-1' of git://github.com/honzapatCZ/FlaxEngine into honzapatCZ-patch-1 2021-02-27 00:53:40 +01:00
mafiesto4 c3e3e70f96 Add minor tweaks for debug code and add mono dev docs 2021-02-27 00:39:12 +01:00
mafiesto4 cdf66372e6 Add write barriers for Mono GC in bindings glue code 2021-02-27 00:38:42 +01:00
mafiesto4 bcf86d9d9f Add StringBuilder::ToStringView() 2021-02-27 00:00:28 +01:00
mafiesto4 86c1823d4a Fix typo 2021-02-27 00:00:02 +01:00
stefnotch f3c608f2f3 Improve arrow key navigation 2021-02-26 19:09:59 +01:00
stefnotch 09f8ad948a Prevent multiple connections on reroute node 2021-02-26 19:08:25 +01:00
mafiesto4 8b4a001641 Move Win32 GetBatteryInfo into Windows and UWP platforms impl 2021-02-26 15:42:46 +01:00
mafiesto4 b402232a47 Move IES profile importer into ContentImporters module 2021-02-26 15:41:04 +01:00
mafiesto4 327fa6718e Refactor AssetsContainer 2021-02-26 15:40:44 +01:00
mafiesto4 e1497bcfe2 Optimize DebugLog stack trace formatting 2021-02-26 14:08:53 +01:00
mafiesto4 0a54b9e77e Add newest dbghelp.dll lib 2021-02-26 13:59:06 +01:00
mafiesto4 ff70c16051 Add support for capturing stack trace of called DebugLog from C++ 2021-02-26 13:58:42 +01:00
mafiesto4 a45b71617d Add separate Platform::GetStackTrace and Platform::GetStackFrames 2021-02-26 13:58:02 +01:00
stefnotch ebfa3822ef Fixes for the reroute node 2021-02-26 13:19:53 +01:00
stefnotch 0334329c50 Handle lost connections in reroute nodes
An alternative solution to that problem
2021-02-26 12:55:32 +01:00
mafiesto4 e1387e92a3 Fix Debug Log stack trace collecting in Editor
Fixes #51
2021-02-26 12:49:33 +01:00
mafiesto4 13cc6eb7b9 Cleanup DebugLog internal calls 2021-02-26 11:50:05 +01:00
stefnotch 70b0aa25b6 Undo-able reroute node adding 2021-02-26 11:14:22 +01:00
stefnotch 69162ad8d9 Fix visject connections redo
Previously, it would create double connections
2021-02-26 10:43:31 +01:00
stefnotch 9ed0ace01e Tweak DrawFPS documentation comment 2021-02-26 09:14:16 +01:00
stefnotch fd802e54fb Implement reroute node code 2021-02-25 22:01:45 +01:00
stefnotch 9265f23681 Basic reroute nodes 2021-02-25 20:22:54 +01:00
mafiesto4 e9adaa7c87 Update project instructions for Linux devs 2021-02-25 16:41:55 +01:00
mafiesto4 27d53b69dc Fix some minor issues with materials previews in Editor 2021-02-25 16:38:08 +01:00
mafiesto4 4d73b271b8 Fix some minor issues with materials previews in Editor 2021-02-25 16:38:05 +01:00
mafiesto4 26607c1d09 Add more utilities to LayersMask 2021-02-25 15:46:10 +01:00
mafiesto4 5d2fe5908b Add editor window outline color to match the status bar color 2021-02-25 14:46:17 +01:00
mafiesto4 43d578deb2 Add support for borderless window style on Windows that supports system docking and aero shadow 2021-02-25 14:46:16 +01:00
mafiesto4 529a82234b Add support for using ThirdPartyModule in game/project scripting 2021-02-25 13:02:48 +01:00
mafiesto4 6f12dc8567 Add improved dll import/export attributes injection when building binary modules 2021-02-25 13:02:13 +01:00
mafiesto4 b193a7abc4 Add support for binary modules with native-code only 2021-02-25 13:01:15 +01:00
mafiesto4 d41daee94c Fix warning 2021-02-25 11:14:42 +01:00
stefnotch bcc036f808 Hover over connections 2021-02-25 09:55:17 +01:00
mafiesto4 3da6f9186c Add clipboard support on Linux 2021-02-24 21:19:14 +01:00
stefnotch 1dbbbeced1 Specialized Visject Connection Broadphase Intersection 2021-02-24 21:05:10 +01:00
mafiesto4 d4b2171c19 Fix warnings 2021-02-24 20:12:13 +01:00
Nejcraft 5d7940f784 Unified 2021-02-24 14:25:49 +01:00
mafiesto4 6f3e7bc253 Fix compilation errors on CI 2021-02-24 01:06:29 +01:00
mafiesto4 e66045029f Fix compilation errors on CI 2021-02-24 00:51:19 +01:00
mafiesto4 bc1b666b83 Fix compilation errors on CI 2021-02-24 00:34:41 +01:00
mafiesto4 4cc7ec0461 Fix compilation errors on CI 2021-02-24 00:21:02 +01:00
mafiesto4 706c4bd677 Fixes for generated project files on Linux 2021-02-24 00:01:38 +01:00
mafiesto4 6ec58664e4 Make DotNet build task verbose about compiled C# lib output path 2021-02-23 23:38:39 +01:00
mafiesto4 463251a7fa Restore Linux build on Github Actions 2021-02-23 23:38:12 +01:00
mafiesto4 f688f3ce20 Tweak git ignored files 2021-02-23 23:28:41 +01:00
mafiesto4 a21d1a91fc Fix compilation warnings under Clang 10 2021-02-23 23:28:28 +01:00
mafiesto4 c0f81a6f0a Add support for Clang 6, 8, 9 and 10 when building for Linux 2021-02-23 23:28:06 +01:00
mafiesto4 84ee882439 Post merge fixes 2021-02-23 22:43:07 +01:00
mafiesto4 5a9ca6f130 Merge remote-tracking branch 'origin/1.1' into linux-editor
# Conflicts:
#	Source/Engine/Core/Math/BoundingSphere.cs
#	Source/Engine/Debug/DebugDraw.cpp
#	Source/Engine/Platform/Win32/Win32Platform.cpp
#	Source/Engine/Platform/Win32/Win32Platform.h
2021-02-23 22:32:17 +01:00
mafiesto4 cf3ac7a26e Merge remote-tracking branch 'origin/master' into linux-editor
# Conflicts:
#	Source/Engine/Core/Math/Color.cs
#	Source/Engine/Navigation/Navigation.cpp
#	Source/Engine/Platform/Win32/Win32Platform.cpp
2021-02-23 22:29:07 +01:00
mafiesto4 747a9bcb98 Fix shared library building on Linux for proper loading at runtime with default soname 2021-02-23 22:24:24 +01:00
mafiesto4 63a6b704df Compile Linux deps with -fPIC 2021-02-23 22:23:58 +01:00
mafiesto4 e160d719a9 Add support for C++ scripting on platforms that don't support referencing executable file when linking shared library (eg. Linux) 2021-02-23 22:23:03 +01:00
mafiesto4 87a290b45c Fix UWP build setup messing with FlaxGame target output type 2021-02-23 18:38:57 +01:00
mafiesto4 3387da92ed Optimize 2021-02-23 18:17:18 +01:00
mafiesto4 12725ca4e1 Fix Graphics module warnings to be sent once 2021-02-23 18:10:57 +01:00
mafiesto4 6f40c66b31 Add WarningOnce, ErrorOnce, InfoOnce, VerboseOnce to Flax.Build logger 2021-02-23 18:10:40 +01:00
mafiesto4 3ddd64df2a Add support for drawing SpriteHandle in Sprite Render 2021-02-23 13:57:51 +01:00
mafiesto4 24d31d024d Add Mask ZW node to all Visject surfaces 2021-02-23 13:57:34 +01:00
mafiesto4 d01365d416 Tweak comments to use less lines 2021-02-23 13:23:33 +01:00
mafiesto4 19c83e3b6e Add Sprite Render actor for sprites drawing 2021-02-23 13:23:22 +01:00
stefnotch 81fa876940 Drop unused boxes in Visject serialization 2021-02-23 11:33:51 +01:00
mafiesto4 7fd542950f Add BoundingSphere::Transform method 2021-02-23 09:53:44 +01:00
mafiesto4 e4794c5754 Add Absolute and Negative to Vector3 C# API 2021-02-23 09:53:00 +01:00
mafiesto4 9d35068514 Fix crash when calling navigation system before navmesh init (eg. in build) 2021-02-22 23:16:12 +01:00
stefnotch a2f01ba638 Add more descriptive "no scene" message
This is worthwhile, since this is one of the first messages a newcomer will see
2021-02-22 19:27:16 +01:00
mafiesto4 07f7fee4a8 Fix collecting binary modules for targets with Modular linkage 2021-02-22 17:18:03 +01:00
mafiesto4 f3216a9c96 Add layers and tags updating 2021-02-22 11:22:44 +01:00
stefnotch 0a9e9e6695 Address review comments 2021-02-21 20:50:21 +01:00
stefnotch 7f5903584e Properly place the main window
(Wohoo, I fixed one really irritating bug!)
2021-02-21 20:49:40 +01:00
mafiesto4 1ead4b1649 Fix MaterialParams sync bug 2021-02-21 20:20:32 +01:00
mafiesto4 279d168b35 Merge branch 'W2Wizard-CodeCleanUp' 2021-02-21 20:19:12 +01:00
mafiesto4 09651fa0fd Merge branch 'CodeCleanUp' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-CodeCleanUp 2021-02-21 20:19:07 +01:00
mafiesto4 3844aceba1 Fix CPU particles data initialization bug
Fixes #226
2021-02-21 20:14:21 +01:00
mafiesto4 170d018f88 Merge branch 'Vizepi-master' 2021-02-21 19:50:37 +01:00
mafiesto4 4c587ce870 Merge branch 'master' of git://github.com/Vizepi/FlaxEngine into Vizepi-master 2021-02-21 19:50:33 +01:00
W2.Wizard 89734760fa Revert previous checks, revert switch intend 2021-02-21 19:48:23 +01:00
Vizepi 00b3760fbd [C++] Added auto serialization by default in C++ script template 2021-02-21 19:46:32 +01:00
stefnotch 2498d1d4f2 Tweak items matching priority 2021-02-21 19:44:47 +01:00
mafiesto4 2a3003101e Fix automatic tooltip generation error
Fixes #265
2021-02-21 19:39:53 +01:00
W2.Wizard 35b687bf3d Additional cleanup
Cleaned up some additional stuff that I found
2021-02-21 18:17:35 +01:00
mafiesto4 6683cb299e Merge branch 'stefnotch-ui-dockwindow-icons' into 1.1 2021-02-21 17:50:39 +01:00
mafiesto4 e79321241c Merge branch 'ui-dockwindow-icons' of git://github.com/stefnotch/FlaxEngine into stefnotch-ui-dockwindow-icons 2021-02-21 17:50:30 +01:00
mafiesto4 d018478255 Merge branch 'Erdroy-pagealloc_utils' into 1.1 2021-02-21 17:41:34 +01:00
mafiesto4 f2dc7346ad Merge branch 'pagealloc_utils' of git://github.com/Erdroy/FlaxEngine into Erdroy-pagealloc_utils 2021-02-21 17:41:30 +01:00
mafiesto4 919bd4ee1b Fix MaterialParams sync bug 2021-02-21 17:40:37 +01:00
W2.Wizard 8b3fc9842d Apply review changes
Applied review changes and one additional skip of an unused variable
2021-02-21 17:03:58 +01:00
mafiesto4 a1d4e50e98 Fix 2021-02-21 16:49:30 +01:00
mafiesto4 506ce69f53 Fix batching draw calls after recent refactor 2021-02-21 16:49:19 +01:00
mafiesto4 67dd80e40d Fix shader error when using LOD dither transition 2021-02-21 15:37:04 +01:00
GoaLitiuM 9752bfabee Allow overriding most of the methods in TextBoxBase 2021-02-21 16:07:02 +02:00
GoaLitiuM cfb02692df Fix TextBox caret and selection size with custom DPI 2021-02-21 16:05:37 +02:00
mafiesto4 3bc99c0949 Fix error on starting task to continue if it has been canceled 2021-02-21 15:01:03 +01:00
mafiesto4 12c503646d Add more separators to TextBoxBase 2021-02-21 15:00:45 +01:00
Erdroy 1b234fd32b Update AllocatePages comment to point to the correct page size API 2021-02-21 14:45:31 +01:00
Erdroy 5bdf4dc74e Fix Unix platform 2021-02-21 14:44:47 +01:00
Erdroy 15028c60ba Remove GetDefaultPageSize
Duplicate. We already have the API for this: `Platform::GetCPUInfo().PageSize`.
2021-02-21 14:44:16 +01:00
W2.Wizard 3c603d7f09 Final Changes 2021-02-21 14:38:01 +01:00
mafiesto4 07f680eed2 Fix compilation of Flax.Build with older C# compiler 2021-02-21 14:32:40 +01:00
W2.Wizard 68f6e0251c Cleanup 8 2021-02-21 14:27:44 +01:00
mafiesto4 8e0493ee97 Merge branch 'GoaLitiuM-font_linespacing_fix' into 1.1 2021-02-21 14:16:55 +01:00
mafiesto4 085186cfff Merge branch 'font_linespacing_fix' of git://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-font_linespacing_fix 2021-02-21 14:16:52 +01:00
mafiesto4 9454f96e0b Merge branch 'GoaLitiuM-textboxbase_changes' into 1.1 2021-02-21 14:15:05 +01:00
mafiesto4 1745984d5a Merge branch 'textboxbase_changes' of git://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-textboxbase_changes 2021-02-21 14:15:00 +01:00
mafiesto4 e98380e0fa Merge branch 'GoaLitiuM-fix_windows_platform_toolset_req' into 1.1 2021-02-21 14:12:16 +01:00
mafiesto4 68b4fdb9c3 Fix exception when loading Android NDKs with invalid version folder
Fixes #255
2021-02-21 14:10:51 +01:00
W2.Wizard a4409c729b Fix Gizmo issue
For some reason the cleanup changed TransformGizmo to TransformGizmoBase in a few files.
2021-02-21 14:08:11 +01:00
W2.Wizard 597a9c537d Cleanup 7 2021-02-21 13:50:25 +01:00
mafiesto4 ae44ef0a79 Merge branch 'W2Wizard-HSVToRGB' 2021-02-21 13:48:59 +01:00
mafiesto4 fec787b96b Merge branch 'HSVToRGB' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-HSVToRGB 2021-02-21 13:48:57 +01:00
stefnotch 22b798928a Add icon to content window 2021-02-21 12:58:45 +01:00
stefnotch 1fb07a01d2 Basic icon for log window
It also clears the icon when you click on the window
2021-02-21 12:53:08 +01:00
W2.Wizard d87f0df2a6 Cleanup 6 2021-02-21 12:05:40 +01:00
W2.Wizard 694b20148d Cleanup 5 2021-02-21 11:50:30 +01:00
W2.Wizard ee76440477 Cleanup 4 2021-02-21 11:41:30 +01:00
stefnotch 74d4bb8dc6 Fix mouse jittering when pressing both mouse buttons simultaneously 2021-02-21 11:27:18 +01:00
W2.Wizard 20ba37e223 Cleanup 3 2021-02-21 11:09:04 +01:00
W2.Wizard 92fafe877c Cleanup 2 2021-02-21 10:23:01 +01:00
W2.Wizard 52bc268ee7 Cleanup 1 2021-02-21 10:05:47 +01:00
Ari Vuollet 49a0d66bfe Fix font character and hit location calculations with line spacing 2021-02-20 23:14:09 +02:00
Ari Vuollet e2590b5f11 Allow overriding most of the methods in TextBoxBase 2021-02-20 23:07:21 +02:00
stefnotch 8fe656b88f Always focus tab on click 2021-02-20 22:07:15 +01:00
mafiesto4 05d5fd4fec Optimize compilation time for Win32 platforms 2021-02-20 19:45:58 +01:00
Ari Vuollet cd7642eeec Fix building engine with latest Windows platform toolset only 2021-02-20 19:10:04 +02:00
Nejcraft b133539c40 Add Vector3 Clamp 2021-02-20 16:24:48 +01:00
W2.Wizard c475e83aa3 Added RGBToHSV 2021-02-20 15:44:06 +01:00
jb-perrier 78c5644de0 Tweak default value. 2021-02-20 15:28:46 +01:00
Nejcraft db3552509a How many times can I fuck up? 2021-02-20 14:59:42 +01:00
Nejcraft 3da17918aa Overloaded 2021-02-20 14:58:05 +01:00
Nejcraft 2f0c96abe2 now it'll work 2021-02-20 14:52:02 +01:00
Nejcraft 5de034f073 Add some defaults to Quaternion helpers 2021-02-20 14:20:26 +01:00
Erdroy 161e9bd373 Add page allocation utility functions 2021-02-19 21:47:17 +01:00
stefnotch e176ea749c Technically, reversing a unicode string involves unicode stuff
Like this
2021-02-19 20:31:47 +01:00
W2.Wizard da24a474ea Add HSVToRGB 2021-02-19 18:23:23 +01:00
mafiesto4 09be8994e9 Add Render Layers to Camera and Render View for masking objects during rendering 2021-02-19 17:26:41 +01:00
mafiesto4 d866526dd8 Optimize Serialization.h to have separate SerializationFwd.h for more lightweight types serialization impl 2021-02-19 17:07:24 +01:00
mafiesto4 6d7bd78816 Optimize automatic navmesh rebuild in editor for navmesh relevant actors only 2021-02-19 13:02:27 +01:00
stefnotch 3964fc7795 Automatic rename UIControl Items
See #213
2021-02-19 12:55:22 +01:00
mafiesto4 9f80b9853c Merge remote-tracking branch 'origin/master' into 1.1 2021-02-19 12:31:58 +01:00
mafiesto4 2f12e67356 Fix handling errors when saving scripting API parsing cache 2021-02-19 12:25:53 +01:00
mafiesto4 ce9df56a97 Fix particles view information in Editor when Game window is unused 2021-02-19 11:23:18 +01:00
mafiesto4 cc980fd70d Optimize MAssembly::GetClass(MonoClass* monoClass) search via assembly image early out 2021-02-19 11:04:29 +01:00
mafiesto4 fe1d1b20f8 Fix MAssembly::GetClass(MonoClass* monoClass) for generic classes 2021-02-19 11:03:56 +01:00
mafiesto4 c86508ef57 Add support for updating particle effects in editor view when editing 2021-02-19 11:01:21 +01:00
mafiesto4 c25abfda65 Remove ProjectInfo.h include from Editor.h 2021-02-19 09:36:23 +01:00
jb-perrier cc0fe5bc28 Use Platform::Allocate/Free. + tweaks. 2021-02-18 23:04:45 +01:00
mafiesto4 115d6e46a8 Merge branch 'jb-perrier-tooltip-custom-style' 2021-02-18 22:49:29 +01:00
mafiesto4 5a03ef8e89 Merge branch 'tooltip-custom-style' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-tooltip-custom-style 2021-02-18 22:49:21 +01:00
mafiesto4 4aabb81c1f Use constructors for random generation methods 2021-02-18 22:43:46 +01:00
jb-perrier bdfdb422fa Fix. 2021-02-18 22:41:43 +01:00
jb-perrier 81bb322fd2 Refactor NetworkSocketOption to support user defined size. 2021-02-18 22:41:05 +01:00
mafiesto4 915ac0122f Merge branch 'W2Wizard-RandomFuncs' 2021-02-18 22:39:41 +01:00
jb-perrier 7b0717094b Fix. 2021-02-18 22:39:41 +01:00
mafiesto4 64d7684551 Merge branch 'RandomFuncs' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-RandomFuncs 2021-02-18 22:39:33 +01:00
jb-perrier 431c21caa8 Refactor ClearGroup. 2021-02-18 19:45:16 +01:00
jb-perrier d1f30a973d Add RemoveSocketFromGroup. 2021-02-18 19:40:45 +01:00
jb-perrier 94381f356c Merge branch '1.1' of https://github.com/FlaxEngine/FlaxEngine into network 2021-02-18 19:35:21 +01:00
jb-perrier 0be22bf4b6 Tweaks. 2021-02-18 18:07:24 +01:00
jb-perrier 4ec2381716 Add GetSocketFromGroup. 2021-02-18 18:07:12 +01:00
jb-perrier 4408e3bb3b Add socket option TYPE. 2021-02-18 18:06:36 +01:00
jb-perrier af0fb6c6fa Add NetworkAddress. 2021-02-18 18:05:45 +01:00
mafiesto4 dc352edce7 Add DebugDraw::DrawText for drawing 3D debug text in the world 2021-02-18 15:16:10 +01:00
mafiesto4 74823a8bcf Add DebugDraw::DrawText for drawing 2D debug text on a screen 2021-02-18 12:39:53 +01:00
mafiesto4 32c5a84576 Revert "Fix right-click context menu for Visject Nodes"
This reverts commit a4763f630e.

It has been superseded by
https://github.com/FlaxEngine/FlaxEngine/pull/107/commits/ef2dbb7818e8fc38b6a49a1f512be07a00e37c1a
2021-02-18 11:32:11 +01:00
mafiesto4 161917977c Add reusing created collision data for model when UI requests it 2021-02-18 11:12:36 +01:00
mafiesto4 9ee6104706 Add Add mesh collider option to Static Model context menu 2021-02-18 11:12:09 +01:00
mafiesto4 96846ea255 Fixes for actor converting feature 2021-02-18 10:35:24 +01:00
mafiesto4 f8290ea0c1 Merge branch 'jb-perrier-convertactor' into 1.1 2021-02-18 10:18:27 +01:00
mafiesto4 5507fea29d Merge branch 'convertactor' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-convertactor 2021-02-18 10:18:25 +01:00
mafiesto4 18095d5adc Merge branch 'jb-perrier-render2d' into 1.1 2021-02-18 10:04:09 +01:00
mafiesto4 f50022e88e Merge branch 'render2d' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-render2d 2021-02-18 10:03:10 +01:00
stefnotch 0b54691f07 Basic Visject box arrow key navigation 2021-02-17 22:36:11 +01:00
mafiesto4 7ad64d0284 Add support for viewport icons rendering in prefab editor window 2021-02-17 17:42:40 +01:00
mafiesto4 978ee84aea Add support for debug shapes preview in prefab editor window 2021-02-17 17:23:43 +01:00
mafiesto4 580e08b6ab Silence warning 2021-02-17 16:10:15 +01:00
mafiesto4 88b575539a Add more utilities to SceneReference 2021-02-17 16:05:59 +01:00
mafiesto4 c8a70ffda6 Add passing compiler to the build commands from generated projects 2021-02-17 15:58:52 +01:00
mafiesto4 2609f9c21a Add support for copy/pasting script properties 2021-02-17 15:25:45 +01:00
jb-perrier 622e608d76 Merge branch '1.1' of https://github.com/FlaxEngine/FlaxEngine into render2d 2021-02-17 14:39:51 +01:00
jb-perrier cd0a1a5fdd Merge branch '1.1' of https://github.com/FlaxEngine/FlaxEngine into convertactor 2021-02-17 14:30:11 +01:00
mafiesto4 ed04eece8a Add support for mapping objects in SceneAnimationPlayer to reuse it for different objects 2021-02-17 13:02:47 +01:00
mafiesto4 cae0b5e91e Add info group for selected Rigidbody in play mode (display speed, velocity, angular velocity, etc.) 2021-02-17 12:51:39 +01:00
jb-perrier 1c1e9bb105 Fix re-drawing the background when alpha > 0 . 2021-02-17 12:44:44 +01:00
mafiesto4 d88335c51f Add support for audio clip playback preview in editor window 2021-02-17 12:31:30 +01:00
mafiesto4 62bfc94f24 Add EditorScene for using gameplay logic in editor preview windows 2021-02-17 12:31:03 +01:00
jb-perrier d896f4f699 Fix script error on undo. 2021-02-17 11:38:42 +01:00
mafiesto4 57e4831a5f Update readme for new setup 2021-02-17 11:17:34 +01:00
mafiesto4 d6546fb41c Update VulkanMemoryAllocator to 3.0.0-development (2021-02-16) 2021-02-17 11:00:48 +01:00
mafiesto4 7cc5560adf Fix compilation warnings 2021-02-17 10:59:08 +01:00
mafiesto4 25f61e931e Add support for using other VC++ toolset for Window and add cmd arg for selecting compiler manually 2021-02-17 10:58:58 +01:00
W2.Wizard 654285e57f Separated NextVector and NextUnitVector, refactoring
While I was at it I made some slight refactoring making it much more readable and establish consistency
2021-02-17 00:30:24 +01:00
mafiesto4 bcc3b2bd59 Fixes, tweaks and improvements for Linux support 2021-02-16 20:21:23 +01:00
mafiesto4 6fd1580d67 Fix building on linux after merge 2021-02-16 19:01:00 +01:00
mafiesto4 fc4dc8cb50 Merge remote-tracking branch 'origin/1.1' into linux-editor
# Conflicts:
#	Source/FlaxEngine.Gen.cs
#	Source/Tools/Flax.Build/Utilities/Utilities.cs
2021-02-16 18:54:25 +01:00
mafiesto4 489672d346 Fix warning when building editor for linux 2021-02-16 18:46:37 +01:00
jb-perrier 1c5b779ae9 Add Convert docs. 2021-02-16 18:27:02 +01:00
jb-perrier bc229d0bb6 Support converting actor with scripts. 2021-02-16 18:25:44 +01:00
mafiesto4 c7894d7e54 Merge branch 'jb-perrier-render2d' 2021-02-16 18:02:37 +01:00
jb-perrier f4a587faf9 Support undo. 2021-02-16 17:36:23 +01:00
jb-perrier 9144f6dcc9 Remove Array include. 2021-02-16 16:08:20 +01:00
jb-perrier bc073b73cc Add check. 2021-02-16 16:05:48 +01:00
jb-perrier 588ad86f8e Fix Span Count -> length. 2021-02-16 16:05:34 +01:00
mafiesto4 1530f91944 Update material assets 2021-02-16 15:55:18 +01:00
mafiesto4 d05204cb91 Fix missing lightmap uvs calc in vertex shader 2021-02-16 15:55:10 +01:00
mafiesto4 c902e33d8a Add Build Actions option to editor settings for build button configuration 2021-02-16 15:54:22 +01:00
mafiesto4 28a67f65b4 Fix build tool log file access 2021-02-16 13:55:19 +01:00
mafiesto4 f66b7ff785 Add support for Custom Define in Game Cooker for build scripts configuration 2021-02-16 13:54:57 +01:00
mafiesto4 b742d0c326 Add support for custom defines for build system via Flax.Build command line 2021-02-16 13:09:50 +01:00
mafiesto4 a98f867bd8 Fix compiler warning 2021-02-16 11:47:39 +01:00
mafiesto4 5f04f32097 Merge branch 'network' of git://github.com/jb-perrier/FlaxEngine into 1.1 2021-02-16 11:24:05 +01:00
mafiesto4 3658611e0f Fix compilation 2021-02-16 11:23:47 +01:00
mafiesto4 537dde594d Update Actor docs for GetScripts to be more precise about search method 2021-02-16 11:00:08 +01:00
mafiesto4 7221f7167f Add profiler events to LocalExecutor thread workers 2021-02-16 10:59:17 +01:00
mafiesto4 fa332a3785 Optimize scripting API bindings generation if loaded API from valid cache 2021-02-16 10:42:56 +01:00
jb-perrier 653e9609e4 Span + Naming 2021-02-16 10:14:42 +01:00
mafiesto4 f11686a7b7 Add support for caching scripting API bindings during build 2021-02-16 09:42:11 +01:00
mafiesto4 0841f5b479 Refactor Pre Rotation from spline model and spline collider into Pre Transform for more control 2021-02-15 22:09:05 +01:00
mafiesto4 81be73ad82 Fix spline model not drawing when using invalid material 2021-02-15 22:08:37 +01:00
jb-perrier 44afa732f1 Merge branch 'master' of https://github.com/FlaxEngine/FlaxEngine into convertactor 2021-02-15 21:43:46 +01:00
jb-perrier 26e3400a92 Typo. 2021-02-15 20:54:00 +01:00
jb-perrier a2e1346029 Docs tweak. 2021-02-15 20:53:53 +01:00
jb-perrier bc6281ee63 Add MTU option. 2021-02-15 20:53:07 +01:00
jb-perrier 134aec2d15 Simplified name NetworkProtocol. 2021-02-15 20:52:35 +01:00
jb-perrier b1f867f107 Add DrawVertices & FillTriangle funcs. 2021-02-15 19:33:25 +01:00
jb-perrier 674e09e72b Add WriteTri helpers funcs. 2021-02-15 19:32:43 +01:00
mafiesto4 6987834b2d Fix default actor bounds 2021-02-15 19:20:24 +01:00
mafiesto4 4e19b85e00 Add support for multi-threaded profile events in build tool 2021-02-15 15:04:37 +01:00
mafiesto4 5714741a5d Add support for multi-threaded scripting API headers parsing 2021-02-15 15:04:23 +01:00
mafiesto4 cdd68c9a89 Add MaxConcurrency and ConcurrencyProcessorScale options for Flax.Build cmd line 2021-02-15 13:32:38 +01:00
mafiesto4 29f0834cc4 Optimize build tool 2021-02-15 13:23:09 +01:00
mafiesto4 788907f3b1 Remove deprecated and unused ISceneObject and ITransformable 2021-02-15 12:09:46 +01:00
mafiesto4 b6557cb15c Fix showing shader source code window over a calling window 2021-02-15 12:02:25 +01:00
mafiesto4 cd2a02a5c8 Add -shaderdebug cmd line switch to Editor for shaders debugging 2021-02-15 11:55:31 +01:00
mafiesto4 c9ea812a24 Optimize DrawCall to pack indirect draw arg and graphics draw data with union 2021-02-15 11:52:06 +01:00
mafiesto4 e42a6b0ccc Fix default actor bounds 2021-02-15 10:53:49 +01:00
mafiesto4 312e4ad010 Merge branch 'master' into 1.1
# Conflicts:
#	Source/Engine/Content/JsonAsset.h
#	Source/Engine/Core/Config/Settings.h
2021-02-15 10:40:59 +01:00
mafiesto4 2357b60d0e Merge branch 'stefnotch-fix-ui-issues' 2021-02-15 10:23:04 +01:00
mafiesto4 3e608e6dec Merge branch 'fix-ui-issues' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-ui-issues 2021-02-15 10:22:55 +01:00
mafiesto4 9cccdc1e89 Fix build scripts assembly compilation on Linux (duplicated mscorlib reference) 2021-02-14 23:05:52 +01:00
mafiesto4 025ae99901 Implement process starting on Linux platform 2021-02-14 23:05:23 +01:00
mafiesto4 c68e3af566 Use bundled mono on Linux for C# compilation 2021-02-14 23:04:42 +01:00
mafiesto4 ff44622624 Add support for editor game target on Linux 2021-02-14 23:04:11 +01:00
mafiesto4 da943f7604 Update mono for Linux 2021-02-14 23:03:49 +01:00
mafiesto4 b4bf488e3c Fix double-click mouse event not setting mouse button down
Fixes #235
2021-02-14 18:41:28 +01:00
mafiesto4 f82ef8c065 Fix AssetPicker buttons usage without mouse down click over the control
Fixes #233
2021-02-14 18:18:58 +01:00
mafiesto4 865f2b871d Fix default frame rate for fbx imported clips to 14
https://github.com/nem0/OpenFBX/commit/2650de730d3f2d41b5042992f9443affd58e3553
2021-02-14 18:09:29 +01:00
mafiesto4 a947dc0cc3 Fix properties names formatting for UI with 2 character words
Fixes #229
2021-02-14 17:12:29 +01:00
mafiesto4 17a738d2ce Merge branch 'Vizepi-master' 2021-02-14 16:58:33 +01:00
mafiesto4 a9ac758abd Merge branch 'master' of git://github.com/Vizepi/FlaxEngine into Vizepi-master 2021-02-14 16:58:29 +01:00
mafiesto4 3bbda838a2 Fix error when spawning prefab with rigidbody 2021-02-14 16:50:35 +01:00
mafiesto4 6bdc31df5a Fix using get_Control getter method from UIControl in Visual Script 2021-02-14 15:53:08 +01:00
mafiesto4 ed1a3c2964 Update mono 2021-02-14 14:54:56 +01:00
mafiesto4 a485622c2a Merge branch 'GoaLitiuM-windowsplatform_log_crash' 2021-02-14 14:04:47 +01:00
stefnotch ac8c185056 Fix TreeNode hovering with collapsed children
and also set DefaultNodeOffsetY to get rid of the spaces between the nodes
2021-02-14 08:43:50 +01:00
GoaLitiuM ccc60af4b6 Fix crash in Windows platform logging with long lines 2021-02-13 01:03:08 +02:00
stefnotch 311793dd7e Fix StartMouseCapture(true) with secondary monitors on the left
Yes, negative mouse coordinates are a thing
2021-02-12 22:50:47 +01:00
mafiesto4 bd5897eaab Fixes and tweaks to SplineRopeBody 2021-02-12 17:18:32 +01:00
mafiesto4 55194edd2c Fix missing NavMesh node type 2021-02-12 15:28:45 +01:00
mafiesto4 8661091337 Add Spline Rope Body actor for ropes, chains and cables physics 2021-02-12 15:16:04 +01:00
mafiesto4 34b6cfebc3 Fix navmesh update on some spline editing operations 2021-02-12 12:20:58 +01:00
mafiesto4 74c1ac89c8 Add DebugDraw.DrawWireTriangles for wireframe geometry debug drawing 2021-02-12 11:43:46 +01:00
mafiesto4 4dd8e19f79 Fix Scene Queries to lock scene access 2021-02-12 11:27:47 +01:00
mafiesto4 9fd5e8928c Add missing scene graph nodes types mapping 2021-02-12 11:27:30 +01:00
mafiesto4 17d0f40e1c Add automatic navmesh update when editing spline with navmesh-relevant collider 2021-02-12 11:27:13 +01:00
mafiesto4 0e78d13146 Add support for navmesh on spline collider 2021-02-12 11:15:51 +01:00
mafiesto4 80e2aee92b Fixes and tweaks 2021-02-12 10:57:45 +01:00
mafiesto4 5a23df6478 Fix missing saving Pre Rotation 2021-02-12 10:34:50 +01:00
mafiesto4 62acae10a5 Fix compile error 2021-02-11 16:48:21 +01:00
mafiesto4 04b650cbc3 Add Pre Rotation to Spline Model and Spline Collider 2021-02-11 16:48:10 +01:00
mafiesto4 4ba82047e0 Improve CollisionCooking 2021-02-11 16:47:50 +01:00
mafiesto4 49758fbfff Add Spline Collider 2021-02-11 16:47:43 +01:00
mafiesto4 8158c94d26 Fix low-level WindowsPlatform::Log to not print invalid characters 2021-02-10 23:13:16 +01:00
mafiesto4 4c673bec9b Add BAGUETTE 2021-02-10 22:59:40 +01:00
mafiesto4 2263b3db52 Add ScriptingTypeHandle debugger view to flax.natvis 2021-02-10 22:59:32 +01:00
Vizepi 3a3c66b916 [EDITOR] Fixed layer matrix order ( issue #153 ) 2021-02-10 20:32:32 +01:00
mafiesto4 6c253ce892 Fix DebugDraw DrawTriangles crash 2021-02-10 17:20:05 +01:00
mafiesto4 29521b1b03 Remove Spline init from OnEnable to prevent double setup on SplineModel and SplineCollider 2021-02-10 17:19:45 +01:00
mafiesto4 8bce445ab0 Refactor Collider base class to improve code sharing across collider shape types 2021-02-10 14:33:16 +01:00
mafiesto4 5cb2322270 Add default Deformable material for splines 2021-02-10 11:37:34 +01:00
mafiesto4 81e41d51c8 Remove Unlink from asset reference 2021-02-10 11:37:14 +01:00
mafiesto4 adbb467206 Add support for mutable keyword on API_FIELD 2021-02-10 11:29:07 +01:00
mafiesto4 191694725a Add SoftObjectReference for lazy references to assets and objects 2021-02-10 11:12:05 +01:00
mafiesto4 73efa35008 Add Level.GetActors and Level.GetScripts 2021-02-09 23:31:23 +01:00
mafiesto4 b8420feed1 Merge branch 'Vizepi-master' 2021-02-09 22:58:41 +01:00
mafiesto4 cad7887957 Merge branch 'master' of git://github.com/Vizepi/FlaxEngine into Vizepi-master 2021-02-09 22:58:36 +01:00
stefnotch 01f2cc1dcc Fix #128 and fix #120 2021-02-09 22:10:43 +01:00
mafiesto4 6906db499e Add VS Code as default code editor on Linux 2021-02-09 21:52:50 +01:00
mafiesto4 8fe04d6db4 Fix window auto-focus on Linux 2021-02-09 21:52:34 +01:00
mafiesto4 4ce6882fc0 Add support for using VS Code as IDE for scripts on Linux 2021-02-09 21:01:05 +01:00
mafiesto4 dc63d908b8 Fix resizing and maximizing window on Linux 2021-02-09 19:54:46 +01:00
Vizepi 6673d70d0a [C++] Add missing header forcing client code to include two headers instead of one 2021-02-09 18:20:20 +01:00
Vizepi cb6b96dea6 [C++] Added FLAXENGINE_API macro on SettingsBase class so static symbol are retrieved by linker 2021-02-09 18:08:50 +01:00
W2.Wizard 042694f45e Added random enum 2021-02-09 17:11:44 +01:00
mafiesto4 d4f959b681 Add support for Deformable material preview 2021-02-09 16:46:10 +01:00
mafiesto4 15c4b7df54 Update materials 2021-02-09 16:08:51 +01:00
mafiesto4 311dad7b82 Add Spline Model 2021-02-09 16:04:47 +01:00
mafiesto4 2b962e4389 Fix invalid comment 2021-02-09 10:58:13 +01:00
stefnotch 05a7b911f1 Fix screen size getting
The game window size should *not* be DPI adjusted
2021-02-09 10:29:29 +01:00
mafiesto4 e8dc48690e Improve VS Code project launch tasks file for better debugging 2021-02-08 23:43:55 +01:00
mafiesto4 be7024784e Fix PathRemoveRelativeParts for rooted paths 2021-02-08 23:17:50 +01:00
mafiesto4 b30ab38ef2 Window impl on Linux progress 2021-02-08 22:53:32 +01:00
mafiesto4 dfe7963436 Fix window maximize on Linux if it's not shown yet 2021-02-08 22:19:18 +01:00
mafiesto4 034890ee7c Window impl on Linux progress 2021-02-08 21:33:38 +01:00
mafiesto4 58350c87e2 Fix missing CharacterController bounds if controller is missing 2021-02-08 20:20:39 +01:00
mafiesto4 c9860f21ec Fix scripting object issue 2021-02-08 19:42:04 +01:00
mafiesto4 85167b2d4b Fix using Bezier curve for Transform 2021-02-08 15:45:39 +01:00
mafiesto4 8e87c98644 Cleanup material shaders code 2021-02-08 15:45:22 +01:00
mafiesto4 da784e98e5 Add Deformable material domain 2021-02-08 15:44:38 +01:00
stefnotch 20d9c7181f Untested cross platform implementation 2021-02-08 10:07:47 +01:00
stefnotch 8f8f0266ce Add DpiScale to RootWindow 2021-02-08 09:48:57 +01:00
stefnotch c7feeb624d Tweaks 2021-02-08 09:48:46 +01:00
mafiesto4 57f9e42486 Fix Editor timeline editor controls API visible in Visual Scripting 2021-02-07 21:41:46 +01:00
mafiesto4 103d630d80 Fix tooltips generation for native properties to reflect getter and setter docsa 2021-02-07 21:41:17 +01:00
mafiesto4 2f34bfbeff Merge branch 'Evildea-master' 2021-02-07 21:12:45 +01:00
mafiesto4 57fab6a7f7 Merge branch 'master' of git://github.com/Evildea/FlaxEngine into Evildea-master 2021-02-07 21:12:39 +01:00
mafiesto4 2325de3ddc Fix missing terrain bounds update after modifying terrain
Fixes #5
2021-02-07 21:11:04 +01:00
mafiesto4 96f1d9e820 Add UIControl outlines drawing in Prefab window 2021-02-07 20:19:21 +01:00
mafiesto4 04bb83fe31 Fixes 2021-02-07 20:19:10 +01:00
mafiesto4 5768eefe49 Optimize Texture::DownloadData for staging textures 2021-02-07 20:06:44 +01:00
mafiesto4 8c1f56b7db Fixes for scripting objects 2021-02-07 19:28:57 +01:00
mafiesto4 9f3be80f9c Fix VS debugger config for Dictionary and HashSet to show only Occupied buckets 2021-02-07 19:28:23 +01:00
mafiesto4 6ea897b0f5 Update Mono for Windows 2021-02-07 19:27:54 +01:00
stefnotch f9deb97229 Fix custom title bar high dpi issues
Fix #4
2021-02-07 18:03:23 +01:00
stefnotch f5b48e03e9 Per window DPI 2021-02-07 17:26:41 +01:00
mafiesto4 ca6afc0c2d Fix HorizontalPanel and VerticalPanel auto-sizing if child control is using anchors
Fixes #203
2021-02-07 16:49:44 +01:00
mafiesto4 08abc798cc Fix FindActor and FindScript in Level 2021-02-07 16:31:30 +01:00
mafiesto4 0f4edbcc6f Merge branch 'W2Wizard-DebugDrawFix' 2021-02-07 13:08:50 +01:00
mafiesto4 5529bd7bc0 Merge branch 'DebugDrawFix' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-DebugDrawFix 2021-02-07 13:08:46 +01:00
mafiesto4 0242e29873 Fix painting foliage on inactive objects
Fixes #209
2021-02-07 13:06:33 +01:00
mafiesto4 a246825b3d Merge branch 'intolerantape-Missing-FLAXENGINE_API-Macro' 2021-02-07 12:56:11 +01:00
mafiesto4 8d3f4aa9d9 Merge branch 'Missing-FLAXENGINE_API-Macro' of git://github.com/intolerantape/FlaxEngine into intolerantape-Missing-FLAXENGINE_API-Macro 2021-02-07 12:56:08 +01:00
mafiesto4 6e5a13111a Fix auto-importing materials and textures from model file with invalid path characters used in name
Fixes #208
2021-02-07 12:49:14 +01:00
mafiesto4 9ddb077e7c Merge branch 'SilentCLD-win-btf' 2021-02-07 12:19:56 +01:00
mafiesto4 46b15551b4 Merge branch 'win-btf' of git://github.com/SilentCLD/FlaxEngine into SilentCLD-win-btf 2021-02-07 12:19:45 +01:00
W2.Wizard 522e1eb769 Inverted condition 2021-02-06 20:10:22 +01:00
intolerantape 633357cc9b Added FLAXENGINE_API macro to class JsonAsset. 2021-02-06 09:52:30 -08:00
mafiesto4 5cb0da3340 Move GPU particles generator code to be more compact 2021-02-06 15:58:33 +01:00
mafiesto4 25f35b22be Add safety checks for particles data to prevent division by 0 2021-02-06 15:58:12 +01:00
W2.Wizard f5d1ad5a9b Use ThrowException instead 2021-02-06 13:32:04 +01:00
W2.Wizard 5b32756536 Remove empty space
Just noticed it, so bye bye.
2021-02-06 11:32:58 +01:00
W2.Wizard 8a567f0849 Fix issue #214 2021-02-06 11:29:48 +01:00
mafiesto4 d27edbf5a9 Format code 2021-02-05 21:18:21 +01:00
mafiesto4 1e811324eb Merge branch 'W2Wizard-FolderDeleteFix' 2021-02-05 21:17:54 +01:00
mafiesto4 42393eb316 Merge branch 'FolderDeleteFix' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-FolderDeleteFix 2021-02-05 21:17:49 +01:00
mafiesto4 6b660c846b Fix updating prefab object reference values after apply in prefab editor 2021-02-05 21:12:14 +01:00
mafiesto4 43692f514a Fix 2021-02-05 21:11:41 +01:00
mafiesto4 78e4ba2f17 Add support for UICanvas preview in Prefab Viewport
Fixes #157
2021-02-05 21:11:35 +01:00
W2.Wizard 2fbfe61f2c Restore comment
Co-Authored-By: VNC <52937757+VNNCC@users.noreply.github.com>
2021-02-05 15:59:35 +01:00
W2.Wizard 0e57b32082 Fixed issue #210
This will fix the issue described in #210.

Co-Authored-By: VNC <52937757+VNNCC@users.noreply.github.com>
2021-02-05 15:49:01 +01:00
mafiesto4 5a561b1278 Update materials 2021-02-05 15:30:01 +01:00
mafiesto4 d8304a2178 Refactor material shaders generator to use modular features as extensions 2021-02-05 14:54:29 +01:00
mafiesto4 300f948515 Refactor material shaders generator to use modular features as extensions 2021-02-05 13:57:00 +01:00
mafiesto4 2da9ed4556 Fix crash when using Find/FindLast on empty String 2021-02-05 11:55:21 +01:00
mafiesto4 089f0dab3a Refactor material shaders generator to use modular features as extensions 2021-02-05 11:55:02 +01:00
mafiesto4 01777a2c1b Refactor material shaders generator to use modular features as extensions 2021-02-05 11:22:47 +01:00
mafiesto4 3661b19d6c Fix some prefabs issues 2021-02-04 23:34:44 +01:00
mafiesto4 db55f5ea3f Fix crash when changing prefab root object 2021-02-04 22:59:13 +01:00
mafiesto4 ae785267c2 Fix scaling rotated objects in world space
Fixes #200
2021-02-04 22:32:37 +01:00
SilentCLD 7868c6505d [Editor/Docking] Bring window to front on focus 2021-02-04 17:49:54 +00:00
mafiesto4 b5847eb0d6 Refactor material shaders generator to use modular features as extensions 2021-02-04 15:27:38 +01:00
mafiesto4 9e6243adcc Refactor material shaders generator to use modular features as extensions 2021-02-04 14:58:01 +01:00
mafiesto4 2a3b6edf50 Refactor material shaders generator to use modular features as extensions 2021-02-04 10:43:04 +01:00
mafiesto4 7e612d89cb Merge branch 'W2Wizard-ShaderNodes' 2021-02-03 23:14:00 +01:00
mafiesto4 21b311df17 Merge branch 'ShaderNodes' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-ShaderNodes 2021-02-03 23:13:55 +01:00
mafiesto4 880a8c9f58 Add support for parsing exponential (scientific) notation numbers in input fields 2021-02-03 23:10:36 +01:00
mafiesto4 e3142e6408 Fix updating input fields on editing end without changes
Fixes #197
2021-02-03 22:34:11 +01:00
W2.Wizard 4949ea4b3b Applied review changes 2021-02-03 22:24:08 +01:00
mafiesto4 9c348b284f Fixes for UI control sync 2021-02-03 22:00:12 +01:00
mafiesto4 85c219369d Fix updating UI layout when adding control
Fixes #190
2021-02-03 21:59:21 +01:00
mafiesto4 6ffa497c0a Fixes for Render2D 2021-02-03 21:52:49 +01:00
mafiesto4 ba0f07b57e Fix BlurPanel rendering
Fixes #192
2021-02-03 21:52:29 +01:00
mafiesto4 a572e581e5 Fix HorizontalPanel children layout
Fixes 191
2021-02-03 21:30:33 +01:00
mafiesto4 c3b36062ed Fix error 2021-02-03 19:24:47 +01:00
mafiesto4 8e4a0e9e97 Fix drawing UI Control outline in Game Window (#194) 2021-02-03 19:09:41 +01:00
mafiesto4 a560b19cbc Refactor draw calls and instancing logic to be more modular 2021-02-03 09:33:48 +01:00
mafiesto4 28f53339e7 Fix crash when loading string property in json that is not a string
Fixes #178
2021-02-02 23:33:42 +01:00
mafiesto4 0c17ca82b7 Merge branch 'stefnotch-patch-4' 2021-02-02 23:20:50 +01:00
mafiesto4 f048254d82 Merge branch 'patch-4' of git://github.com/stefnotch/FlaxEngine into stefnotch-patch-4 2021-02-02 23:20:43 +01:00
mafiesto4 fb74aef541 Add check for C++ bindings generator for property getter and setter method value types to match 2021-02-02 23:14:21 +01:00
mafiesto4 81cc8cf69c Add Matrix3x4 2021-02-02 15:44:14 +01:00
mafiesto4 00fab5cfd6 Add event to spline for updating custom data 2021-02-02 12:53:18 +01:00
mafiesto4 85a6f485f1 Fixes and tweaks 2021-02-02 12:52:37 +01:00
mafiesto4 d2dba5680b Fix calling OnParentChanged in Actor load 2021-02-02 12:52:21 +01:00
mafiesto4 c00b32364a Add SceneGraphNode.OnContextMenu for customizations 2021-02-02 12:51:36 +01:00
mafiesto4 23652d1bc5 Merge remote-tracking branch 'origin/master' into 1.1
# Conflicts:
#	Source/Engine/Input/Input.cpp
2021-02-02 10:29:52 +01:00
mafiesto4 5d535fad6a Move Mouse and Keyboard impl from headers to Input.cpp 2021-02-01 23:53:32 +01:00
mafiesto4 1a11f1a231 Merge branch 'jb-perrier-inputtext' 2021-02-01 23:48:17 +01:00
mafiesto4 107edfb958 Merge branch 'inputtext' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-inputtext 2021-02-01 23:48:12 +01:00
mafiesto4 2fe6129fcd Simplify code 2021-02-01 23:41:23 +01:00
mafiesto4 7ddcf8507a Merge branch 'VNNCC-fix-issue-158' 2021-02-01 23:40:04 +01:00
mafiesto4 1aab96676d Merge branch 'fix-issue-158' of git://github.com/VNNCC/FlaxEngine into VNNCC-fix-issue-158 2021-02-01 23:39:56 +01:00
mafiesto4 1bd639c86d Fix including CharacterController.h in game code 2021-02-01 23:38:16 +01:00
stefnotch 62f2ccb942 Fix conversion to degrees in Vector3.Angle 2021-02-01 22:40:19 +01:00
mafiesto4 e2cefc7407 Fix Quaternion comparison epsilon to reduce error rate 2021-02-01 16:58:01 +01:00
mafiesto4 efea842486 Fix warning 2021-02-01 16:23:57 +01:00
mafiesto4 1ae898918c Add auto-select for spawned actors in the level 2021-02-01 16:21:05 +01:00
mafiesto4 c3d9c52f1f Add support for spline point duplicate via Transform gizmo 2021-02-01 16:04:20 +01:00
mafiesto4 b22805f866 Add support for custom duplicate of SceneGraphNode 2021-02-01 16:03:33 +01:00
mafiesto4 d69b005792 Move Curve data serialization to binary format into CurveSerialization.h 2021-02-01 14:16:32 +01:00
mafiesto4 69790f3576 Add support for deleting selected spline points (with undo) 2021-02-01 13:51:37 +01:00
mafiesto4 bab236c081 Add support for custom SceneGraphNode to handle delete with undo 2021-02-01 13:51:32 +01:00
mafiesto4 bf80827bfd Add more Spline API for curve editing 2021-02-01 13:50:56 +01:00
mafiesto4 283714a39f Fix PhysX header usage in public API 2021-02-01 11:40:50 +01:00
mafiesto4 fecf7d7804 Add virtual to Camera GetMatrices for custom cameras 2021-02-01 11:18:46 +01:00
mafiesto4 011b5f3e51 Add SceneRenderTask.PreRender 2021-02-01 11:14:59 +01:00
mafiesto4 5c2d3cbe7b Fix mouse down/up position on Linux 2021-02-01 10:34:13 +01:00
mafiesto4 f2ac6a970c Move LinuxInput to LinuxPlatform 2021-02-01 10:22:45 +01:00
mafiesto4 ed10c15069 Fix mono compile 2021-02-01 09:59:25 +01:00
mafiesto4 f77d0cc8fc Add Assimp lib for Linux 2021-02-01 09:58:54 +01:00
mafiesto4 d059027a47 Fixes for WIndow impl on Linux 2021-01-31 21:05:39 +01:00
mafiesto4 7fca8ae4bb Add Mono for Linux Editor 2021-01-31 21:05:14 +01:00
W2.Wizard 28d16fd620 Add notice 2021-01-30 23:32:35 +01:00
W2.Wizard bc6de6932b Update MaterialGenerator.Material.cpp
Already evaluate calculation instead
2021-01-30 23:28:53 +01:00
W2.Wizard e75ca148c0 Added blackbody 2021-01-30 23:21:41 +01:00
jb-perrier a5d6db6a18 Fix InputText & Typo. 2021-01-30 19:58:45 +01:00
VNC 33ce17c3fa Set minimum width and height for texture description in motion blur
The calculation `motionVectorsWidth / tileSize` can return a result of 0.

Set minimum width and height to 1.
2021-01-29 16:18:00 +01:00
mafiesto4 f15f7ff59f Bump up version 2021-01-29 00:36:15 +01:00
mafiesto4 0d0279a1f8 Merge branch 'stefnotch-fix-asset-viewports' 2021-01-28 23:30:11 +01:00
mafiesto4 bb8a6e5c8d Merge branch 'fix-asset-viewports' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-asset-viewports 2021-01-28 23:30:05 +01:00
mafiesto4 beecbffdc3 Fix error when opening Anim Graph with node name not existing in skeleton anymore
Fixes #176
2021-01-28 21:59:30 +01:00
stefnotch 06f07c2903 Fix EditorViewport zooming
Fix #162
Also improves cases like LeftMouseDown + Scroll
2021-01-28 17:17:17 +01:00
stefnotch 164da0f87a Fix spelling error 2021-01-28 16:24:36 +01:00
stefnotch a250a23259 Fix TexturePreview zooming
Fix #164
2021-01-28 16:13:45 +01:00
mafiesto4 50f6a01f83 Fix plane model normals 2021-01-28 01:28:13 +01:00
W2.Wizard bd18286fbd Refactoring and Node implementation
Refactored all recently added nodes to maintain consistency.
2021-01-28 01:26:57 +01:00
mafiesto4 aedc619009 Fix crash when opening prefab that fails to load root ObjectsLookupIdMapping
Fixes #126
2021-01-28 01:11:02 +01:00
mafiesto4 a226ff8762 Fix plane model incorrect rotation in material preview (#165) 2021-01-28 00:52:06 +01:00
mafiesto4 a1cee0f0bf Fix crash when applying changes to prefab 2021-01-28 00:38:08 +01:00
mafiesto4 bb84ad0f79 Add missing doc comment 2021-01-28 00:10:41 +01:00
mafiesto4 0de380ad3a Optimize Variant typename loading if length is zero 2021-01-28 00:02:37 +01:00
mafiesto4 4b11725226 Fix crash when creating Empty particle emitter
Fixes #174
2021-01-27 23:59:24 +01:00
mafiesto4 971ab7b8e7 Merge branch 'stefnotch-improve-first-time-setup' 2021-01-27 23:36:59 +01:00
mafiesto4 b57ce2bd56 Merge branch 'improve-first-time-setup' of git://github.com/stefnotch/FlaxEngine into stefnotch-improve-first-time-setup 2021-01-27 23:36:54 +01:00
mafiesto4 876a728b41 Fix scene animation rendering issue with game window is not selected tab
Fixes #170
2021-01-27 23:27:19 +01:00
mafiesto4 b411539717 Merge branch 'stefnotch-fix-disable-ctrl-w-ingame' 2021-01-27 22:41:28 +01:00
mafiesto4 4cb5574a2e Merge branch 'fix-disable-ctrl-w-ingame' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-disable-ctrl-w-ingame 2021-01-27 22:41:24 +01:00
mafiesto4 1aceab3783 Merge branch 'W2Wizard-DDX-DDY-Nodes' 2021-01-27 22:39:23 +01:00
mafiesto4 c583b6a1a7 Merge branch 'DDX-DDY-Nodes' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-DDX-DDY-Nodes 2021-01-27 22:39:19 +01:00
mafiesto4 3c3b47f5b4 Fix Get Node Transform ndoe in anim graph 2021-01-27 22:37:25 +01:00
mafiesto4 36bd398136 Fix error when animated model skeleton has duplicated node name 2021-01-27 22:37:19 +01:00
stefnotch c820e87d4a Slightly tweak the key processing code 2021-01-27 22:08:17 +01:00
stefnotch f00ae7fb21 Disable CTRL+W during the game
Fix #96
2021-01-27 21:30:22 +01:00
stefnotch 18e3d51914 Check LFS using file size 2021-01-27 18:08:38 +01:00
mafiesto4 7c85ac61b8 Add new Spline actor initialization when spawning in editor 2021-01-27 15:39:38 +01:00
mafiesto4 9cdbbf590a Add spline points tangents gizmos and debug drawing 2021-01-27 15:29:33 +01:00
mafiesto4 bd93e46624 Tweaks for ActorChildNode 2021-01-27 15:29:14 +01:00
mafiesto4 f0c7fbb0cf Add more utilities for Spline 2021-01-27 15:28:26 +01:00
mafiesto4 560b6cf5da Fix error when animated model skeleton has duplicated node name 2021-01-27 15:12:29 +01:00
mafiesto4 c0e8b735ad Fix Get Node Transform ndoe in anim graph 2021-01-27 15:12:02 +01:00
mafiesto4 5a402df3ff Add Add/Subtract methods to Transform 2021-01-27 15:07:02 +01:00
stefnotch 691d9d9b88 Document the GitHub basics 2021-01-27 14:34:38 +01:00
stefnotch 81865bd97e Move Flax plugin up, since it's currently required 2021-01-27 14:32:25 +01:00
stefnotch 80e0b0b0e5 Document the "set as startup project" 2021-01-27 14:32:10 +01:00
stefnotch da3a54d184 Pause on error
On Windows, because people using Windows will double click on the file
2021-01-27 14:06:36 +01:00
mafiesto4 3dc6afef62 Improve selecting spline gizmos and add highlight sphere 2021-01-27 12:38:03 +01:00
mafiesto4 590fcebaec Fix drawing spline when spline point gizmo is selected 2021-01-27 12:33:46 +01:00
mafiesto4 37e3a85080 Optimize splines debug rendering performance 2021-01-27 12:33:32 +01:00
mafiesto4 fd96957819 Add gizmo handles for spline points 2021-01-27 12:13:00 +01:00
mafiesto4 d0c0259ee2 Add setter methods for spline points 2021-01-27 12:12:40 +01:00
mafiesto4 53601d8a85 Optimize and improve ActorChildNodes handling 2021-01-27 12:11:59 +01:00
mafiesto4 1d19d38c38 Merge remote-tracking branch 'origin/master' into 1.1
# Conflicts:
#	Source/Editor/Surface/SurfaceNode.cs
2021-01-27 10:39:44 +01:00
mafiesto4 cd2ae08da0 Fixes and tweaks to the networking impl 2021-01-27 10:37:15 +01:00
mafiesto4 a876e56339 Merge branch 'jb-perrier-network' into 1.1 2021-01-27 09:49:44 +01:00
W2.Wizard 1925fe5724 Added DDX / DDY nodes 2021-01-27 01:39:50 +01:00
Richard c8b0773661 Fixed a bug 2021-01-27 11:07:36 +11:00
mafiesto4 f1763840c9 Fix exporting textures in format R10G10B10A2 and R11G11B10 on Windows 2021-01-27 00:28:38 +01:00
mafiesto4 bbeab83b29 Merge branch 'GoaLitiuM-folder_dialog' 2021-01-27 00:27:41 +01:00
mafiesto4 cb8ba2d757 Fix WindowsFileSystem::ShowBrowseFolderDialog path length 2021-01-27 00:27:32 +01:00
mafiesto4 1679458094 Merge branch 'folder_dialog' of git://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-folder_dialog 2021-01-27 00:05:57 +01:00
mafiesto4 c9992ef7d0 Merge branch 'GoaLitiuM-faster_dev_builds' 2021-01-26 23:47:10 +01:00
mafiesto4 02dde50071 Merge branch 'faster_dev_builds' of git://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-faster_dev_builds 2021-01-26 23:02:59 +01:00
mafiesto4 854d0147dd Fix Visject Node layout when adding boxes from code 2021-01-26 22:52:35 +01:00
mafiesto4 59858ecb27 Fix Visual Script invoke method node signature check for output params passed via reference 2021-01-26 22:52:08 +01:00
mafiesto4 269f1fc8c1 Fix ResizeAuto in SurfaceNode to include custom controls 2021-01-26 22:16:19 +01:00
mafiesto4 4330eb5e4a Merge branch 'W2Wizard-UVTilingOffset' 2021-01-26 21:48:14 +01:00
jb-perrier 5f85e9ae96 Reset state. 2021-01-26 20:07:35 +01:00
jb-perrier 09049990bd Default value. 2021-01-26 20:07:09 +01:00
jb-perrier 674d1fbcc5 Handle error. 2021-01-26 20:06:47 +01:00
W2.Wizard db17c80e0a Use approriate fields instead 2021-01-26 19:41:29 +01:00
W2.Wizard 62b3f7c9c2 Adjusted node size 2021-01-26 19:37:06 +01:00
W2.Wizard 96e5e20e66 Added Node 2021-01-26 19:26:38 +01:00
jb-perrier 254bdacc73 Cleanup. 2021-01-26 17:07:37 +01:00
jb-perrier 0c68cd8a10 Merge branch '1.1' of https://github.com/FlaxEngine/FlaxEngine into network 2021-01-26 15:58:12 +01:00
jb-perrier c20f0fa430 Remove Init & Exit, logic is now in Win32Platform.cpp. 2021-01-26 15:55:51 +01:00
jb-perrier 54b9eaa969 Move static var to local. 2021-01-26 15:48:48 +01:00
jb-perrier aaac0aec96 Brace to the next line. 2021-01-26 15:46:27 +01:00
jb-perrier af1dfc0d08 Remove "Place holder" comments. 2021-01-26 15:45:35 +01:00
jb-perrier 15d24308e8 Fix "Returns true on error, otherwise false." & Return"s". 2021-01-26 15:44:08 +01:00
jb-perrier 8ac0e7491a Typo Initialize -> Initializes, and so on ... 2021-01-26 15:41:39 +01:00
jb-perrier 2bcbf23bca All base functions return true. 2021-01-26 15:37:33 +01:00
mafiesto4 01a3a80103 Fix compilation 2021-01-26 15:34:57 +01:00
jb-perrier 2119075240 Fix. 2021-01-26 14:51:01 +01:00
jb-perrier 1df47bd8c5 Add partial docs. 2021-01-26 14:50:45 +01:00
jb-perrier a51d47a4bb Add partial docs. 2021-01-26 14:29:53 +01:00
jb-perrier 1b2dd0aff5 Fixes. 2021-01-26 14:14:27 +01:00
jb-perrier ecb20afaa4 Reimpl. SiReadable & IsWriteable. 2021-01-26 13:52:38 +01:00
jb-perrier 45ba154877 Add NetworkSocketGroup window impl. 2021-01-26 13:41:44 +01:00
jb-perrier 51a2c1e868 Add NetworkSocketGroup. 2021-01-26 13:41:23 +01:00
mafiesto4 8180877269 Add support for copy/paste/rever values for groups in Custom Editor (eg. array editor) 2021-01-26 12:52:03 +01:00
mafiesto4 aa2eeb8243 Add GetSplineDirection util to Spline 2021-01-26 12:32:35 +01:00
mafiesto4 937248794a Add first derivative calculation utilities for Curve 2021-01-26 12:32:16 +01:00
mafiesto4 b674aae970 Fix spline length calculation to include bezier shape 2021-01-26 12:12:16 +01:00
mafiesto4 dda5f26d89 Add Transform.LocalToWorldVector and Transform.WorldToLocalVector 2021-01-26 12:11:41 +01:00
mafiesto4 023cdced0a Add utility to make spline curve linear or smooth 2021-01-26 09:32:41 +01:00
mafiesto4 054aa18e31 Merge branch 'W2Wizard-RemapMaterialNode' 2021-01-26 00:16:17 +01:00
mafiesto4 b6fe228b85 Merge branch 'RemapMaterialNode' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-RemapMaterialNode 2021-01-26 00:16:13 +01:00
W2.Wizard c703064add Added also tryGetValue to ShaderGraph
Since @mafiesto4 requested in the review to use tryGetValye in the VisjectGraph to get the bool param I also did it to the shader one
2021-01-26 00:12:43 +01:00
mafiesto4 4be7e2ad46 Fix 2021-01-26 00:11:25 +01:00
mafiesto4 5260efc7b8 Fixes for editor viewport View context menu 2021-01-26 00:11:20 +01:00
W2.Wizard 44d636520b Applied review changes 2021-01-26 00:04:04 +01:00
mafiesto4 c5934e0dfe Merge branch 'Vizepi-master' 2021-01-26 00:02:12 +01:00
mafiesto4 571c802d49 Merge branch 'master' of git://github.com/Vizepi/FlaxEngine into Vizepi-master 2021-01-26 00:02:08 +01:00
mafiesto4 d098c6cee7 Merge branch 'W2Wizard-SphereMaskNode' 2021-01-25 23:59:14 +01:00
mafiesto4 31e53d5efa Merge branch 'SphereMaskNode' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-SphereMaskNode 2021-01-25 23:59:10 +01:00
mafiesto4 ca32d0d825 Add Mesh::UpdateMesh methods similar to C# API 2021-01-25 23:52:29 +01:00
mafiesto4 5b4dbfa121 Fix name (was causing docs build warning) 2021-01-25 23:52:07 +01:00
W2.Wizard 602fb44a23 Formatting 2021-01-25 22:30:55 +01:00
W2.Wizard 5845bc3fca Added Spheremask node 2021-01-25 22:03:30 +01:00
W2.Wizard f331191e3d Refactored 2021-01-25 19:31:12 +01:00
jb-perrier 029d9acaa2 Fixes. 2021-01-25 17:55:22 +01:00
jb-perrier bbabd09983 Non-Blocking handling. 2021-01-25 17:54:52 +01:00
jb-perrier 67a8246077 Revamp IsReadable & IsWriteable. 2021-01-25 17:54:16 +01:00
jb-perrier 330a588260 Get rid off getnameinfo. 2021-01-25 17:52:11 +01:00
jb-perrier 8e2a8c045c Get rid off getnameinfo. 2021-01-25 17:51:52 +01:00
jb-perrier a32658beea Add GetErrorMessage(). 2021-01-25 14:02:55 +01:00
jb-perrier c2af9164d6 Typo. 2021-01-25 13:34:18 +01:00
jb-perrier 27a62f4411 Add error. 2021-01-25 13:32:17 +01:00
jb-perrier 6dd699cbab Remove dead code. 2021-01-25 13:19:50 +01:00
jb-perrier 206461e80e Refactor duplicate code. 2021-01-25 13:17:04 +01:00
jb-perrier 5bc1773dc5 Refactor sock option translation. 2021-01-25 13:13:57 +01:00
jb-perrier baa273f589 Remove old comment. 2021-01-25 13:07:02 +01:00
jb-perrier dae366f04c Cleanup. 2021-01-25 12:40:08 +01:00
W2.Wizard c0c2da34d7 Specified variants 2021-01-25 12:37:42 +01:00
jb-perrier 075b049bb1 Fixes. 2021-01-25 12:25:20 +01:00
mafiesto4 fe78fa7575 Add Spline 2021-01-25 10:41:53 +01:00
W2.Wizard ee166bafed Added initial remap node 2021-01-25 00:51:47 +01:00
Richard 6ef65734cd Optimisied Blend Normal Node
I've also added a getNormalZero to get a normal that has zeroed out, i.e. it faces directly outwards from the face. This enables the user to not have to input a vector for either the Base or Additional Normal inputs and still get a result that is acceptable. This is handy if you want to "wash out" a normal.
2021-01-25 09:35:22 +11:00
mafiesto4 f6085c7479 Fix crash when reloading scripts with opened custom json asset 2021-01-24 23:31:24 +01:00
jb-perrier ad621b824a Add some const. 2021-01-24 22:59:57 +01:00
jb-perrier 6e193d4d0d Add Set/Get sockoption, refactor CreateSocket. 2021-01-24 22:54:44 +01:00
mafiesto4 f714afc180 Tweak Rotator node 2021-01-24 19:01:25 +01:00
mafiesto4 f6065c4463 Merge branch 'W2Wizard-RotationMaterialNode' 2021-01-24 18:57:53 +01:00
mafiesto4 1824715626 Merge branch 'RotationMaterialNode' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-RotationMaterialNode
# Conflicts:
#	Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Material.cpp
2021-01-24 18:57:44 +01:00
mafiesto4 b59008182f Merge branch 'stefnotch-document-index-order' 2021-01-24 18:52:13 +01:00
mafiesto4 e99c4abe5e Merge branch 'document-index-order' of git://github.com/stefnotch/FlaxEngine into stefnotch-document-index-order 2021-01-24 18:52:10 +01:00
mafiesto4 f9ba789af3 Add missing node type comment 2021-01-24 18:51:26 +01:00
stefnotch 6f0a556af8 Document the clockwise order of the indices 2021-01-24 16:42:13 +01:00
W2.Wizard bcb38dc2ca Added rotator node 2021-01-24 15:10:38 +01:00
mafiesto4 3a33d6ff84 Fix code style 2021-01-24 14:14:30 +01:00
mafiesto4 cb0518d75a Merge branch 'Evildea-master' 2021-01-24 14:11:58 +01:00
mafiesto4 31ae464d93 Merge branch 'master' of git://github.com/Evildea/FlaxEngine into Evildea-master 2021-01-24 14:11:55 +01:00
mafiesto4 8ff12d079c Merge branch 'W2Wizard-patch-1' 2021-01-24 14:06:17 +01:00
mafiesto4 1969854ed0 Merge branch 'patch-1' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-patch-1 2021-01-24 14:06:13 +01:00
mafiesto4 4c05f8a222 Merge branch 'TalkingWallnut-patch-1' 2021-01-24 14:04:59 +01:00
mafiesto4 6313c8520c Merge branch 'patch-1' of git://github.com/TalkingWallnut/FlaxEngine into TalkingWallnut-patch-1 2021-01-24 14:04:54 +01:00
mafiesto4 f1819ee35c Fix code style 2021-01-24 14:01:42 +01:00
mafiesto4 2563409e6f Merge branch 'intolerantape-CollisionsHelper-Enhancement' 2021-01-24 13:57:51 +01:00
mafiesto4 f64eead2d7 Merge branch 'CollisionsHelper-Enhancement' of git://github.com/intolerantape/FlaxEngine into intolerantape-CollisionsHelper-Enhancement 2021-01-24 13:57:47 +01:00
mafiesto4 67b0e0410c Merge branch 'stefnotch-fix-fade-distance' 2021-01-24 13:55:51 +01:00
mafiesto4 6a6e7195f5 Merge branch 'fix-fade-distance' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-fade-distance 2021-01-24 13:55:48 +01:00
mafiesto4 b04e1381dc Fix Unsigned Integer value field to prevent negative values 2021-01-24 13:30:48 +01:00
mafiesto4 47bff456e0 Fix foot offset in Character Controller 2021-01-24 13:09:40 +01:00
Richard 7de56304c8 Remove change as it only works for the editor 2021-01-24 22:40:03 +11:00
Richard 843a04604d Added Material Node to Blend Normals 2021-01-24 22:31:45 +11:00
Vizepi 018e751bf6 Added option to invert panning direction in editor viewport 2021-01-24 12:03:38 +01:00
jb-perrier b4f791e0ca Remove comment. 2021-01-24 11:42:11 +01:00
jb-perrier 9b2c940896 Switch type. 2021-01-24 11:39:59 +01:00
GoaLitiuM 4457bcf4a7 Use more modern file dialog for browsing folders 2021-01-24 02:33:08 +02:00
jb-perrier 3ab54bd7e1 Add listen implementation. 2021-01-24 00:02:24 +01:00
Erdroy 9b300fe074 Cleanup 2021-01-23 21:33:06 +01:00
jb-perrier 86b5fa9321 Remove old comment. 2021-01-23 21:32:07 +01:00
jb-perrier 261aeb9245 Fix leak. 2021-01-23 21:22:38 +01:00
jb-perrier b3388d6fc7 Replace error code by error strings. 2021-01-23 21:17:14 +01:00
jb-perrier c9bab2c521 Remove issue comment, resolved by commit #c9655ee. 2021-01-23 21:07:19 +01:00
jb-perrier 4a71fe6727 Fix crash. 2021-01-23 20:21:58 +01:00
jb-perrier 3250ca9fad Add error code to logs. 2021-01-23 20:21:44 +01:00
jb-perrier c9655eee8f Add bindable argument. 2021-01-23 20:21:06 +01:00
jb-perrier 54da2c8de0 Fix type. 2021-01-23 20:19:21 +01:00
jb-perrier 3c1a69eb6f Replace old getaddrinfo by unicode one. 2021-01-23 20:15:13 +01:00
jb-perrier a60e1ab8bb Place holder for other platforms. 2021-01-23 17:37:43 +01:00
W2.Wizard bf147ba13a Sentence restructuring 2021-01-23 17:15:46 +01:00
TalkingWallnut 9674f276d3 Fixed the issue when slope limit was set to 90 degrees flax crashed.
I fixed the issue when slope limit was set to 90 degrees flax would commit suicide (crash) (: . I just changed the clamp limit from 90 to 89 degrees.
2021-01-23 15:56:18 +01:00
jb-perrier c53fe681f5 Add network header. 2021-01-23 15:36:02 +01:00
jb-perrier 125b4347da Add windows typedef. 2021-01-23 15:35:41 +01:00
jb-perrier aa97296123 Add windows implementation. 2021-01-23 15:35:22 +01:00
jb-perrier d76c167ad9 Add NetworkBase. 2021-01-23 15:34:40 +01:00
Richard 71110c9f29 Fixed issue High DPI Issue 2021-01-23 23:39:24 +11:00
intolerantape 54e544a0f2 In CollisionsHelper, added versions of functions with output parameters that return the outputs as said.
Also added a 3D version of ClosestPointPointLine() because why wasn't that a thing?
2021-01-23 03:47:01 -08:00
intolerantape f3f25836e2 Added 3D version of CollisionsHelper::ClosestPointPointLine(). 2021-01-23 03:46:34 -08:00
GoaLitiuM 1a51752ca4 Disable whole program optimization and enable incremental linking in development builds 2021-01-23 12:40:54 +02:00
GoaLitiuM 8c6dbf2e30 Disable linker optimizations with incremental linking 2021-01-23 12:40:53 +02:00
GoaLitiuM d901c11570 Add compile flag for whole program optimization 2021-01-23 12:40:53 +02:00
stefnotch b208b7066b Fix fade distance (use input box as well) 2021-01-23 11:35:50 +01:00
W2.Wizard 83ceb31967 Added contribution guidelines
Since there were no set out guidelines for contributing, I decided to add them.

The guidelines overall are very straightforward.
2021-01-23 01:37:46 +01:00
mafiesto4 049450e31b Fix node widths for anim nodes 2021-01-22 23:45:19 +01:00
mafiesto4 e4fced44a9 Merge branch 'W2Wizard-AnimationArchetypeFix' 2021-01-22 23:42:11 +01:00
mafiesto4 19c65bec33 Merge branch 'AnimationArchetypeFix' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-AnimationArchetypeFix 2021-01-22 23:42:08 +01:00
mafiesto4 0db0fb24c9 Merge branch 'stefnotch-visject-improvements-5' 2021-01-22 23:35:13 +01:00
mafiesto4 704d42869d Merge branch 'visject-improvements-5' of git://github.com/stefnotch/FlaxEngine into stefnotch-visject-improvements-5 2021-01-22 23:35:09 +01:00
W2.Wizard 236a5a2f6f Update Animation.cs 2021-01-22 14:13:45 +01:00
mafiesto4 6cbeac6537 Merge remote-tracking branch 'origin/master' into 1.1
# Conflicts:
#	Source/Engine/Navigation/NavMesh.cpp
#	Source/Engine/Navigation/NavMeshBuilder.cpp
2021-01-22 11:31:22 +01:00
mafiesto4 cbbfb16628 Add scripting API events in Visual Script 2021-01-22 10:55:13 +01:00
mafiesto4 4042d466d3 Add support for Events in Scripting API reflection in Editor 2021-01-21 14:40:53 +01:00
mafiesto4 c2f745397a Fix ResizeAuto in SurfaceNode to include custom controls 2021-01-21 14:28:44 +01:00
mafiesto4 a4763f630e Fix right-click context menu for Visject Nodes 2021-01-21 14:28:02 +01:00
mafiesto4 178f0b9e3a Fix Dictionary to call ctor/dtor for Buckets when needed 2021-01-21 14:27:26 +01:00
mafiesto4 d93a2803cc Fix MAssembly classes dictionary cache allocation to be during assembly load 2021-01-21 14:26:52 +01:00
mafiesto4 57d7508e25 Fix some editor UI controls visible in Visual Scripting 2021-01-21 14:26:22 +01:00
mafiesto4 8680aba897 Fix missing public empty constructor for UICanvas 2021-01-20 13:45:49 +01:00
mafiesto4 8dce3c0fb7 Fix missing animated model parameter error 2021-01-20 13:38:42 +01:00
mafiesto4 f236338311 Merge branch 'stefnotch-patch-1' 2021-01-20 13:19:55 +01:00
mafiesto4 0b1ac3d0fe Merge branch 'patch-1' of git://github.com/stefnotch/FlaxEngine into stefnotch-patch-1 2021-01-20 13:19:52 +01:00
mafiesto4 ec4ccaeba5 Merge branch 'intolerantape-bugfixes' 2021-01-20 13:18:49 +01:00
mafiesto4 214ae3c440 Merge branch 'bugfixes' of git://github.com/intolerantape/FlaxEngine into intolerantape-bugfixes 2021-01-20 13:18:46 +01:00
mafiesto4 ef5e98efaa Fix assertion during engine shutdown after crash during rendering 2021-01-20 13:12:11 +01:00
mafiesto4 ea489fbf2a Fix crash in motion blur tile size calculation 2021-01-20 13:11:45 +01:00
mafiesto4 9ae79b8307 Add IFunctionDependantNode for Visject nodes 2021-01-20 11:13:09 +01:00
mafiesto4 f8bf87e0b1 Fixes 2021-01-20 09:14:30 +01:00
intolerantape 75d197cb84 Spelling fixes. 2021-01-19 23:02:33 -08:00
mafiesto4 6b5ce8c6e2 Merge branch 'stefnotch-patch-2' 2021-01-19 21:53:10 +01:00
mafiesto4 db6a02e20f Merge branch 'patch-2' of git://github.com/stefnotch/FlaxEngine into stefnotch-patch-2 2021-01-19 21:53:07 +01:00
mafiesto4 0a0c856a64 Add more splash screen quotes 2021-01-19 21:10:45 +01:00
stefnotch bd7a681700 Add more descriptive error message 2021-01-19 21:08:26 +01:00
mafiesto4 c4e6d013c1 Add more splash screen quotes 2021-01-18 22:47:31 +01:00
mafiesto4 d17d93c8a5 Merge branch 'jb-perrier-nearequalnode' 2021-01-18 21:10:09 +01:00
mafiesto4 6caffdc23f Merge branch 'nearequalnode' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-nearequalnode 2021-01-18 21:10:05 +01:00
mafiesto4 99b011df8b Merge branch 'W2Wizard-AboutFlaxAdjustment' 2021-01-18 21:07:53 +01:00
mafiesto4 c02faf51a0 Merge branch 'AboutFlaxAdjustment' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-AboutFlaxAdjustment 2021-01-18 21:07:49 +01:00
mafiesto4 ef240ce986 Add culling for decals (via DrawMinScreenSize property) 2021-01-18 15:53:15 +01:00
mafiesto4 e58332723a Fix compilation 2021-01-18 15:32:40 +01:00
mafiesto4 81daaf663b Fix Assimp on Linux 2021-01-18 15:27:57 +01:00
mafiesto4 a9e4d6d908 Fix exposing Mono API when using dynamic linking 2021-01-18 15:26:55 +01:00
mafiesto4 5f7f53304d Fix crash on GPUDeviceVulkan dispose if compute queue was using graphics queue 2021-01-18 15:26:45 +01:00
mafiesto4 3e0b753498 Refactor mono on Linux to use dynamic linking 2021-01-18 15:26:40 +01:00
mafiesto4 4bd76b70f2 Fix UseNativeWindowSystem option to be Windows-only 2021-01-18 15:26:28 +01:00
mafiesto4 d19c31555b Add support for dynamic updating navmesh when moving NavModifierVolume 2021-01-18 15:08:00 +01:00
mafiesto4 e0f1f18998 Move Actor static flags helper methods to be manually implemented (less bindings) 2021-01-18 15:07:39 +01:00
mafiesto4 f80c33f381 Add Actor.HasStaticFlag 2021-01-18 15:07:01 +01:00
mafiesto4 2bfcc15f66 Add invoking BoxVolume::OnBoundsChanged after transform changed 2021-01-18 15:00:35 +01:00
mafiesto4 fdc8e371c4 Add support for using NavAreas for navigation 2021-01-18 13:18:26 +01:00
mafiesto4 ba050b9eaa Add default spacing for CollectionEditor to 10 for cleaner UI when working with arrays and lists in Editor 2021-01-18 11:42:50 +01:00
mafiesto4 c1216a4318 Add NavAreaProperties 2021-01-18 11:42:17 +01:00
mafiesto4 2ae78b9afd Fix navmesh tiles build 2021-01-18 10:51:55 +01:00
mafiesto4 f33a2d8fe5 Remove assimp file 2021-01-17 22:14:37 +01:00
mafiesto4 1943de62e9 Add icon for Editor on Linux 2021-01-17 22:14:16 +01:00
mafiesto4 fcc4b371b9 Fix using dynamic libraries resolving path on Linux 2021-01-17 21:50:58 +01:00
mafiesto4 837174582b Fixes for Editor on Linux 2021-01-17 21:48:15 +01:00
mafiesto4 6b0d34a21d Fix C# assemblies id generation to use cross-platform hash code impl 2021-01-17 21:44:37 +01:00
jb-perrier 50f87c8bfb Remove unused (). 2021-01-17 12:36:53 +01:00
jb-perrier edb103f8e7 Fix NearEqual (GPU Particle) missing implementation. 2021-01-17 12:13:48 +01:00
W2.Wizard 8fd0af3f39 Fixed Typos and padding 2021-01-17 10:18:30 +01:00
stefnotch 4db3c6ca71 Increase default distance between nodes 2021-01-16 19:23:35 +01:00
stefnotch aa4ecab271 Improve Visject bracket positioning 2021-01-16 19:20:36 +01:00
stefnotch 3356013858 Improve empty space finding 2021-01-16 18:16:48 +01:00
stefnotch 8003055ba6 Improve node layout algorithm 2021-01-15 20:23:40 +01:00
stefnotch c112274666 Add additional comments to the formatting algorithm 2021-01-15 19:51:23 +01:00
mafiesto4 01a30faa62 Add NavMesh Modifier Volume actor type 2021-01-15 16:46:40 +01:00
mafiesto4 070faf12da Fixes for the rotated navmeshes building 2021-01-15 12:48:22 +01:00
mafiesto4 65d3883f03 Add support for masking navmesh agents in NavMeshBoundsVolume 2021-01-15 11:59:21 +01:00
mafiesto4 2c2c1af97f Add NavAgentMask 2021-01-15 11:59:04 +01:00
mafiesto4 f80f7cdd33 Fix crash on Android if GPU doesn't support linear sampling of the shadow map 2021-01-14 22:23:22 +01:00
mafiesto4 b76d5d34ea Fix lambda 2021-01-14 21:21:08 +01:00
mafiesto4 d7949b5405 Remove deprecated comment 2021-01-14 14:29:27 +01:00
mafiesto4 f8624ae768 Fix crash during navmesh build when actor gets removed 2021-01-14 14:18:40 +01:00
mafiesto4 98d272a903 Add support for SphereCollider and CapsuleCollider for navmesh 2021-01-14 14:18:22 +01:00
W2.Wizard 00c40e279c Update Extensions.cs 2021-01-14 13:56:10 +01:00
mafiesto4 7835259a83 Add TestPath utility to navigation system 2021-01-14 13:11:32 +01:00
mafiesto4 93aa265b20 Add support for rotated navmeshes 2021-01-14 13:08:53 +01:00
W2.Wizard 8e44e6b23c Applied additional review changes
Moved out the random Color created via HSV to its own function as @stefnotch suggested.

Added + 1 to the max value in NextByte to include max as a possible value.
2021-01-14 12:28:51 +01:00
W2.Wizard 437018e614 Applied review changes
Applied almost all review changes.
2021-01-14 11:50:03 +01:00
W2.Wizard 75c3388c00 Corrected comments 2021-01-14 01:12:13 +01:00
W2.Wizard 31dd5b852e Update Extensions.cs 2021-01-13 22:04:16 +01:00
W2.Wizard 6649f0d4c2 Removed unnecessary overload
Same can be achieved by  specifiying max.
2021-01-13 21:58:16 +01:00
W2.Wizard 604c583c36 Moved all methods to Extension.cs
Moved the methods for RandomUtils.cs to Extension.cs instead.
2021-01-13 21:16:17 +01:00
mafiesto4 b2a2652b56 Fix not using hardcoded order for showing Actor main properties in editor 2021-01-13 15:35:53 +01:00
mafiesto4 af692605ab Add option to hide navmesh in editor debug view 2021-01-13 15:21:50 +01:00
mafiesto4 d1a282e228 Fix removing unused navmesh tiles on whole scene rebuild 2021-01-13 14:50:43 +01:00
mafiesto4 88bddfb141 Add navmesh name to logs for better debugging 2021-01-13 14:49:50 +01:00
mafiesto4 29c3e2d54b Fix Color doc comments 2021-01-13 14:28:58 +01:00
mafiesto4 27ed23c1b9 Add support for multiple navmeshes on a scene 2021-01-13 14:28:46 +01:00
mafiesto4 9e3c413c91 Fix crash when using Byte, Int16 or UInt16 as VS parameters 2021-01-13 00:22:52 +01:00
mafiesto4 fd6158e1a9 Fix loading VariantType.Blob 2021-01-12 23:36:50 +01:00
mafiesto4 932de300e4 Fix missing focus for SliderControl 2021-01-12 23:07:20 +01:00
W2.Wizard 783b910700 Added XML comments 2021-01-12 20:29:32 +01:00
mafiesto4 a3fa8ff9f0 Optimize some includes 2021-01-12 19:17:08 +01:00
mafiesto4 259c419c36 Fix crash when resizing existing MaterialSlots collection for model 2021-01-12 19:09:42 +01:00
mafiesto4 d7696c4765 Split VectorInt into separate files for Int2, Int3 and Int4 2021-01-12 19:09:22 +01:00
mafiesto4 89f25516fc Add inline for float16 compression and add code reference note 2021-01-12 19:05:17 +01:00
mafiesto4 fd268f4e15 Add missing FLAXENGINE_API expose macro to engine math types 2021-01-12 19:00:54 +01:00
mafiesto4 dba43c4e9f Add support for using ObsoleteAttribute to upgrade old C# asset/script data format after refactor 2021-01-12 15:33:17 +01:00
W2.Wizard eaba489ba2 Initial Random class
First Commit

Static class that inhabits basic and common random functions, allows it to be used in visual scripting as well.
2021-01-12 15:08:45 +01:00
mafiesto4 40c7fe3f77 Add support for automatic DefaultValue attributes generation for fields in scripting API 2021-01-12 14:14:35 +01:00
mafiesto4 a6d5fb318a Fix default field value parsing to skip whitespaces 2021-01-12 14:14:08 +01:00
mafiesto4 d20cbf434f Add default values initialization for structures and new array entries when resizing 2021-01-12 13:49:26 +01:00
stefnotch 5679d86683 Fix tracking mouse offset on high DPI screens 2021-01-12 12:04:30 +01:00
mafiesto4 45211fa61c Merge remote-tracking branch 'origin/master' into navigation-features 2021-01-12 12:04:20 +01:00
mafiesto4 6252c111b4 Tweak BatteryInfo 2021-01-11 16:38:12 +01:00
stefnotch ab4195ab6c Fix right clicking on Visject boxes
Previously, the primary context menu would get triggered when right clicking on a box, causing some issues
2021-01-11 16:24:41 +01:00
mafiesto4 1d2e2e5575 Merge branch 'jb-perrier-batteryinfo' 2021-01-11 16:13:21 +01:00
mafiesto4 7de0010772 Merge branch 'batteryinfo' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-batteryinfo 2021-01-11 16:13:17 +01:00
mafiesto4 ebe0b9c8c9 Merge branch 'jb-perrier-opendialog' 2021-01-11 15:39:09 +01:00
mafiesto4 fa3b2af0ca Merge branch 'opendialog' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-opendialog 2021-01-11 15:39:06 +01:00
mafiesto4 b446790438 Update shaders 2021-01-11 15:38:22 +01:00
mafiesto4 7ddf98abaa Merge branch 'W2Wizard-typo-fix' 2021-01-11 15:34:46 +01:00
mafiesto4 fb84aa2c4b Merge branch 'typo-fix' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-typo-fix 2021-01-11 15:34:41 +01:00
mafiesto4 023c4f4726 Merge branch 'VNNCC-typo-fix' 2021-01-11 15:33:49 +01:00
mafiesto4 ba1a246a90 Merge branch 'typo-fix' of git://github.com/VNNCC/FlaxEngine into VNNCC-typo-fix 2021-01-11 15:33:45 +01:00
mafiesto4 a664e27772 Add missing event unregister for foliage/terrain tabs 2021-01-11 15:13:47 +01:00
mafiesto4 75b8e0a0f2 Merge branch 'VNNCC-fix-create-terrain-check' 2021-01-11 15:06:48 +01:00
mafiesto4 fc38aff46b Merge branch 'fix-create-terrain-check' of git://github.com/VNNCC/FlaxEngine into VNNCC-fix-create-terrain-check 2021-01-11 15:06:39 +01:00
mafiesto4 1ca31224e2 Fix code style 2021-01-11 15:03:23 +01:00
mafiesto4 c89479b5e7 Merge branch 'jb-perrier-windowstartpos' 2021-01-11 15:00:52 +01:00
mafiesto4 a691f15e1f Merge branch 'windowstartpos' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-windowstartpos 2021-01-11 15:00:48 +01:00
mafiesto4 f0f1863124 Fix code style and move Camera Orientation widget below 2021-01-11 14:58:46 +01:00
mafiesto4 0823e00dfe Merge branch 'jb-perrier-cameraviews' 2021-01-11 14:52:23 +01:00
mafiesto4 43631ceb93 Merge branch 'cameraviews' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-cameraviews 2021-01-11 14:52:19 +01:00
mafiesto4 4bd383f412 Merge branch 'W2Wizard-GoldenRatio' 2021-01-11 14:50:48 +01:00
mafiesto4 caa426767c Merge branch 'GoldenRatio' of git://github.com/W2Wizard/FlaxEngine into W2Wizard-GoldenRatio 2021-01-11 14:50:45 +01:00
stefnotch 7112160de5 Fix dragging existing connection
Undo stack
2021-01-11 13:00:24 +01:00
mafiesto4 f8feccc27d Fixes for unix directories list with path filter 2021-01-10 22:58:34 +01:00
mafiesto4 0dc9d3a59a Add ShowOpenFileDialog on Linux 2021-01-10 22:40:07 +01:00
mafiesto4 7bbf089e9f Add curl for Editor on Linux 2021-01-10 22:15:13 +01:00
mafiesto4 8d7d2431df Add glslang for Linux 2021-01-10 19:57:01 +01:00
mafiesto4 09720ee758 Fix linking Assimp on Linux and strip the lib 2021-01-10 18:58:55 +01:00
stefnotch 419ca4e630 Reduce width of mask nodes 2021-01-10 09:56:10 +01:00
mafiesto4 ee1b7bad56 Fix Editor build on Linux 2021-01-10 09:46:37 +01:00
mafiesto4 c7547b3a46 Merge remote-tracking branch 'origin/master' into linux-editor 2021-01-10 09:14:03 +01:00
jb-perrier 01e904e702 Fixing Windows position (on startup) being always on the top left corner. 2021-01-10 00:17:47 +01:00
jb-perrier d2888d0007 Adding Convert feature to Actor context menu. 2021-01-09 23:21:31 +01:00
stefnotch 9e1c1ecb9a Implement basic node formatter 2021-01-09 21:46:41 +01:00
jb-perrier cd5db384a4 Adding Camera Orientation to editor view menu. 2021-01-09 19:40:06 +01:00
mafiesto4 d586f828b2 Disable Linux CI for now 2021-01-09 18:39:56 +01:00
mafiesto4 f073e07de7 Fix error on CI running on Linux machine 2021-01-09 18:37:05 +01:00
mafiesto4 3f278b603d Fix path separators 2021-01-09 18:24:19 +01:00
mafiesto4 6d0f2b9083 Add CI build action for Linux 2021-01-09 18:21:09 +01:00
mafiesto4 3060a2664d Add executable flag for scripts 2021-01-09 18:20:47 +01:00
mafiesto4 698cfd0c0a Fix BlurPanel crashes due to slider for BlurStrength 2021-01-09 18:09:39 +01:00
mafiesto4 e6bffde301 Merge branch 'gh-actions' 2021-01-09 18:09:09 +01:00
mafiesto4 1b0e57408c Separate checkout steps 2021-01-09 17:43:07 +01:00
mafiesto4 442135047f Use manual LFS checkout 2021-01-09 17:41:56 +01:00
stefnotch ef2dbb7818 Fix double context menu invokation
SurfaceNode.cs already takes care of opening the context menu
2021-01-09 11:26:29 +01:00
W2.Wizard 2d2d45f568 Increased precision by 5 digits 2021-01-08 23:14:09 +01:00
mafiesto4 617e25eb4c Add lfs t repo clone 2021-01-08 23:08:51 +01:00
mafiesto4 24874376c3 Add initial build script for Windows editor and game 2021-01-08 23:00:08 +01:00
W2.Wizard 0d0340e11a Added golden ratio value 2021-01-08 12:06:17 +01:00
VNC 2252cd73f9 Removed unnecessary check 2021-01-07 00:06:43 +01:00
VNC 6deb64e587 Fix to disable terrain and foliage buttons if no scene is present
This will fix the issues described in #99.
2021-01-07 00:02:04 +01:00
mafiesto4 0e768694b5 Add using additional temporary temp param in scripting bindings glue code for array parameters using BytesContainer 2021-01-07 00:01:53 +01:00
mafiesto4 dca6736a6f Inline Vulkan func 2021-01-06 23:53:22 +01:00
W2.Wizard 6f727aa483 Corrected additional typos 2021-01-06 22:20:16 +01:00
mafiesto4 eec6957b08 Fix using unsigned integer properties in Visual Script editor 2021-01-06 11:31:38 +01:00
VNC 6da5c704b1 Change 'for' to 'to' 2021-01-06 01:03:19 +01:00
mafiesto4 f10c6b4ff6 Fix Linux build 2021-01-05 19:51:47 +01:00
mafiesto4 efa5d05f5f Fixes for building editor for Linux 2021-01-05 16:23:02 +01:00
mafiesto4 336a3bd484 Move shader source code length adjustment to the main compilation routine 2021-01-05 14:25:38 +01:00
mafiesto4 6adb489276 Fix PCF shadow uvs vector trunc warning 2021-01-05 14:17:20 +01:00
mafiesto4 12f34f33b3 Fix PlatformSettings typedef on Android 2021-01-05 14:17:15 +01:00
mafiesto4 4992d21747 Fix using AssetRefEditor for editing asset reference on Guid property 2021-01-05 14:17:11 +01:00
mafiesto4 0c1d797511 Fix null character at shader sources at during game cooking 2021-01-05 14:17:05 +01:00
mafiesto4 bd3f2b3019 Update DirectXShaderCompiler to 1.6 2021-01-05 14:16:57 +01:00
mafiesto4 153cfad507 Merge remote-tracking branch 'origin/1.0' into 1.1 2021-01-05 14:16:23 +01:00
mafiesto4 d7224670c5 Fix PCF shadow uvs vector trunc warning 2021-01-05 14:16:17 +01:00
mafiesto4 31bab88a5b Fix PlatformSettings typedef on Android 2021-01-05 14:15:49 +01:00
mafiesto4 1e383fde5c Fix using AssetRefEditor for editing asset reference on Guid property 2021-01-05 14:15:42 +01:00
mafiesto4 f5b9a95522 Fix null character at shader sources at during game cooking 2021-01-05 14:15:32 +01:00
mafiesto4 199683897a Update DirectXShaderCompiler to 1.6 2021-01-05 14:15:22 +01:00
mafiesto4 be319c446d Refactor settings types to use scripting API 2021-01-05 14:14:34 +01:00
W2.Wizard 4d8cc9aef7 Fixed additional typos
Went through the source with VNNCC to correct as many found typos as possible

Co-Authored-By: VNC <52937757+VNNCC@users.noreply.github.com>
2021-01-05 02:14:21 +01:00
VNC 6ab300025b Fixed a ton of typos 2021-01-05 02:13:15 +01:00
W2.Wizard f7c17d96ce Fixed a typo 2021-01-05 01:06:42 +01:00
jb-perrier f5ac18915a Fixing open save dialog. 2021-01-04 22:44:40 +01:00
jb-perrier ed92489a60 Fixing open file dialog. 2021-01-04 21:59:57 +01:00
mafiesto4 946d69a3ef Bump up the build number 2021-01-04 19:38:02 +01:00
mafiesto4 cc8e78b505 Merge remote-tracking branch 'origin/master' into navigation-features
# Conflicts:
#	Source/Editor/Content/Settings/NavigationSettings.cs
#	Source/Engine/Engine/PhysicalMaterial.cs
#	Source/Tools/Flax.Build/Bindings/BindingsGenerator.Api.cs
2021-01-04 14:31:56 +01:00
mafiesto4 b38ccb0fbd Remove submodules 2021-01-04 14:30:33 +01:00
mafiesto4 953f8da84d Update copyright year 2021-01-04 14:25:21 +01:00
mafiesto4 cd8a27ca26 Fix typo 2021-01-04 14:20:00 +01:00
mafiesto4 c5568c8eae Add support for loading JsonAsset instance objects if they implement ISerializable interface 2021-01-04 14:19:51 +01:00
mafiesto4 8dc5b11f51 Add API_INTERFACE to scripting API bindings for implementing interfaces 2021-01-04 14:18:59 +01:00
stefnotch 10cdbc8fbc Add dragging existing connection from input box 2021-01-04 12:33:29 +01:00
mafiesto4 d715c0c0dd Merge branch 'VNNCC-dev' 2021-01-03 23:41:36 +01:00
mafiesto4 7bbdd25a9e Merge branch 'dev' of git://github.com/VNNCC/FlaxEngine into VNNCC-dev 2021-01-03 23:41:33 +01:00
mafiesto4 566a653c0a Fix using ApiToken constant 2021-01-03 23:38:43 +01:00
mafiesto4 464523f318 Add missing control reference clear 2021-01-03 23:38:30 +01:00
mafiesto4 e68b54159d Merge branch 'stefnotch-context-menu-focus-returning' 2021-01-03 23:36:11 +01:00
mafiesto4 0d4ac16d18 Merge branch 'context-menu-focus-returning' of git://github.com/stefnotch/FlaxEngine into stefnotch-context-menu-focus-returning 2021-01-03 23:36:08 +01:00
mafiesto4 9d66d5f6a7 Merge branch 'VNNCC-constants-update' 2021-01-03 23:19:31 +01:00
mafiesto4 717d02f073 Merge branch 'constants-update' of git://github.com/VNNCC/FlaxEngine into VNNCC-constants-update 2021-01-03 23:19:26 +01:00
mafiesto4 786f057971 Fix crash on scripting reload when using Anim Graph with custom nodes 2021-01-03 23:18:53 +01:00
mafiesto4 c1a83662d9 Add additional check for twice plugin initialization in case of error 2021-01-03 23:18:24 +01:00
VNC e62ccd55ba Make constants use the actual const keyword
All references are baked into the assembly with the corresponding IL instruction when compiling. Because no lookup will take place, it will "increase" the performance.
2021-01-03 22:56:54 +01:00
mafiesto4 1f9888b88c Merge branch 'jb-perrier-gameplugin' 2021-01-03 22:52:59 +01:00
mafiesto4 0b3232d94b Merge branch 'gameplugin' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-gameplugin 2021-01-03 22:52:55 +01:00
mafiesto4 6c7529f6b3 Update link to Youtube channel 2021-01-03 22:14:04 +01:00
mafiesto4 bf9204f146 Add IconsScale to editor interface options 2021-01-03 22:13:31 +01:00
mafiesto4 4043e35b10 Merge branch 'DaveTheGameDev-IconScaling' 2021-01-03 21:06:29 +01:00
mafiesto4 add539392a Merge branch 'IconScaling' of git://github.com/DaveTheGameDev/FlaxEngine into DaveTheGameDev-IconScaling 2021-01-03 21:06:25 +01:00
mafiesto4 7e4afbc4ff Update shaders 2021-01-03 21:00:39 +01:00
mafiesto4 c39b201d3a Add more updates for copyright year 2021-01-03 21:00:32 +01:00
mafiesto4 6fdb30b6af Merge branch 'jb-perrier-copyright' 2021-01-03 20:27:15 +01:00
mafiesto4 cc399b51f0 Merge branch 'copyright' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-copyright 2021-01-03 20:27:08 +01:00
mafiesto4 c5ce32d66d Merge branch 'stefnotch-fix-shortcuts-in-play-mode' 2021-01-03 20:25:15 +01:00
mafiesto4 20969b5d3d Merge branch 'fix-shortcuts-in-play-mode' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-shortcuts-in-play-mode 2021-01-03 20:25:11 +01:00
mafiesto4 fee0a458d0 Adjust AboutDialog bounds 2021-01-03 20:24:03 +01:00
mafiesto4 af9e710763 Merge branch 'jb-perrier-contributors' 2021-01-03 20:18:42 +01:00
mafiesto4 23b2094dd4 Merge branch 'contributors' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-contributors 2021-01-03 20:18:37 +01:00
mafiesto4 23c51694c7 Reimplement Motion Blur 2021-01-03 20:13:09 +01:00
stefnotch f59fe297ea Fix shortcuts (F5, F6, F11) in play mode 2021-01-03 11:35:43 +01:00
jb-perrier 21ec0f103e Implementing GetBatteryInfo() in PlatformBase. 2021-01-02 18:41:00 +01:00
jb-perrier 3ed2e010fa Bumping new file copyright to 2021. 2021-01-02 14:55:30 +01:00
jb-perrier 096d6297fe Adding contributors names to AboutDialog. 2021-01-02 14:46:06 +01:00
jb-perrier 03eb39afe6 Bumping all copyright headers to 2021. 2021-01-02 14:28:49 +01:00
stefnotch b63753b4d5 Return focus to the previous control when closing a context menu
Fixes the fancy Visject input stuff
2021-01-02 13:30:12 +01:00
jb-perrier e9f72dbbbf Adding ACLineStatus enum. 2021-01-02 13:15:15 +01:00
jb-perrier 624ab4b8dd Implementing GetBatteryInfo() to Win32Platform. 2021-01-02 12:54:16 +01:00
jb-perrier a4607385fd Adding GetBatteryInfo() to PlatformBase. 2021-01-02 12:53:20 +01:00
jb-perrier 0f2e579674 Create BatteryInfo struct. 2021-01-02 12:51:32 +01:00
jb-perrier 463e981d39 GamePlugin only used in PlayMode/Cooked game. 2021-01-01 20:20:38 +01:00
mafiesto4 e5286510d1 Fix reaming opengl leftovers 2020-12-31 16:56:09 +01:00
mafiesto4 66e8560b51 Fix comparing String with StringView 2020-12-31 16:55:42 +01:00
mafiesto4 3877f100c3 Fix C# methods lookup for method signatures with output structure parameter passed as reference 2020-12-31 16:50:49 +01:00
mafiesto4 d94e777feb Add support for using unsigned integer input fields in Visject Surface editor 2020-12-31 15:36:07 +01:00
mafiesto4 9b891d0c55 Add support for hexadecimal values in editor value fields 2020-12-31 15:35:31 +01:00
mafiesto4 3ab04598da Fix Length node in Visual Script 2020-12-31 15:02:21 +01:00
mafiesto4 f7808dc7ca Add support for active logging of the process output on Windows 2020-12-31 01:05:48 +01:00
mafiesto4 99f1ac1cc5 Fix logging process output on Windows 2020-12-31 00:50:39 +01:00
mafiesto4 3973452ec3 Add logging offset for Json parsing errors 2020-12-30 23:50:07 +01:00
mafiesto4 29a8abd996 Fix Editor features usage enable when no scene is loaded 2020-12-30 23:36:31 +01:00
mafiesto4 7de3632c7e Merge branch 'stefnotch-fix-null-style-crash' 2020-12-30 23:00:42 +01:00
mafiesto4 fa381c5493 Merge branch 'fix-null-style-crash' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-null-style-crash 2020-12-30 23:00:38 +01:00
mafiesto4 a293be2121 Merge branch 'VNNCC-fix-toolstrip-buildscene' 2020-12-30 22:58:35 +01:00
mafiesto4 e19b10f790 Merge branch 'fix-toolstrip-buildscene' of git://github.com/VNNCC/FlaxEngine into VNNCC-fix-toolstrip-buildscene 2020-12-30 22:58:31 +01:00
mafiesto4 05790ab9a1 Fix code style 2020-12-30 22:56:17 +01:00
mafiesto4 5e469a0ae3 Remove deprecated and unsued OpenGL backend 2020-12-30 11:27:37 +01:00
mafiesto4 4c205be617 Fix code style 2020-12-30 11:20:37 +01:00
stefnotch 96dbd3a937 Prevent loading 'null' style 2020-12-30 10:28:17 +01:00
VNC 265cc13971 Updated build scenes toolstrip button
The local variable "canEditScene" doesn't check if any scene is loaded, the EditingSceneState type overrides the CanEditScene property to always return true which makes the check necessary.
2020-12-30 03:40:07 +01:00
mafiesto4 4ec3e6aed9 Remove unused code 2020-12-30 00:52:07 +01:00
mafiesto4 a082d52543 Remove unused ExtractVersionNum function 2020-12-30 00:05:20 +01:00
mafiesto4 1a0c12191d Add IgnoreMissingDocumentationWarnings option into generated csproj files 2020-12-30 00:05:05 +01:00
mafiesto4 82cade649b Fix removing namespace from nodes in imported model files 2020-12-29 23:39:33 +01:00
mafiesto4 72ab8a5363 Fix GPU timer query detected warning to be single-time 2020-12-29 23:26:14 +01:00
mafiesto4 8998eb2330 Fix editor main window resizing edges size to be 10px 2020-12-29 23:20:21 +01:00
mafiesto4 000e2c96a5 Merge branch 'stefnotch-enha-point-from-to-screen' 2020-12-29 23:13:26 +01:00
mafiesto4 7b7ba7d73e Merge branch 'enha-point-from-to-screen' of git://github.com/stefnotch/FlaxEngine into stefnotch-enha-point-from-to-screen 2020-12-29 23:13:21 +01:00
mafiesto4 826c0206cb Fix model collision data generate option to be in ModelProxy 2020-12-29 23:11:00 +01:00
mafiesto4 a2371dab83 Merge branch 'jb-perrier-collisiondata-from-model' 2020-12-29 23:06:31 +01:00
mafiesto4 8dd915ec01 Merge branch 'collisiondata-from-model' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-collisiondata-from-model 2020-12-29 23:06:26 +01:00
mafiesto4 45e86f7591 Fix MoveFile on Windows if using proxy file on different drive 2020-12-29 21:00:23 +01:00
mafiesto4 de70ac3e36 Tweaks 2020-12-29 20:59:51 +01:00
mafiesto4 e95e79cabf Merge branch 'stefnotch-file-rename-fix' 2020-12-29 20:13:56 +01:00
mafiesto4 7335cd39ca Merge branch 'file-rename-fix' of git://github.com/stefnotch/FlaxEngine into stefnotch-file-rename-fix 2020-12-29 20:13:52 +01:00
stefnotch 65ab9cac50 Change ClientFrom/ToScreen to PointFrom/ToScreen
Fix #67
2020-12-29 18:10:26 +01:00
mafiesto4 ae8d6a6000 Merge branch 'VNNCC-fix-typo' 2020-12-29 16:03:53 +01:00
VNC 8b2a8d22b3 Fixed more typos in Source\Engine\Content 2020-12-29 03:41:01 +01:00
VNC 8a7cb34e93 Fix Audio file typos 2020-12-29 03:35:52 +01:00
VNC 967b6585e1 Fix more typos in Source\Engine\Animations 2020-12-29 03:31:13 +01:00
VNC 1c4ebe9ab6 Fix typo in AnimGraph 2020-12-29 03:23:37 +01:00
VNC d65e922cca Fixed typos in AnimGraph.Custom 2020-12-29 03:23:15 +01:00
VNC d69bdbe1ef Fix typo in Audio error log 2020-12-29 03:20:42 +01:00
VNC 3975efc9e4 Fix typo in error log message 2020-12-29 03:03:04 +01:00
mafiesto4 fb22d1dd32 Merge branch 'Polypulse-master' 2020-12-28 22:11:50 +01:00
mafiesto4 9a9996bd51 Merge branch 'master' of git://github.com/Polypulse/FlaxEngine into Polypulse-master 2020-12-28 22:11:47 +01:00
mafiesto4 140fae3fa1 Fix crash for ScriptingObject.ToString if class is null 2020-12-28 22:00:11 +01:00
mafiesto4 4c372c0b76 Merge branch 'VNNCC-issue-26' 2020-12-28 21:56:57 +01:00
mafiesto4 97586fe936 Merge branch 'issue-26' of git://github.com/VNNCC/FlaxEngine into VNNCC-issue-26 2020-12-28 21:56:54 +01:00
mafiesto4 3ed30b81d6 Fix code style 2020-12-28 21:55:45 +01:00
mafiesto4 13102254f9 Merge branch 'VNNCC-vscode-insiders' 2020-12-28 21:53:12 +01:00
VNC e0c362856e Support for Visual Studio Code Insiders 2020-12-28 21:12:52 +01:00
VNC a4c1bf104c Fix typo and use GetID for the log 2020-12-28 19:52:39 +01:00
VNC 2f313c6b43 Correct DockHintWindow drag offset if it was invalid when initializing
Description: If the toMove window is unfocused the FlaxEngine.Input.MouseScreenPosition property will always return a vector that only contains zeros. #64

Fix: Perform a later update that will correct the drag offset using the current mouse position.
2020-12-28 19:05:14 +01:00
mafiesto4 dc1360422f Merge branch 'VNNCC-master' 2020-12-28 11:09:16 +01:00
mafiesto4 8d0018c42d Merge branch 'master' of git://github.com/VNNCC/FlaxEngine into VNNCC-master 2020-12-28 11:09:12 +01:00
mafiesto4 cb6179dbb7 Remove unused checks 2020-12-28 10:33:28 +01:00
Sean Connor aff2c154a9 Fixes issue where type editor fails to find acceptable types when creating new json data asset. 2020-12-26 14:18:46 -07:00
David Conway c6664c7d1e Fix xml summary in ToolStrip.cs 2020-12-26 04:40:42 +11:00
VNC 3bf54bac85 Fix inverted Y Gizmo Rotation 2020-12-25 03:00:10 +01:00
David Conway c0cc89201e Move icon settings to styles 2020-12-24 20:04:43 +11:00
David Conway 16fab80f86 Change how settings are accessed in ToolBox Window 2020-12-24 20:04:38 +11:00
David Conway 08ebd99ed4 Add ToolStrip and Toolbox icon scaling settings 2020-12-24 20:04:36 +11:00
mafiesto4 da389eea03 Fix preserving Editor undo actions during play mode 2020-12-24 00:01:33 +01:00
mafiesto4 8347e15413 Fix undo redo flags in play mode 2020-12-24 00:01:07 +01:00
mafiesto4 8ea5dcb110 Merge branch 'stefnotch-fix-maximum-window-size' 2020-12-23 22:39:05 +01:00
mafiesto4 c9989e0aff Merge branch 'fix-maximum-window-size' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-maximum-window-size 2020-12-23 22:39:01 +01:00
mafiesto4 3f73d63edb Merge branch 'stefnotch-fix-dpi-issues' 2020-12-23 22:37:16 +01:00
mafiesto4 05b358f44e Merge branch 'fix-dpi-issues' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-dpi-issues 2020-12-23 22:37:12 +01:00
stefnotch 4a068a3b86 Change maximum window size to 4096
For those neat 4k monitors
2020-12-23 21:54:42 +01:00
mafiesto4 e4936547e3 Fixes for building editor for Linux 2020-12-23 21:54:21 +01:00
mafiesto4 429b71b63f Add Editor config for Linux 2020-12-23 21:28:44 +01:00
mafiesto4 969367dc3e Add Assimp for Linux 2020-12-23 21:27:29 +01:00
mafiesto4 87e026bd4f Fix Android build 2020-12-23 14:26:07 +01:00
stefnotch 0679aebfac Fix docking hints jumping around on high dpi screens 2020-12-23 14:12:53 +01:00
stefnotch 310140e91b Fix context menu disappearing
Fix #10
2020-12-23 14:11:11 +01:00
mafiesto4 e242dbf89f Add missing code for ScriptingType copy/move 2020-12-23 12:58:31 +01:00
mafiesto4 ce6c360d29 Add proper typeInfo generation for non-scripting API classes 2020-12-23 12:55:53 +01:00
mafiesto4 07fb8e034f Merge remote-tracking branch 'origin/master' into navigation-features 2020-12-23 11:04:09 +01:00
mafiesto4 2acad9963f Fix #41 2020-12-23 10:14:51 +01:00
mafiesto4 8198b73297 Add license files for all third party modules explicitly (even if using predefined license defined in config) 2020-12-22 23:29:42 +01:00
mafiesto4 38cd840a66 Tweak readme 2020-12-22 23:18:23 +01:00
mafiesto4 aa2a131956 Merge branch 'stefnotch-fix-double-extension' 2020-12-22 23:15:36 +01:00
mafiesto4 4f9df89fd3 Merge branch 'fix-double-extension' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-double-extension 2020-12-22 23:15:33 +01:00
mafiesto4 94822b57d9 Remove dummy logs 2020-12-22 23:14:36 +01:00
stefnotch a388df2f74 Better handle double file extensions on rename
Fix #37
2020-12-22 22:47:06 +01:00
mafiesto4 2c6a70b744 Merge branch 'stefnotch-fix-rmb-scroll' 2020-12-22 18:47:06 +01:00
mafiesto4 566f8f5810 Merge branch 'fix-rmb-scroll' of git://github.com/stefnotch/FlaxEngine into stefnotch-fix-rmb-scroll 2020-12-22 18:47:03 +01:00
stefnotch 21cbfec533 Fix speed change scrolling being wonky 2020-12-22 18:33:06 +01:00
mafiesto4 4279b3f482 Merge branch 'klukule-duplicite-filename-extension-fix' 2020-12-22 18:32:08 +01:00
mafiesto4 4c212400d8 Merge branch 'duplicite-filename-extension-fix' of git://github.com/klukule/FlaxEngine into klukule-duplicite-filename-extension-fix 2020-12-22 18:32:04 +01:00
mafiesto4 cf0aeb79bf Remove TAA and Motion Blur implementations 2020-12-22 18:07:53 +01:00
mafiesto4 4fe91d57b7 Fix code style 2020-12-22 13:45:02 +01:00
mafiesto4 760d586923 Fix crash when using Physical Material with missing instance
(cherry picked from commit 5e77925492)
2020-12-22 12:59:31 +01:00
mafiesto4 5e239f5d87 Fix code style
(cherry picked from commit 16cd75d179)
2020-12-22 12:59:27 +01:00
mafiesto4 16cd75d179 Fix code style 2020-12-22 12:57:00 +01:00
mafiesto4 4665e8fbdb Add support for basic classes to Scripting Type (without scripting object as a base) 2020-12-22 12:55:57 +01:00
mafiesto4 f25064fae8 Merge remote-tracking branch 'origin/master' into navigation-features 2020-12-22 12:13:26 +01:00
mafiesto4 5e77925492 Fix crash when using Physical Material with missing instance 2020-12-22 11:18:00 +01:00
mafiesto4 70d0c0ea8a Fix generating project files without host platform tools 2020-12-22 00:08:24 +01:00
jb-perrier 1fccefb07f Use already defined var. 2020-12-22 00:03:19 +01:00
mafiesto4 59fb6eb875 Merge branch 'jb-perrier-reportissue' 2020-12-21 23:51:53 +01:00
mafiesto4 bdbb16d759 Merge branch 'reportissue' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-reportissue 2020-12-21 23:51:48 +01:00
mafiesto4 0f18fd9610 Fix build scripts 2020-12-21 23:46:59 +01:00
mafiesto4 2a29abcc39 Fix code style 2020-12-21 23:37:28 +01:00
mafiesto4 d322015e6e Fix model LOD index detection in importer 2020-12-21 23:22:08 +01:00
mafiesto4 4f954c2eb4 Fix code style 2020-12-21 23:21:46 +01:00
jb-perrier d0e509a8fc Adding "Generate collision data" from Model context menu. 2020-12-21 23:20:42 +01:00
jb-perrier bc1a5b99ac Fix link to Github issue. 2020-12-21 21:58:39 +01:00
mafiesto4 47c0797028 Merge branch 'jb-perrier-master' 2020-12-21 21:32:27 +01:00
mafiesto4 31f6e94da2 Merge branch 'master' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-master 2020-12-21 21:32:21 +01:00
mafiesto4 15e3cc0e0b Merge branch 'jb-perrier-registerengine' 2020-12-21 20:43:30 +01:00
mafiesto4 810c1fb574 Merge branch 'registerengine' of git://github.com/jb-perrier/FlaxEngine into jb-perrier-registerengine 2020-12-21 20:43:25 +01:00
mafiesto4 cac33d8f72 Fix #18 2020-12-21 20:38:47 +01:00
mafiesto4 666aeca4ea Fixes for code style 2020-12-21 20:27:53 +01:00
jb-perrier 596943c913 Typo. 2020-12-21 18:26:59 +01:00
jb-perrier fd5835e3c8 Fix wrong engine path with RegisterEng. as Admin. 2020-12-21 18:16:04 +01:00
jb-perrier 965352c3f4 Revert "Fix wrong engine path with RegisterEng. as Admin."
This reverts commit 4a3092d0e8.
2020-12-21 18:14:52 +01:00
jb-perrier 4a3092d0e8 Fix wrong engine path with RegisterEng. as Admin. 2020-12-21 18:10:38 +01:00
jb-perrier 39491663ee Fix flashing tooltip. 2020-12-21 17:25:10 +01:00
mafiesto4 7798a7f6d5 Refactor PhysicalMaterial to use API bindings 2020-12-21 15:39:14 +01:00
mafiesto4 41b938b3cd Refactor NavigationSettings to use API bindings 2020-12-21 14:53:54 +01:00
mafiesto4 4d2d801bf4 Fix typos 2020-12-21 14:53:33 +01:00
mafiesto4 cea1a67749 Refactor game settings to support using API bindings 2020-12-21 14:53:27 +01:00
mafiesto4 aa7711dc31 Fix loaded asset verification error for json assets that have the scripting type 2020-12-21 14:03:53 +01:00
mafiesto4 585c752d72 Add more objects types checks and casting utilities to ScriptingObject 2020-12-21 14:03:15 +01:00
mafiesto4 3a314d97eb Add ScriptingTypeHandle debugger view to flax.natvis 2020-12-21 13:29:52 +01:00
mafiesto4 8ac2d7069d Fixes for code style
(cherry picked from commit c987acb709)
2020-12-21 11:56:22 +01:00
jb-perrier 3c60f2691d Typo 2020-12-21 11:54:51 +01:00
jb-perrier c83cc35b93 Adding auto sort to ContextMenu. 2020-12-21 11:54:51 +01:00
mafiesto4 4508f5b77f Revert 2020-12-21 11:54:16 +01:00
mafiesto4 ed5450d7e6 Fix context menu positioning for child menus when flipping the direction over Y axis 2020-12-21 11:49:02 +01:00
mafiesto4 c987acb709 Fixes for code style 2020-12-21 11:42:18 +01:00
mafiesto4 89b78e598e Merge branch 'jb-perrier-autosort' 2020-12-21 11:38:47 +01:00
jb-perrier c496f2a9db Typo 2020-12-21 11:38:23 +01:00
jb-perrier 0688e9c6c3 Set auto sort to true for New asset context menu. 2020-12-21 11:38:23 +01:00
jb-perrier 34d74477e4 Adding auto sort to ContextMenu. 2020-12-21 11:38:23 +01:00
mafiesto4 1798bf003b Fix editing overridden particle emitter parameter in particle system window 2020-12-21 11:37:10 +01:00
Lukáš Jech 07f58558e3 Force proper extension if manually specified by user during asset creation 2020-12-21 03:58:52 +01:00
mafiesto4 96457a0adc Fix crash on null 2020-12-20 21:16:50 +01:00
stefnotch 9c55518744 Fix renaming item error handling 2020-12-20 19:19:30 +01:00
mafiesto4 f35c666ea8 Fix LFS issues for contributors due to LFS server locks check requiring authorization 2020-12-20 18:29:43 +01:00
stefnotch 0da02b99cc Fix renaming files to same name with different case 2020-12-20 18:00:14 +01:00
mafiesto4 7e6b236661 Remove unused code 2020-12-20 10:51:29 +01:00
mafiesto4 8a870a07ae Cleanup some old unused shader code 2020-12-20 10:22:54 +01:00
mafiesto4 afeaaee376 Remove unused noise test functions 2020-12-20 00:50:35 +01:00
mafiesto4 973af724f4 Fix editor viewport camera glitch on first frame when using camera orbiting 2020-12-20 00:03:14 +01:00
mafiesto4 5cab22e20d Fixes for Vulkan descriptor types iterations 2020-12-19 23:24:31 +01:00
mafiesto4 af39369661 Merge branch 'dragonCASTjosh-master' 2020-12-19 23:11:39 +01:00
mafiesto4 3bdd2e4e5b Merge branch 'master' of git://github.com/dragonCASTjosh/FlaxEngine into dragonCASTjosh-master 2020-12-19 23:11:30 +01:00
Jean-Baptiste Perrier 6cefab801f Title bar High DPI fix. 2020-12-19 13:47:59 +01:00
Josh 84628b8f6b Fix compiler errors with Vulkan 1.2.x 2020-12-19 02:36:57 +01:00
mafiesto4 68e3b279fa Fix building C# game code without Window SDK for Windows Editor 2020-12-18 13:22:14 +01:00
mafiesto4 def3698423 Fix #3 2020-12-18 13:07:27 +01:00
mafiesto4 0e6ead938e Add support for API class not using ScriptingObject as a base 2020-12-17 23:09:09 +01:00
mafiesto4 93c35a19f5 Add NavMeshProperties 2020-12-16 10:24:18 +01:00
mafiesto4 a36a54adcd Tweaks 2020-12-15 17:43:46 +01:00
mafiesto4 4c0c7cc394 Add NavAgentProperties and NavigationTypes.h 2020-12-15 17:15:29 +01:00
mafiesto4 4a79df860d Refactor NavMesh into NavMeshRuntime and make it internal 2020-12-15 15:48:42 +01:00
3188 changed files with 79384 additions and 51406 deletions
+40
View File
@@ -0,0 +1,40 @@
name: Build Linux
on: [push, pull_request]
jobs:
# Editor
editor-linux:
name: Editor (Linux, Development x64)
runs-on: "ubuntu-20.04"
steps:
- name: Install dependencies
run: |
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev build-essential gettext curl libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libcurl4-gnutls-dev
- name: Checkout repo
uses: actions/checkout@v2
- name: Checkout LFS
run: |
git lfs version
git lfs pull
- name: Build
run: |
./Development/Scripts/Linux/CallBuildTool.sh -build -log -arch=x64 -platform=Linux -configuration=Development -buildtargets=FlaxEditor
# Game
game-linux:
name: Game (Linux, Release x64)
runs-on: "ubuntu-20.04"
steps:
- name: Install dependencies
run: |
sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev
- name: Checkout repo
uses: actions/checkout@v2
- name: Checkout LFS
run: |
git lfs version
git lfs pull
- name: Build
run: |
./Development/Scripts/Linux/CallBuildTool.sh -build -log -arch=x64 -platform=Linux -configuration=Release -buildtargets=FlaxGame
+34
View File
@@ -0,0 +1,34 @@
name: Build Windows
on: [push, pull_request]
jobs:
# Editor
editor-windows:
name: Editor (Windows, Development x64)
runs-on: "windows-latest"
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Checkout LFS
run: |
git lfs version
git lfs pull
- name: Build
run: |
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -arch=x64 -platform=Windows -configuration=Development -buildtargets=FlaxEditor
# Game
game-windows:
name: Game (Windows, Release x64)
runs-on: "windows-latest"
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Checkout LFS
run: |
git lfs version
git lfs pull
- name: Build
run: |
.\Development\Scripts\Windows\CallBuildTool.bat -build -log -arch=x64 -platform=Windows -configuration=Release -buildtargets=FlaxGame
+3 -40
View File
@@ -7,7 +7,9 @@ Cache/
Binaries/
Logs/
Source/*.csproj
/Package_*/
!Source/Engine/Debug
/Source/Platforms/Editor/Linux/Mono/etc/mono/registry
# User-specific files
*.suo
@@ -22,11 +24,6 @@ Source/*.csproj
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# NuGet Packages Directory
packages/**/*
!packages/repositories.config
@@ -56,9 +53,6 @@ packages/**/*
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
@@ -72,12 +66,6 @@ ipch/
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
@@ -100,9 +88,6 @@ _NCrunch_*
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
@@ -149,32 +134,9 @@ ClientBin/
*.publishsettings
node_modules/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project files
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
# IDE files
*.VC.db
enc_temp_folder/
@@ -185,3 +147,4 @@ obj/
*.vcxproj.filters
.vscode/
*.code-workspace
+1
View File
@@ -1,3 +1,4 @@
# Redirect to our own Git LFS server
[lfs]
url="https://gitlab.flaxengine.com/flax/flaxengine.git/info/lfs"
locksverify = false
+34
View File
@@ -0,0 +1,34 @@
# How to contribute to the FlaxEngine
For any questions, suggestions or help join our discord!
<a href="https://flaxengine.com/discord"><img src="https://discordapp.com/api/guilds/437989205315158016/widget.png"/></a>
Want to see whats planned for Flax?
Go check out our [Trello](https://trello.com/b/NQjLXRCP/flax-roadmap).
## **Found a bug?**
* Avoid opening any new issues without having checked if your problem has already been reported. If there are no currently open issues that fit your problem's description, feel free to [add it](https://github.com/FlaxEngine/FlaxEngine/issues/new).
* When writing an issue make sure to include a clear title and description as well as having filled out all the necessary information, depending on the severity of the issue also include the necessary log files and minidump.
* Try to following the given template when writing a new issue if possible.
## **Want to contribute?**
* Fork the FlaxEngine, create a new branch and push your changes there. Then, create a pull request.
* When creating a PR for fixing an issue/bug make sure to describe as to what led to the fix for better understanding, for small and obvious fixes this is not really needed.
However make sure to mention the relevant issue where it was first reported if possible.
* For feature PR's the first thing you should evaluate is the value of your contribution, as in, what would it bring to this engine? Is it really required?
If its a small change you could preferably suggest it to us on our discord, else feel free to open up a PR for it.
* Ensure when creating a PR that your contribution is well explained with a adequate description and title.
* Generally, good code quality is expected, make sure your contribution works as intended and is appropriately commented where necessary.
Thank you for taking interest in contributing to Flax!
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -108,16 +108,14 @@ float4 GetVertexColor(MaterialInput input)
return 1;
}
@8
// Get material properties function (for pixel shader)
Material GetMaterialPS(MaterialInput input)
{
@4
}
// Programmatically set the line number after all the material inputs which have a variable number of line endings
// This allows shader error line numbers after this point to be the same regardless of which material is being compiled
#line 1000
// Input macro specified by the material: DECAL_BLEND_MODE
#define DECAL_BLEND_MODE_TRANSLUCENT 0
@@ -160,12 +158,9 @@ void PS_Decal(
float3 positionWS = positionHS.xyz / positionHS.w;
float3 positionOS = mul(float4(positionWS, 1), InvWorld).xyz;
// Clip content outside the decal
clip(0.5 - abs(positionOS.xyz));
// By default, map textures using the vectors perpendicular to the projection direction
float2 decalUVs = positionOS.xz + 0.5f;
// Setup material input
MaterialInput materialInput = (MaterialInput)0;
materialInput.WorldPosition = positionWS;
@@ -215,3 +210,5 @@ void PS_Decal(
#error "Invalid decal blending mode"
#endif
}
@9
@@ -0,0 +1,377 @@
// File generated by Flax Materials Editor
// Version: @0
#define MATERIAL 1
@3
#include "./Flax/Common.hlsl"
#include "./Flax/MaterialCommon.hlsl"
#include "./Flax/GBufferCommon.hlsl"
@7
// Primary constant buffer (with additional material parameters)
META_CB_BEGIN(0, Data)
float4x4 ViewProjectionMatrix;
float4x4 WorldMatrix;
float4x4 LocalMatrix;
float4x4 ViewMatrix;
float3 ViewPos;
float ViewFar;
float3 ViewDir;
float TimeParam;
float4 ViewInfo;
float4 ScreenSize;
float3 Dummy0;
float WorldDeterminantSign;
float MeshMinZ;
float Segment;
float ChunksPerSegment;
float PerInstanceRandom;
float4 TemporalAAJitter;
float3 GeometrySize;
float MeshMaxZ;
@1META_CB_END
// Shader resources
@2
// The spline deformation buffer (stored as 4x3, 3 float4 behind each other)
Buffer<float4> SplineDeformation : register(t0);
// Geometry data passed though the graphics rendering stages up to the pixel shader
struct GeometryData
{
float3 WorldPosition : TEXCOORD0;
float2 TexCoord : TEXCOORD1;
#if USE_VERTEX_COLOR
half4 VertexColor : COLOR;
#endif
float3 WorldNormal : TEXCOORD2;
float4 WorldTangent : TEXCOORD3;
};
// Interpolants passed from the vertex shader
struct VertexOutput
{
float4 Position : SV_Position;
GeometryData Geometry;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
#if USE_TESSELLATION
float TessellationMultiplier : TESS;
#endif
};
// Interpolants passed to the pixel shader
struct PixelInput
{
float4 Position : SV_Position;
GeometryData Geometry;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
bool IsFrontFace : SV_IsFrontFace;
};
// Material properties generation input
struct MaterialInput
{
float3 WorldPosition;
float TwoSidedSign;
float2 TexCoord;
#if USE_VERTEX_COLOR
half4 VertexColor;
#endif
float3x3 TBN;
float4 SvPosition;
float3 PreSkinnedPosition;
float3 PreSkinnedNormal;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT];
#endif
};
// Extracts geometry data to the material input
MaterialInput GetGeometryMaterialInput(GeometryData geometry)
{
MaterialInput output = (MaterialInput)0;
output.WorldPosition = geometry.WorldPosition;
output.TexCoord = geometry.TexCoord;
#if USE_VERTEX_COLOR
output.VertexColor = geometry.VertexColor;
#endif
output.TBN = CalcTangentBasis(geometry.WorldNormal, geometry.WorldTangent);
return output;
}
#if USE_TESSELLATION
// Interpolates the geometry positions data only (used by the tessallation when generating vertices)
#define InterpolateGeometryPositions(output, p0, w0, p1, w1, p2, w2, offset) output.WorldPosition = p0.WorldPosition * w0 + p1.WorldPosition * w1 + p2.WorldPosition * w2 + offset
// Offsets the geometry positions data only (used by the tessallation when generating vertices)
#define OffsetGeometryPositions(geometry, offset) geometry.WorldPosition += offset
// Applies the Phong tessallation to the geometry positions (used by the tessallation when doing Phong tess)
#define ApplyGeometryPositionsPhongTess(geometry, p0, p1, p2, U, V, W) \
float3 posProjectedU = TessalationProjectOntoPlane(p0.WorldNormal, p0.WorldPosition, geometry.WorldPosition); \
float3 posProjectedV = TessalationProjectOntoPlane(p1.WorldNormal, p1.WorldPosition, geometry.WorldPosition); \
float3 posProjectedW = TessalationProjectOntoPlane(p2.WorldNormal, p2.WorldPosition, geometry.WorldPosition); \
geometry.WorldPosition = U * posProjectedU + V * posProjectedV + W * posProjectedW
// Interpolates the geometry data except positions (used by the tessallation when generating vertices)
GeometryData InterpolateGeometry(GeometryData p0, float w0, GeometryData p1, float w1, GeometryData p2, float w2)
{
GeometryData output = (GeometryData)0;
output.TexCoord = p0.TexCoord * w0 + p1.TexCoord * w1 + p2.TexCoord * w2;
#if USE_VERTEX_COLOR
output.VertexColor = p0.VertexColor * w0 + p1.VertexColor * w1 + p2.VertexColor * w2;
#endif
output.WorldNormal = p0.WorldNormal * w0 + p1.WorldNormal * w1 + p2.WorldNormal * w2;
output.WorldNormal = normalize(output.WorldNormal);
output.WorldTangent = p0.WorldTangent * w0 + p1.WorldTangent * w1 + p2.WorldTangent * w2;
output.WorldTangent.xyz = normalize(output.WorldTangent.xyz);
return output;
}
#endif
MaterialInput GetMaterialInput(PixelInput input)
{
MaterialInput output = GetGeometryMaterialInput(input.Geometry);
output.TwoSidedSign = WorldDeterminantSign * (input.IsFrontFace ? 1.0 : -1.0);
output.SvPosition = input.Position;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
output.CustomVSToPS = input.CustomVSToPS;
#endif
return output;
}
// Removes the scale vector from the local to world transformation matrix
float3x3 RemoveScaleFromLocalToWorld(float3x3 localToWorld)
{
// Extract per axis scales from localToWorld transform
float scaleX = length(localToWorld[0]);
float scaleY = length(localToWorld[1]);
float scaleZ = length(localToWorld[2]);
float3 invScale = float3(
scaleX > 0.00001f ? 1.0f / scaleX : 0.0f,
scaleY > 0.00001f ? 1.0f / scaleY : 0.0f,
scaleZ > 0.00001f ? 1.0f / scaleZ : 0.0f);
localToWorld[0] *= invScale.x;
localToWorld[1] *= invScale.y;
localToWorld[2] *= invScale.z;
return localToWorld;
}
// Transforms a vector from tangent space to world space
float3 TransformTangentVectorToWorld(MaterialInput input, float3 tangentVector)
{
return mul(tangentVector, input.TBN);
}
// Transforms a vector from world space to tangent space
float3 TransformWorldVectorToTangent(MaterialInput input, float3 worldVector)
{
return mul(input.TBN, worldVector);
}
// Transforms a vector from world space to view space
float3 TransformWorldVectorToView(MaterialInput input, float3 worldVector)
{
return mul(worldVector, (float3x3)ViewMatrix);
}
// Transforms a vector from view space to world space
float3 TransformViewVectorToWorld(MaterialInput input, float3 viewVector)
{
return mul((float3x3)ViewMatrix, viewVector);
}
// Transforms a vector from local space to world space
float3 TransformLocalVectorToWorld(MaterialInput input, float3 localVector)
{
float3x3 localToWorld = (float3x3)WorldMatrix;
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
return mul(localVector, localToWorld);
}
// Transforms a vector from local space to world space
float3 TransformWorldVectorToLocal(MaterialInput input, float3 worldVector)
{
float3x3 localToWorld = (float3x3)WorldMatrix;
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
return mul(localToWorld, worldVector);
}
// Gets the current object position
float3 GetObjectPosition(MaterialInput input)
{
return WorldMatrix[3].xyz;
}
// Gets the current object size
float3 GetObjectSize(MaterialInput input)
{
float4x4 world = WorldMatrix;
return GeometrySize * float3(world._m00, world._m11, world._m22);
}
// Get the current object random value
float GetPerInstanceRandom(MaterialInput input)
{
return PerInstanceRandom;
}
// Get the current object LOD transition dither factor
float GetLODDitherFactor(MaterialInput input)
{
return 0;
}
// Gets the interpolated vertex color (in linear space)
float4 GetVertexColor(MaterialInput input)
{
#if USE_VERTEX_COLOR
return input.VertexColor;
#else
return 1;
#endif
}
float3 SampleLightmap(Material material, MaterialInput materialInput)
{
return 0;
}
@8
// Get material properties function (for vertex shader)
Material GetMaterialVS(MaterialInput input)
{
@5
}
// Get material properties function (for domain shader)
Material GetMaterialDS(MaterialInput input)
{
@6
}
// Get material properties function (for pixel shader)
Material GetMaterialPS(MaterialInput input)
{
@4
}
// Calculates the transform matrix from mesh tangent space to local space
float3x3 CalcTangentToLocal(ModelInput input)
{
float bitangentSign = input.Tangent.w ? -1.0f : +1.0f;
float3 normal = input.Normal.xyz * 2.0 - 1.0;
float3 tangent = input.Tangent.xyz * 2.0 - 1.0;
float3 bitangent = cross(normal, tangent) * bitangentSign;
return float3x3(tangent, bitangent, normal);
}
// Vertex Shader function for GBuffer Pass and Depth Pass (with full vertex data)
META_VS(true, FEATURE_LEVEL_ES2)
META_VS_IN_ELEMENT(POSITION, 0, R32G32B32_FLOAT, 0, 0, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(TEXCOORD, 0, R16G16_FLOAT, 1, 0, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(NORMAL, 0, R10G10B10A2_UNORM, 1, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(TANGENT, 0, R10G10B10A2_UNORM, 1, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(TEXCOORD, 1, R16G16_FLOAT, 1, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(COLOR, 0, R8G8B8A8_UNORM, 2, 0, PER_VERTEX, 0, USE_VERTEX_COLOR)
VertexOutput VS_SplineModel(ModelInput input)
{
VertexOutput output;
// Apply local transformation of the geometry before deformation
float3 position = mul(float4(input.Position, 1), LocalMatrix).xyz;
float4x4 world = LocalMatrix;
// Apply spline curve deformation
float splineAlpha = saturate((position.z - MeshMinZ) / (MeshMaxZ - MeshMinZ));
int splineIndex = (int)((Segment + splineAlpha) * ChunksPerSegment);
position.z = splineAlpha;
float3x4 splineMatrix = float3x4(SplineDeformation[splineIndex * 3], SplineDeformation[splineIndex * 3 + 1], SplineDeformation[splineIndex * 3 + 2]);
position = mul(splineMatrix, float4(position, 1));
float4x3 splineMatrixT = transpose(splineMatrix);
world = mul(world, float4x4(float4(splineMatrixT[0], 0), float4(splineMatrixT[1], 0), float4(splineMatrixT[2], 0), float4(splineMatrixT[3], 1)));
// Compute world space vertex position
output.Geometry.WorldPosition = mul(float4(position, 1), WorldMatrix).xyz;
world = mul(world, WorldMatrix);
// Compute clip space position
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
// Pass vertex attributes
output.Geometry.TexCoord = input.TexCoord;
#if USE_VERTEX_COLOR
output.Geometry.VertexColor = input.Color;
#endif
// Calculate tanget space to world space transformation matrix for unit vectors
float3x3 tangentToLocal = CalcTangentToLocal(input);
float3x3 localToWorld = RemoveScaleFromLocalToWorld((float3x3)world);
float3x3 tangentToWorld = mul(tangentToLocal, localToWorld);
output.Geometry.WorldNormal = tangentToWorld[2];
output.Geometry.WorldTangent.xyz = tangentToWorld[0];
output.Geometry.WorldTangent.w = input.Tangent.w ? -1.0f : +1.0f;
// Get material input params if need to evaluate any material property
#if USE_POSITION_OFFSET || USE_TESSELLATION || USE_CUSTOM_VERTEX_INTERPOLATORS
MaterialInput materialInput = GetGeometryMaterialInput(output.Geometry);
materialInput.TwoSidedSign = WorldDeterminantSign;
materialInput.SvPosition = output.Position;
materialInput.PreSkinnedPosition = input.Position.xyz;
materialInput.PreSkinnedNormal = tangentToLocal[2].xyz;
Material material = GetMaterialVS(materialInput);
#endif
// Apply world position offset per-vertex
#if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif
// Get tessalation multiplier (per vertex)
#if USE_TESSELLATION
output.TessellationMultiplier = material.TessellationMultiplier;
#endif
// Copy interpolants for other shader stages
#if USE_CUSTOM_VERTEX_INTERPOLATORS
output.CustomVSToPS = material.CustomVSToPS;
#endif
return output;
}
#if USE_DITHERED_LOD_TRANSITION
void ClipLODTransition(PixelInput input)
{
}
#endif
// Pixel Shader function for Depth Pass
META_PS(true, FEATURE_LEVEL_ES2)
void PS_Depth(PixelInput input)
{
#if MATERIAL_MASKED || MATERIAL_BLEND != MATERIAL_BLEND_OPAQUE
// Get material parameters
MaterialInput materialInput = GetMaterialInput(input);
Material material = GetMaterialPS(materialInput);
// Perform per pixel clipping
#if MATERIAL_MASKED
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
#if MATERIAL_BLEND != MATERIAL_BLEND_OPAQUE
clip(material.Opacity - MATERIAL_OPACITY_THRESHOLD);
#endif
#endif
}
@9
@@ -0,0 +1,84 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
@0// Deferred Shading: Defines
@1// Deferred Shading: Includes
@2// Deferred Shading: Constants
@3// Deferred Shading: Resources
@4// Deferred Shading: Utilities
@5// Deferred Shading: Shaders
// Pixel Shader function for GBuffer Pass
META_PS(true, FEATURE_LEVEL_ES2)
META_PERMUTATION_1(USE_LIGHTMAP=0)
META_PERMUTATION_1(USE_LIGHTMAP=1)
void PS_GBuffer(
in PixelInput input
,out float4 Light : SV_Target0
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE
// GBuffer
,out float4 RT0 : SV_Target1
,out float4 RT1 : SV_Target2
,out float4 RT2 : SV_Target3
#if USE_GBUFFER_CUSTOM_DATA
,out float4 RT3 : SV_Target4
#endif
#endif
)
{
Light = 0;
#if USE_DITHERED_LOD_TRANSITION
// LOD masking
ClipLODTransition(input);
#endif
// Get material parameters
MaterialInput materialInput = GetMaterialInput(input);
Material material = GetMaterialPS(materialInput);
// Masking
#if MATERIAL_MASKED
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
#if USE_LIGHTMAP
float3 diffuseColor = GetDiffuseColor(material.Color, material.Metalness);
float3 specularColor = GetSpecularColor(material.Color, material.Specular, material.Metalness);
// Sample lightmap
float3 diffuseIndirectLighting = SampleLightmap(material, materialInput);
// Apply static indirect light
Light.rgb = diffuseColor * diffuseIndirectLighting * AOMultiBounce(material.AO, diffuseColor);
#endif
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE
// Pack material properties to GBuffer
RT0 = float4(material.Color, material.AO);
RT1 = float4(material.WorldNormal * 0.5 + 0.5, MATERIAL_SHADING_MODEL * (1.0 / 3.0));
RT2 = float4(material.Roughness, material.Metalness, material.Specular, 0);
// Custom data
#if USE_GBUFFER_CUSTOM_DATA
#if MATERIAL_SHADING_MODEL == SHADING_MODEL_SUBSURFACE
RT3 = float4(material.SubsurfaceColor, material.Opacity);
#elif MATERIAL_SHADING_MODEL == SHADING_MODEL_FOLIAGE
RT3 = float4(material.SubsurfaceColor, material.Opacity);
#else
RT3 = float4(0, 0, 0, 0);
#endif
#endif
// Add light emission
#if USE_EMISSIVE
Light.rgb += material.Emissive;
#endif
#else
// Handle blending as faked forward pass (use Light buffer and skip GBuffer modification)
Light = float4(material.Emissive, material.Opacity);
#endif
}
@@ -0,0 +1,50 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
@0// Distortion: Defines
@1// Distortion: Includes
@2// Distortion: Constants
@3// Distortion: Resources
@4// Distortion: Utilities
@5// Distortion: Shaders
#if USE_DISTORTION
// Pixel Shader function for Distortion Pass
META_PS(USE_DISTORTION, FEATURE_LEVEL_ES2)
float4 PS_Distortion(PixelInput input) : SV_Target0
{
#if USE_DITHERED_LOD_TRANSITION
// LOD masking
ClipLODTransition(input);
#endif
// Get material parameters
MaterialInput materialInput = GetMaterialInput(input);
Material material = GetMaterialPS(materialInput);
// Masking
#if MATERIAL_MASKED
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
float3 viewNormal = normalize(TransformWorldVectorToView(materialInput, material.WorldNormal));
float airIOR = 1.0f;
#if USE_PIXEL_NORMAL_OFFSET_REFRACTION
float3 viewVertexNormal = TransformWorldVectorToView(materialInput, TransformTangentVectorToWorld(materialInput, float3(0, 0, 1)));
float2 distortion = (viewVertexNormal.xy - viewNormal.xy) * (material.Refraction - airIOR);
#else
float2 distortion = viewNormal.xy * (material.Refraction - airIOR);
#endif
// Clip if the distortion distance (squared) is too small to be noticed
clip(dot(distortion, distortion) - 0.00001);
// Scale up for better precision in low/subtle refractions at the expense of artefacts at higher refraction
distortion *= 4.0f;
// Use separate storage for positive and negative offsets
float2 addOffset = max(distortion, 0);
float2 subOffset = abs(min(distortion, 0));
return float4(addOffset.x, addOffset.y, subOffset.x, subOffset.y);
}
#endif
@@ -0,0 +1,124 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
@0// Forward Shading: Defines
#define MAX_LOCAL_LIGHTS 4
@1// Forward Shading: Includes
#include "./Flax/LightingCommon.hlsl"
#if USE_REFLECTIONS
#include "./Flax/ReflectionsCommon.hlsl"
#endif
#include "./Flax/Lighting.hlsl"
#include "./Flax/ShadowsSampling.hlsl"
#include "./Flax/ExponentialHeightFog.hlsl"
@2// Forward Shading: Constants
LightData DirectionalLight;
LightShadowData DirectionalLightShadow;
LightData SkyLight;
ProbeData EnvironmentProbe;
ExponentialHeightFogData ExponentialHeightFog;
float3 Dummy2;
uint LocalLightsCount;
LightData LocalLights[MAX_LOCAL_LIGHTS];
@3// Forward Shading: Resources
TextureCube EnvProbe : register(t__SRV__);
TextureCube SkyLightTexture : register(t__SRV__);
Texture2DArray DirectionalLightShadowMap : register(t__SRV__);
@4// Forward Shading: Utilities
DECLARE_LIGHTSHADOWDATA_ACCESS(DirectionalLightShadow);
@5// Forward Shading: Shaders
// Pixel Shader function for Forward Pass
META_PS(USE_FORWARD, FEATURE_LEVEL_ES2)
float4 PS_Forward(PixelInput input) : SV_Target0
{
float4 output = 0;
#if USE_DITHERED_LOD_TRANSITION
// LOD masking
ClipLODTransition(input);
#endif
// Get material parameters
MaterialInput materialInput = GetMaterialInput(input);
Material material = GetMaterialPS(materialInput);
// Masking
#if MATERIAL_MASKED
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
// Add emissive light
output = float4(material.Emissive, material.Opacity);
#if MATERIAL_SHADING_MODEL != SHADING_MODEL_UNLIT
// Setup GBuffer data as proxy for lighting
GBufferSample gBuffer;
gBuffer.Normal = material.WorldNormal;
gBuffer.Roughness = material.Roughness;
gBuffer.Metalness = material.Metalness;
gBuffer.Color = material.Color;
gBuffer.Specular = material.Specular;
gBuffer.AO = material.AO;
gBuffer.ViewPos = mul(float4(materialInput.WorldPosition, 1), ViewMatrix).xyz;
#if MATERIAL_SHADING_MODEL == SHADING_MODEL_SUBSURFACE
gBuffer.CustomData = float4(material.SubsurfaceColor, material.Opacity);
#elif MATERIAL_SHADING_MODEL == SHADING_MODEL_FOLIAGE
gBuffer.CustomData = float4(material.SubsurfaceColor, material.Opacity);
#else
gBuffer.CustomData = float4(0, 0, 0, 0);
#endif
gBuffer.WorldPos = materialInput.WorldPosition;
gBuffer.ShadingModel = MATERIAL_SHADING_MODEL;
// Calculate lighting from a single directional light
float4 shadowMask = 1.0f;
if (DirectionalLight.CastShadows > 0)
{
LightShadowData directionalLightShadowData = GetDirectionalLightShadowData();
shadowMask.r = SampleShadow(DirectionalLight, directionalLightShadowData, DirectionalLightShadowMap, gBuffer, shadowMask.g);
}
float4 light = GetLighting(ViewPos, DirectionalLight, gBuffer, shadowMask, false, false);
// Calculate lighting from sky light
light += GetSkyLightLighting(SkyLight, gBuffer, SkyLightTexture);
// Calculate lighting from local lights
LOOP
for (uint localLightIndex = 0; localLightIndex < LocalLightsCount; localLightIndex++)
{
const LightData localLight = LocalLights[localLightIndex];
bool isSpotLight = localLight.SpotAngles.x > -2.0f;
shadowMask = 1.0f;
light += GetLighting(ViewPos, localLight, gBuffer, shadowMask, true, isSpotLight);
}
#if USE_REFLECTIONS
// Calculate reflections
light.rgb += GetEnvProbeLighting(ViewPos, EnvProbe, EnvironmentProbe, gBuffer) * light.a;
#endif
// Add lighting (apply ambient occlusion)
output.rgb += light.rgb * gBuffer.AO;
#if USE_FOG
// Calculate exponential height fog
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0);
// Apply fog to the output color
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE
output = float4(output.rgb * fog.a + fog.rgb, output.a);
#elif MATERIAL_BLEND == MATERIAL_BLEND_TRANSPARENT
output = float4(output.rgb * fog.a + fog.rgb, output.a);
#elif MATERIAL_BLEND == MATERIAL_BLEND_ADDITIVE
output = float4(output.rgb * fog.a + fog.rgb, output.a * fog.a);
#elif MATERIAL_BLEND == MATERIAL_BLEND_MULTIPLY
output = float4(lerp(float3(1, 1, 1), output.rgb, fog.aaa * fog.aaa), output.a);
#endif
#endif
#endif
return output;
}
@@ -0,0 +1,54 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
@0// Lightmap: Defines
#define CAN_USE_LIGHTMAP 1
@1// Lightmap: Includes
@2// Lightmap: Constants
float4 LightmapArea;
@3// Lightmap: Resources
#if USE_LIGHTMAP
// Irradiance and directionality prebaked lightmaps
Texture2D Lightmap0 : register(t__SRV__);
Texture2D Lightmap1 : register(t__SRV__);
Texture2D Lightmap2 : register(t__SRV__);
#endif
@4// Lightmap: Utilities
#if USE_LIGHTMAP
// Evaluates the H-Basis coefficients in the tangent space normal direction
float3 GetHBasisIrradiance(float3 n, float3 h0, float3 h1, float3 h2, float3 h3)
{
// Band 0
float3 color = h0 * (1.0f / sqrt(2.0f * PI));
// Band 1
color += h1 * -sqrt(1.5f / PI) * n.y;
color += h2 * sqrt(1.5f / PI) * (2 * n.z - 1.0f);
color += h3 * -sqrt(1.5f / PI) * n.x;
return color;
}
float3 SampleLightmap(Material material, MaterialInput materialInput)
{
// Sample lightmaps
float4 lightmap0 = Lightmap0.Sample(SamplerLinearClamp, materialInput.LightmapUV);
float4 lightmap1 = Lightmap1.Sample(SamplerLinearClamp, materialInput.LightmapUV);
float4 lightmap2 = Lightmap2.Sample(SamplerLinearClamp, materialInput.LightmapUV);
// Unpack H-basis
float3 h0 = float3(lightmap0.x, lightmap1.x, lightmap2.x);
float3 h1 = float3(lightmap0.y, lightmap1.y, lightmap2.y);
float3 h2 = float3(lightmap0.z, lightmap1.z, lightmap2.z);
float3 h3 = float3(lightmap0.w, lightmap1.w, lightmap2.w);
// Sample baked diffuse irradiance from the H-basis coefficients
float3 normal = material.TangentNormal;
#if MATERIAL_SHADING_MODEL == SHADING_MODEL_FOLIAGE
normal *= material.TangentNormal;
#endif
return GetHBasisIrradiance(normal, h0, h1, h2, h3) / PI;
}
#endif
@5// Lightmap: Shaders
@@ -0,0 +1,44 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
@0// Motion Vectors: Defines
@1// Motion Vectors: Includes
@2// Motion Vectors: Constants
@3// Motion Vectors: Resources
@4// Motion Vectors: Utilities
@5// Motion Vectors: Shaders
// Pixel Shader function for Motion Vectors Pass
META_PS(true, FEATURE_LEVEL_ES2)
float4 PS_MotionVectors(PixelInput input) : SV_Target0
{
#if USE_DITHERED_LOD_TRANSITION
// LOD masking
ClipLODTransition(input);
#endif
#if MATERIAL_MASKED
// Perform per pixel clipping if material requries it
MaterialInput materialInput = GetMaterialInput(input);
Material material = GetMaterialPS(materialInput);
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
// Calculate this and previosu frame pixel locations in clip space
float4 prevClipPos = mul(float4(input.Geometry.PrevWorldPosition, 1), PrevViewProjectionMatrix);
float4 curClipPos = mul(float4(input.Geometry.WorldPosition, 1), ViewProjectionMatrix);
float2 prevHPos = prevClipPos.xy / prevClipPos.w;
float2 curHPos = curClipPos.xy / curClipPos.w;
// Revert temporal jitter offset
prevHPos -= TemporalAAJitter.zw;
curHPos -= TemporalAAJitter.xy;
// Clip Space -> UV Space
float2 vPosPrev = prevHPos.xy * 0.5f + 0.5f;
float2 vPosCur = curHPos.xy * 0.5f + 0.5f;
vPosPrev.y = 1.0 - vPosPrev.y;
vPosCur.y = 1.0 - vPosCur.y;
// Calculate per-pixel motion vector
return float4(vPosCur - vPosPrev, 0, 1);
}
@@ -0,0 +1,184 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
@0// Tessellation: Defines
#define TessalationProjectOntoPlane(planeNormal, planePosition, pointToProject) pointToProject - dot(pointToProject - planePosition, planeNormal) * planeNormal
@1// Tessellation: Includes
@2// Tessellation: Constants
@3// Tessellation: Resources
@4// Tessellation: Utilities
@5// Tessellation: Shaders
#if USE_TESSELLATION
// Interpolants passed from the hull shader to the domain shader
struct TessalationHSToDS
{
float4 Position : SV_Position;
GeometryData Geometry;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
float TessellationMultiplier : TESS;
};
// Interpolants passed from the domain shader and to the pixel shader
struct TessalationDSToPS
{
float4 Position : SV_Position;
GeometryData Geometry;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
};
MaterialInput GetMaterialInput(TessalationDSToPS input)
{
MaterialInput output = GetGeometryMaterialInput(input.Geometry);
output.SvPosition = input.Position;
output.TwoSidedSign = WorldDeterminantSign;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
output.CustomVSToPS = input.CustomVSToPS;
#endif
return output;
}
struct TessalationPatch
{
float EdgeTessFactor[3] : SV_TessFactor;
float InsideTessFactor : SV_InsideTessFactor;
#if MATERIAL_TESSELLATION == MATERIAL_TESSELLATION_PN
float3 B210 : POSITION4;
float3 B120 : POSITION5;
float3 B021 : POSITION6;
float3 B012 : POSITION7;
float3 B102 : POSITION8;
float3 B201 : POSITION9;
float3 B111 : CENTER;
#endif
};
TessalationPatch HS_PatchConstant(InputPatch<VertexOutput, 3> input)
{
TessalationPatch output;
// Average tess factors along edges, and pick an edge tess factor for the interior tessellation
float4 tessellationMultipliers;
tessellationMultipliers.x = 0.5f * (input[1].TessellationMultiplier + input[2].TessellationMultiplier);
tessellationMultipliers.y = 0.5f * (input[2].TessellationMultiplier + input[0].TessellationMultiplier);
tessellationMultipliers.z = 0.5f * (input[0].TessellationMultiplier + input[1].TessellationMultiplier);
tessellationMultipliers.w = 0.333f * (input[0].TessellationMultiplier + input[1].TessellationMultiplier + input[2].TessellationMultiplier);
tessellationMultipliers = clamp(tessellationMultipliers, 1, MAX_TESSELLATION_FACTOR);
output.EdgeTessFactor[0] = tessellationMultipliers.x; // 1->2 edge
output.EdgeTessFactor[1] = tessellationMultipliers.y; // 2->0 edge
output.EdgeTessFactor[2] = tessellationMultipliers.z; // 0->1 edge
output.InsideTessFactor = tessellationMultipliers.w;
#if MATERIAL_TESSELLATION == MATERIAL_TESSELLATION_PN
// Calculate PN Triangle control points
// Reference: [Vlachos 2001]
float3 p1 = input[0].Geometry.WorldPosition;
float3 p2 = input[1].Geometry.WorldPosition;
float3 p3 = input[2].Geometry.WorldPosition;
float3 n1 = input[0].Geometry.WorldNormal;
float3 n2 = input[1].Geometry.WorldNormal;
float3 n3 = input[2].Geometry.WorldNormal;
output.B210 = (2.0f * p1 + p2 - dot((p2 - p1), n1) * n1) / 3.0f;
output.B120 = (2.0f * p2 + p1 - dot((p1 - p2), n2) * n2) / 3.0f;
output.B021 = (2.0f * p2 + p3 - dot((p3 - p2), n2) * n2) / 3.0f;
output.B012 = (2.0f * p3 + p2 - dot((p2 - p3), n3) * n3) / 3.0f;
output.B102 = (2.0f * p3 + p1 - dot((p1 - p3), n3) * n3) / 3.0f;
output.B201 = (2.0f * p1 + p3 - dot((p3 - p1), n1) * n1) / 3.0f;
float3 e = (output.B210 + output.B120 + output.B021 + output.B012 + output.B102 + output.B201) / 6.0f;
float3 v = (p1 + p2 + p3) / 3.0f;
output.B111 = e + ((e - v) / 2.0f);
#endif
return output;
}
META_HS(USE_TESSELLATION, FEATURE_LEVEL_SM5)
META_HS_PATCH(TESSELLATION_IN_CONTROL_POINTS)
[domain("tri")]
[partitioning("fractional_odd")]
[outputtopology("triangle_cw")]
[maxtessfactor(MAX_TESSELLATION_FACTOR)]
[outputcontrolpoints(3)]
[patchconstantfunc("HS_PatchConstant")]
TessalationHSToDS HS(InputPatch<VertexOutput, TESSELLATION_IN_CONTROL_POINTS> input, uint ControlPointID : SV_OutputControlPointID)
{
TessalationHSToDS output;
// Pass through shader
#define COPY(thing) output.thing = input[ControlPointID].thing;
COPY(Position);
COPY(Geometry);
COPY(TessellationMultiplier);
#if USE_CUSTOM_VERTEX_INTERPOLATORS
COPY(CustomVSToPS);
#endif
#undef COPY
return output;
}
META_DS(USE_TESSELLATION, FEATURE_LEVEL_SM5)
[domain("tri")]
TessalationDSToPS DS(TessalationPatch constantData, float3 barycentricCoords : SV_DomainLocation, const OutputPatch<TessalationHSToDS, 3> input)
{
TessalationDSToPS output;
// Get the barycentric coords
float U = barycentricCoords.x;
float V = barycentricCoords.y;
float W = barycentricCoords.z;
// Interpolate patch attributes to generated vertices
output.Geometry = InterpolateGeometry(input[0].Geometry, U, input[1].Geometry, V, input[2].Geometry, W);
#define INTERPOLATE(thing) output.thing = U * input[0].thing + V * input[1].thing + W * input[2].thing
INTERPOLATE(Position);
#if MATERIAL_TESSELLATION == MATERIAL_TESSELLATION_PN
// Interpolate using barycentric coordinates and PN Triangle control points
float UU = U * U;
float VV = V * V;
float WW = W * W;
float UU3 = UU * 3.0f;
float VV3 = VV * 3.0f;
float WW3 = WW * 3.0f;
float3 offset =
constantData.B210 * UU3 * V +
constantData.B120 * VV3 * U +
constantData.B021 * VV3 * W +
constantData.B012 * WW3 * V +
constantData.B102 * WW3 * U +
constantData.B201 * UU3 * W +
constantData.B111 * 6.0f * W * U * V;
InterpolateGeometryPositions(output.Geometry, input[0].Geometry, UU * U, input[1].Geometry, VV * V, input[2].Geometry, WW * W, offset);
#else
InterpolateGeometryPositions(output.Geometry, input[0].Geometry, U, input[1].Geometry, V, input[2].Geometry, W, float3(0, 0, 0));
#endif
#if USE_CUSTOM_VERTEX_INTERPOLATORS
UNROLL
for (int i = 0; i < CUSTOM_VERTEX_INTERPOLATORS_COUNT; i++)
INTERPOLATE(CustomVSToPS[i]);
#endif
#undef INTERPOLATE
#if MATERIAL_TESSELLATION == MATERIAL_TESSELLATION_PHONG
// Orthogonal projection in the tangent planes with interpolation
ApplyGeometryPositionsPhongTess(output.Geometry, input[0].Geometry, input[1].Geometry, input[2].Geometry, U, V, W);
#endif
// Perform displacement mapping
#if USE_DISPLACEMENT
MaterialInput materialInput = GetMaterialInput(output);
Material material = GetMaterialDS(materialInput);
OffsetGeometryPositions(output.Geometry, material.WorldDisplacement);
#endif
// Recalculate the clip space position
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
return output;
}
#endif
+5 -6
View File
@@ -3,7 +3,6 @@
#define MATERIAL 1
@3
#include "./Flax/Common.hlsl"
#include "./Flax/MaterialCommon.hlsl"
#include "./Flax/GBufferCommon.hlsl"
@@ -22,7 +21,7 @@ float4 ViewInfo;
float4 ScreenSize;
@1META_CB_END
// Material shader resources
// Shader resources
@2
// Interpolants passed from the vertex shader
struct VertexOutput
@@ -185,6 +184,8 @@ float4 GetVertexColor(MaterialInput input)
#endif
}
@8
// Get material properties function (for vertex shader)
Material GetMaterialVS(MaterialInput input)
{
@@ -197,10 +198,6 @@ Material GetMaterialPS(MaterialInput input)
@4
}
// Programmatically set the line number after all the material inputs which have a variable number of line endings
// This allows shader error line numbers after this point to be the same regardless of which material is being compiled
#line 1000
// Vertex Shader function for GUI materials rendering
META_VS(true, FEATURE_LEVEL_ES2)
META_VS_IN_ELEMENT(POSITION, 0, R32G32_FLOAT, 0, ALIGN, PER_VERTEX, 0, true)
@@ -258,3 +255,5 @@ float4 PS_GUI(PixelInput input) : SV_Target0
return float4(material.Emissive, material.Opacity);
}
@9
+12 -183
View File
@@ -2,19 +2,13 @@
// Version: @0
#define MATERIAL 1
#define MAX_LOCAL_LIGHTS 4
@3
// Ribbons don't use sorted indices so overlap the segment distances buffer on the slot
#define HAS_SORTED_INDICES (!defined(_VS_Ribbon))
#include "./Flax/Common.hlsl"
#include "./Flax/MaterialCommon.hlsl"
#include "./Flax/GBufferCommon.hlsl"
#include "./Flax/LightingCommon.hlsl"
#if USE_REFLECTIONS
#include "./Flax/ReflectionsCommon.hlsl"
#endif
#include "./Flax/Lighting.hlsl"
#include "./Flax/ShadowsSampling.hlsl"
#include "./Flax/ExponentialHeightFog.hlsl"
#include "./Flax/Matrix.hlsl"
@7
struct SpriteInput
@@ -55,44 +49,19 @@ uint RibbonSegmentCount;
float4x4 WorldMatrixInverseTransposed;
@1META_CB_END
// Secondary constantant buffer (for lighting)
META_CB_BEGIN(1, LightingData)
LightData DirectionalLight;
LightShadowData DirectionalLightShadow;
LightData SkyLight;
ProbeData EnvironmentProbe;
ExponentialHeightFogData ExponentialHeightFog;
float3 Dummy1;
uint LocalLightsCount;
LightData LocalLights[MAX_LOCAL_LIGHTS];
META_CB_END
DECLARE_LIGHTSHADOWDATA_ACCESS(DirectionalLightShadow);
// Particles attributes buffer
ByteAddressBuffer ParticlesData : register(t0);
// Ribbons don't use sorted indices so overlap the segment distances buffer on the slot
#define HAS_SORTED_INDICES (!defined(_VS_Ribbon))
#if HAS_SORTED_INDICES
// Sorted particles indices
Buffer<uint> SortedIndices : register(t1);
#else
// Ribbon particles segments distances buffer
Buffer<float> SegmentDistances : register(t1);
#endif
// Shader resources
TextureCube EnvProbe : register(t2);
TextureCube SkyLightTexture : register(t3);
Texture2DArray DirectionalLightShadowMap : register(t4);
@2
// Interpolants passed from the vertex shader
struct VertexOutput
{
@@ -172,14 +141,11 @@ MaterialInput GetMaterialInput(PixelInput input)
}
// Gets the local to world transform matrix (supports instancing)
float4x4 GetInstanceTransform(ModelInput input)
{
return WorldMatrix;
}
float4x4 GetInstanceTransform(MaterialInput input)
{
return WorldMatrix;
}
#if USE_INSTANCING
#define GetInstanceTransform(input) float4x4(float4(input.InstanceTransform1.xyz, 0.0f), float4(input.InstanceTransform2.xyz, 0.0f), float4(input.InstanceTransform3.xyz, 0.0f), float4(input.InstanceOrigin.xyz, 1.0f))
#else
#define GetInstanceTransform(input) WorldMatrix;
#endif
// Removes the scale vector from the local to world transformation matrix (supports instancing)
float3x3 RemoveScaleFromLocalToWorld(float3x3 localToWorld)
@@ -312,6 +278,8 @@ float3 TransformParticleVector(float3 input)
return mul(float4(input, 0.0f), WorldMatrixInverseTransposed).xyz;
}
@8
// Get material properties function (for vertex shader)
Material GetMaterialVS(MaterialInput input)
{
@@ -330,10 +298,6 @@ Material GetMaterialPS(MaterialInput input)
@4
}
// Programmatically set the line number after all the material inputs which have a variable number of line endings
// This allows shader error line numbers after this point to be the same regardless of which material is being compiled
#line 1000
// Calculates the transform matrix from mesh tangent space to local space
half3x3 CalcTangentToLocal(ModelInput input)
{
@@ -713,142 +677,9 @@ VertexOutput VS_Ribbon(uint vertexIndex : SV_VertexID)
return output;
}
// Pixel Shader function for Forward Pass
META_PS(USE_FORWARD, FEATURE_LEVEL_ES2)
float4 PS_Forward(PixelInput input) : SV_Target0
{
float4 output = 0;
// Get material parameters
MaterialInput materialInput = GetMaterialInput(input);
Material material = GetMaterialPS(materialInput);
// Masking
#if MATERIAL_MASKED
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
// Add emissive light
output = float4(material.Emissive, material.Opacity);
#if MATERIAL_SHADING_MODEL != SHADING_MODEL_UNLIT
// Setup GBuffer data as proxy for lighting
GBufferSample gBuffer;
gBuffer.Normal = material.WorldNormal;
gBuffer.Roughness = material.Roughness;
gBuffer.Metalness = material.Metalness;
gBuffer.Color = material.Color;
gBuffer.Specular = material.Specular;
gBuffer.AO = material.AO;
gBuffer.ViewPos = mul(float4(materialInput.WorldPosition, 1), ViewMatrix).xyz;
#if MATERIAL_SHADING_MODEL == SHADING_MODEL_SUBSURFACE
gBuffer.CustomData = float4(material.SubsurfaceColor, material.Opacity);
#elif MATERIAL_SHADING_MODEL == SHADING_MODEL_FOLIAGE
gBuffer.CustomData = float4(material.SubsurfaceColor, material.Opacity);
#else
gBuffer.CustomData = float4(0, 0, 0, 0);
#endif
gBuffer.WorldPos = materialInput.WorldPosition;
gBuffer.ShadingModel = MATERIAL_SHADING_MODEL;
// Calculate lighting from a single directional light
float4 shadowMask = 1.0f;
if (DirectionalLight.CastShadows > 0)
{
LightShadowData directionalLightShadowData = GetDirectionalLightShadowData();
shadowMask.r = SampleShadow(DirectionalLight, directionalLightShadowData, DirectionalLightShadowMap, gBuffer, shadowMask.g);
}
float4 light = GetLighting(ViewPos, DirectionalLight, gBuffer, shadowMask, false, false);
// Calculate lighting from sky light
light += GetSkyLightLighting(SkyLight, gBuffer, SkyLightTexture);
// Calculate lighting from local lights
LOOP
for (uint localLightIndex = 0; localLightIndex < LocalLightsCount; localLightIndex++)
{
const LightData localLight = LocalLights[localLightIndex];
bool isSpotLight = localLight.SpotAngles.x > -2.0f;
shadowMask = 1.0f;
light += GetLighting(ViewPos, localLight, gBuffer, shadowMask, true, isSpotLight);
}
#if USE_REFLECTIONS
// Calculate reflections
light.rgb += GetEnvProbeLighting(ViewPos, EnvProbe, EnvironmentProbe, gBuffer) * light.a;
#endif
// Add lighting (apply ambient occlusion)
output.rgb += light.rgb * gBuffer.AO;
#if USE_FOG
// Calculate exponential height fog
float4 fog = GetExponentialHeightFog(ExponentialHeightFog, materialInput.WorldPosition, ViewPos, 0);
// Apply fog to the output color
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE
output = float4(output.rgb * fog.a + fog.rgb, output.a);
#elif MATERIAL_BLEND == MATERIAL_BLEND_TRANSPARENT
output = float4(output.rgb * fog.a + fog.rgb, output.a);
#elif MATERIAL_BLEND == MATERIAL_BLEND_ADDITIVE
output = float4(output.rgb * fog.a + fog.rgb, output.a * fog.a);
#elif MATERIAL_BLEND == MATERIAL_BLEND_MULTIPLY
output = float4(lerp(float3(1, 1, 1), output.rgb, fog.aaa * fog.aaa), output.a);
#endif
#endif
#endif
return output;
}
#if USE_DISTORTION
// Pixel Shader function for Distortion Pass
META_PS(USE_DISTORTION, FEATURE_LEVEL_ES2)
float4 PS_Distortion(PixelInput input) : SV_Target0
{
// Get material parameters
MaterialInput materialInput = GetMaterialInput(input);
Material material = GetMaterialPS(materialInput);
// Masking
#if MATERIAL_MASKED
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
float3 viewNormal = normalize(TransformWorldVectorToView(materialInput, material.WorldNormal));
float airIOR = 1.0f;
#if USE_PIXEL_NORMAL_OFFSET_REFRACTION
float3 viewVertexNormal = TransformWorldVectorToView(materialInput, TransformTangentVectorToWorld(materialInput, float3(0, 0, 1)));
float2 distortion = (viewVertexNormal.xy - viewNormal.xy) * (material.Refraction - airIOR);
#else
float2 distortion = viewNormal.xy * (material.Refraction - airIOR);
#endif
// Clip if the distortion distance (squared) is too small to be noticed
clip(dot(distortion, distortion) - 0.00001);
// Scale up for better precision in low/subtle refractions at the expense of artefacts at higher refraction
distortion *= 4.0f;
// Store positive and negative offsets separately
float2 addOffset = max(distortion, 0);
float2 subOffset = abs(min(distortion, 0));
return float4(addOffset.x, addOffset.y, subOffset.x, subOffset.y);
}
#endif
// Pixel Shader function for Depth Pass
META_PS(true, FEATURE_LEVEL_ES2)
void PS_Depth(PixelInput input
#if GLSL
, out float4 OutColor : SV_Target0
#endif
)
void PS_Depth(PixelInput input)
{
// Get material parameters
MaterialInput materialInput = GetMaterialInput(input);
@@ -861,8 +692,6 @@ void PS_Depth(PixelInput input
#if MATERIAL_BLEND == MATERIAL_BLEND_TRANSPARENT
clip(material.Opacity - MATERIAL_OPACITY_THRESHOLD);
#endif
#if GLSL
OutColor = 0;
#endif
}
@9
@@ -20,7 +20,7 @@ float4 ScreenSize;
float4 TemporalAAJitter;
@1META_CB_END
// Material shader resources
// Shader resources
@2
// Interpolants passed to the pixel shader
struct PixelInput
@@ -128,16 +128,14 @@ float4 GetVertexColor(MaterialInput input)
return 1;
}
@8
// Get material properties function (for pixel shader)
Material GetMaterialPS(MaterialInput input)
{
@4
}
// Programmatically set the line number after all the material inputs which have a variable number of line endings
// This allows shader error line numbers after this point to be the same regardless of which material is being compiled
#line 1000
// Pixel Shader function for PostFx materials rendering
META_PS(true, FEATURE_LEVEL_ES2)
float4 PS_PostFx(PixelInput input) : SV_Target0
@@ -148,3 +146,5 @@ float4 PS_PostFx(PixelInput input) : SV_Target0
return float4(material.Emissive, material.Opacity);
}
@9
@@ -0,0 +1,618 @@
// File generated by Flax Materials Editor
// Version: @0
#define MATERIAL 1
@3
#include "./Flax/Common.hlsl"
#include "./Flax/MaterialCommon.hlsl"
#include "./Flax/GBufferCommon.hlsl"
@7
// Primary constant buffer (with additional material parameters)
META_CB_BEGIN(0, Data)
float4x4 ViewProjectionMatrix;
float4x4 WorldMatrix;
float4x4 ViewMatrix;
float4x4 PrevViewProjectionMatrix;
float4x4 PrevWorldMatrix;
float3 ViewPos;
float ViewFar;
float3 ViewDir;
float TimeParam;
float4 ViewInfo;
float4 ScreenSize;
float3 WorldInvScale;
float WorldDeterminantSign;
float2 Dummy0;
float LODDitherFactor;
float PerInstanceRandom;
float4 TemporalAAJitter;
float3 GeometrySize;
float Dummy1;
@1META_CB_END
// Shader resources
@2
// Geometry data passed though the graphics rendering stages up to the pixel shader
struct GeometryData
{
float3 WorldPosition : TEXCOORD0;
float2 TexCoord : TEXCOORD1;
float2 LightmapUV : TEXCOORD2;
#if USE_VERTEX_COLOR
half4 VertexColor : COLOR;
#endif
float3 WorldNormal : TEXCOORD3;
float4 WorldTangent : TEXCOORD4;
float3 InstanceOrigin : TEXCOORD5;
float2 InstanceParams : TEXCOORD6; // x-PerInstanceRandom, y-LODDitherFactor
float3 PrevWorldPosition : TEXCOORD7;
};
// Interpolants passed from the vertex shader
struct VertexOutput
{
float4 Position : SV_Position;
GeometryData Geometry;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
#if USE_TESSELLATION
float TessellationMultiplier : TESS;
#endif
};
// Interpolants passed to the pixel shader
struct PixelInput
{
float4 Position : SV_Position;
GeometryData Geometry;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
bool IsFrontFace : SV_IsFrontFace;
};
// Material properties generation input
struct MaterialInput
{
float3 WorldPosition;
float TwoSidedSign;
float2 TexCoord;
#if USE_LIGHTMAP
float2 LightmapUV;
#endif
#if USE_VERTEX_COLOR
half4 VertexColor;
#endif
float3x3 TBN;
float4 SvPosition;
float3 PreSkinnedPosition;
float3 PreSkinnedNormal;
float3 InstanceOrigin;
float2 InstanceParams;
#if USE_INSTANCING
float3 InstanceTransform1;
float3 InstanceTransform2;
float3 InstanceTransform3;
#endif
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT];
#endif
};
// Extracts geometry data to the material input
MaterialInput GetGeometryMaterialInput(GeometryData geometry)
{
MaterialInput output = (MaterialInput)0;
output.WorldPosition = geometry.WorldPosition;
output.TexCoord = geometry.TexCoord;
#if USE_LIGHTMAP
output.LightmapUV = geometry.LightmapUV;
#endif
#if USE_VERTEX_COLOR
output.VertexColor = geometry.VertexColor;
#endif
output.TBN = CalcTangentBasis(geometry.WorldNormal, geometry.WorldTangent);
output.InstanceOrigin = geometry.InstanceOrigin;
output.InstanceParams = geometry.InstanceParams;
return output;
}
#if USE_TESSELLATION
// Interpolates the geometry positions data only (used by the tessallation when generating vertices)
#define InterpolateGeometryPositions(output, p0, w0, p1, w1, p2, w2, offset) output.WorldPosition = p0.WorldPosition * w0 + p1.WorldPosition * w1 + p2.WorldPosition * w2 + offset; output.PrevWorldPosition = p0.PrevWorldPosition * w0 + p1.PrevWorldPosition * w1 + p2.PrevWorldPosition * w2 + offset
// Offsets the geometry positions data only (used by the tessallation when generating vertices)
#define OffsetGeometryPositions(geometry, offset) geometry.WorldPosition += offset; geometry.PrevWorldPosition += offset
// Applies the Phong tessallation to the geometry positions (used by the tessallation when doing Phong tess)
#define ApplyGeometryPositionsPhongTess(geometry, p0, p1, p2, U, V, W) \
float3 posProjectedU = TessalationProjectOntoPlane(p0.WorldNormal, p0.WorldPosition, geometry.WorldPosition); \
float3 posProjectedV = TessalationProjectOntoPlane(p1.WorldNormal, p1.WorldPosition, geometry.WorldPosition); \
float3 posProjectedW = TessalationProjectOntoPlane(p2.WorldNormal, p2.WorldPosition, geometry.WorldPosition); \
geometry.WorldPosition = U * posProjectedU + V * posProjectedV + W * posProjectedW; \
posProjectedU = TessalationProjectOntoPlane(p0.WorldNormal, p0.PrevWorldPosition, geometry.PrevWorldPosition); \
posProjectedV = TessalationProjectOntoPlane(p1.WorldNormal, p1.PrevWorldPosition, geometry.PrevWorldPosition); \
posProjectedW = TessalationProjectOntoPlane(p2.WorldNormal, p2.PrevWorldPosition, geometry.PrevWorldPosition); \
geometry.PrevWorldPosition = U * posProjectedU + V * posProjectedV + W * posProjectedW
// Interpolates the geometry data except positions (used by the tessallation when generating vertices)
GeometryData InterpolateGeometry(GeometryData p0, float w0, GeometryData p1, float w1, GeometryData p2, float w2)
{
GeometryData output = (GeometryData)0;
output.TexCoord = p0.TexCoord * w0 + p1.TexCoord * w1 + p2.TexCoord * w2;
output.LightmapUV = p0.LightmapUV * w0 + p1.LightmapUV * w1 + p2.LightmapUV * w2;
#if USE_VERTEX_COLOR
output.VertexColor = p0.VertexColor * w0 + p1.VertexColor * w1 + p2.VertexColor * w2;
#endif
output.WorldNormal = p0.WorldNormal * w0 + p1.WorldNormal * w1 + p2.WorldNormal * w2;
output.WorldNormal = normalize(output.WorldNormal);
output.WorldTangent = p0.WorldTangent * w0 + p1.WorldTangent * w1 + p2.WorldTangent * w2;
output.WorldTangent.xyz = normalize(output.WorldTangent.xyz);
output.InstanceOrigin = p0.InstanceOrigin;
output.InstanceParams = p0.InstanceParams;
return output;
}
#endif
MaterialInput GetMaterialInput(PixelInput input)
{
MaterialInput output = GetGeometryMaterialInput(input.Geometry);
output.TwoSidedSign = WorldDeterminantSign * (input.IsFrontFace ? 1.0 : -1.0);
output.SvPosition = input.Position;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
output.CustomVSToPS = input.CustomVSToPS;
#endif
return output;
}
// Gets the local to world transform matrix (supports instancing)
#if USE_INSTANCING
#define GetInstanceTransform(input) float4x4(float4(input.InstanceTransform1.xyz, 0.0f), float4(input.InstanceTransform2.xyz, 0.0f), float4(input.InstanceTransform3.xyz, 0.0f), float4(input.InstanceOrigin.xyz, 1.0f))
#else
#define GetInstanceTransform(input) WorldMatrix;
#endif
// Removes the scale vector from the local to world transformation matrix (supports instancing)
float3x3 RemoveScaleFromLocalToWorld(float3x3 localToWorld)
{
#if USE_INSTANCING
// Extract per axis scales from localToWorld transform
float scaleX = length(localToWorld[0]);
float scaleY = length(localToWorld[1]);
float scaleZ = length(localToWorld[2]);
float3 invScale = float3(
scaleX > 0.00001f ? 1.0f / scaleX : 0.0f,
scaleY > 0.00001f ? 1.0f / scaleY : 0.0f,
scaleZ > 0.00001f ? 1.0f / scaleZ : 0.0f);
#else
float3 invScale = WorldInvScale;
#endif
localToWorld[0] *= invScale.x;
localToWorld[1] *= invScale.y;
localToWorld[2] *= invScale.z;
return localToWorld;
}
// Transforms a vector from tangent space to world space
float3 TransformTangentVectorToWorld(MaterialInput input, float3 tangentVector)
{
return mul(tangentVector, input.TBN);
}
// Transforms a vector from world space to tangent space
float3 TransformWorldVectorToTangent(MaterialInput input, float3 worldVector)
{
return mul(input.TBN, worldVector);
}
// Transforms a vector from world space to view space
float3 TransformWorldVectorToView(MaterialInput input, float3 worldVector)
{
return mul(worldVector, (float3x3)ViewMatrix);
}
// Transforms a vector from view space to world space
float3 TransformViewVectorToWorld(MaterialInput input, float3 viewVector)
{
return mul((float3x3)ViewMatrix, viewVector);
}
// Transforms a vector from local space to world space
float3 TransformLocalVectorToWorld(MaterialInput input, float3 localVector)
{
float3x3 localToWorld = (float3x3)GetInstanceTransform(input);
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
return mul(localVector, localToWorld);
}
// Transforms a vector from local space to world space
float3 TransformWorldVectorToLocal(MaterialInput input, float3 worldVector)
{
float3x3 localToWorld = (float3x3)GetInstanceTransform(input);
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
return mul(localToWorld, worldVector);
}
// Gets the current object position (supports instancing)
float3 GetObjectPosition(MaterialInput input)
{
return input.InstanceOrigin.xyz;
}
// Gets the current object size (supports instancing)
float3 GetObjectSize(MaterialInput input)
{
float4x4 world = GetInstanceTransform(input);
return GeometrySize * float3(world._m00, world._m11, world._m22);
}
// Get the current object random value (supports instancing)
float GetPerInstanceRandom(MaterialInput input)
{
return input.InstanceParams.x;
}
// Get the current object LOD transition dither factor (supports instancing)
float GetLODDitherFactor(MaterialInput input)
{
#if USE_DITHERED_LOD_TRANSITION
return input.InstanceParams.y;
#else
return 0;
#endif
}
// Gets the interpolated vertex color (in linear space)
float4 GetVertexColor(MaterialInput input)
{
#if USE_VERTEX_COLOR
return input.VertexColor;
#else
return 1;
#endif
}
@8
// Get material properties function (for vertex shader)
Material GetMaterialVS(MaterialInput input)
{
@5
}
// Get material properties function (for domain shader)
Material GetMaterialDS(MaterialInput input)
{
@6
}
// Get material properties function (for pixel shader)
Material GetMaterialPS(MaterialInput input)
{
@4
}
// Calculates the transform matrix from mesh tangent space to local space
float3x3 CalcTangentToLocal(ModelInput input)
{
float bitangentSign = input.Tangent.w ? -1.0f : +1.0f;
float3 normal = input.Normal.xyz * 2.0 - 1.0;
float3 tangent = input.Tangent.xyz * 2.0 - 1.0;
float3 bitangent = cross(normal, tangent) * bitangentSign;
return float3x3(tangent, bitangent, normal);
}
float3x3 CalcTangentToWorld(float4x4 world, float3x3 tangentToLocal)
{
float3x3 localToWorld = RemoveScaleFromLocalToWorld((float3x3)world);
return mul(tangentToLocal, localToWorld);
}
// Vertex Shader function for GBuffer Pass and Depth Pass (with full vertex data)
META_VS(true, FEATURE_LEVEL_ES2)
META_PERMUTATION_1(USE_INSTANCING=0)
META_PERMUTATION_1(USE_INSTANCING=1)
META_VS_IN_ELEMENT(POSITION, 0, R32G32B32_FLOAT, 0, 0, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(TEXCOORD, 0, R16G16_FLOAT, 1, 0, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(NORMAL, 0, R10G10B10A2_UNORM, 1, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(TANGENT, 0, R10G10B10A2_UNORM, 1, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(TEXCOORD, 1, R16G16_FLOAT, 1, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(COLOR, 0, R8G8B8A8_UNORM, 2, 0, PER_VERTEX, 0, USE_VERTEX_COLOR)
META_VS_IN_ELEMENT(ATTRIBUTE,0, R32G32B32A32_FLOAT,3, 0, PER_INSTANCE, 1, USE_INSTANCING)
META_VS_IN_ELEMENT(ATTRIBUTE,1, R32G32B32A32_FLOAT,3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
META_VS_IN_ELEMENT(ATTRIBUTE,2, R32G32B32_FLOAT, 3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
META_VS_IN_ELEMENT(ATTRIBUTE,3, R32G32B32_FLOAT, 3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
META_VS_IN_ELEMENT(ATTRIBUTE,4, R16G16B16A16_FLOAT,3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
VertexOutput VS(ModelInput input)
{
VertexOutput output;
// Compute world space vertex position
float4x4 world = GetInstanceTransform(input);
output.Geometry.WorldPosition = mul(float4(input.Position.xyz, 1), world).xyz;
output.Geometry.PrevWorldPosition = mul(float4(input.Position.xyz, 1), PrevWorldMatrix).xyz;
// Compute clip space position
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
// Pass vertex attributes
output.Geometry.TexCoord = input.TexCoord;
#if USE_VERTEX_COLOR
output.Geometry.VertexColor = input.Color;
#endif
output.Geometry.InstanceOrigin = world[3].xyz;
#if USE_INSTANCING
output.Geometry.LightmapUV = input.LightmapUV * input.InstanceLightmapArea.zw + input.InstanceLightmapArea.xy;
output.Geometry.InstanceParams = float2(input.InstanceOrigin.w, input.InstanceTransform1.w);
#else
#if CAN_USE_LIGHTMAP
output.Geometry.LightmapUV = input.LightmapUV * LightmapArea.zw + LightmapArea.xy;
#else
output.Geometry.LightmapUV = input.LightmapUV;
#endif
output.Geometry.InstanceParams = float2(PerInstanceRandom, LODDitherFactor);
#endif
// Calculate tanget space to world space transformation matrix for unit vectors
float3x3 tangentToLocal = CalcTangentToLocal(input);
float3x3 tangentToWorld = CalcTangentToWorld(world, tangentToLocal);
output.Geometry.WorldNormal = tangentToWorld[2];
output.Geometry.WorldTangent.xyz = tangentToWorld[0];
output.Geometry.WorldTangent.w = input.Tangent.w ? -1.0f : +1.0f;
// Get material input params if need to evaluate any material property
#if USE_POSITION_OFFSET || USE_TESSELLATION || USE_CUSTOM_VERTEX_INTERPOLATORS
MaterialInput materialInput = GetGeometryMaterialInput(output.Geometry);
materialInput.TwoSidedSign = WorldDeterminantSign;
materialInput.SvPosition = output.Position;
materialInput.PreSkinnedPosition = input.Position.xyz;
materialInput.PreSkinnedNormal = tangentToLocal[2].xyz;
#if USE_INSTANCING
materialInput.InstanceTransform1 = input.InstanceTransform1.xyz;
materialInput.InstanceTransform2 = input.InstanceTransform2.xyz;
materialInput.InstanceTransform3 = input.InstanceTransform3.xyz;
#endif
Material material = GetMaterialVS(materialInput);
#endif
// Apply world position offset per-vertex
#if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif
// Get tessalation multiplier (per vertex)
#if USE_TESSELLATION
output.TessellationMultiplier = material.TessellationMultiplier;
#endif
// Copy interpolants for other shader stages
#if USE_CUSTOM_VERTEX_INTERPOLATORS
output.CustomVSToPS = material.CustomVSToPS;
#endif
return output;
}
// Vertex Shader function for Depth Pass
META_VS(true, FEATURE_LEVEL_ES2)
META_PERMUTATION_1(USE_INSTANCING=0)
META_PERMUTATION_1(USE_INSTANCING=1)
META_VS_IN_ELEMENT(POSITION, 0, R32G32B32_FLOAT, 0, 0, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(ATTRIBUTE,0, R32G32B32A32_FLOAT,3, 0, PER_INSTANCE, 1, USE_INSTANCING)
META_VS_IN_ELEMENT(ATTRIBUTE,1, R32G32B32A32_FLOAT,3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
META_VS_IN_ELEMENT(ATTRIBUTE,2, R32G32B32_FLOAT, 3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
META_VS_IN_ELEMENT(ATTRIBUTE,3, R32G32B32_FLOAT, 3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
META_VS_IN_ELEMENT(ATTRIBUTE,4, R16G16B16A16_FLOAT,3, ALIGN, PER_INSTANCE, 1, USE_INSTANCING)
float4 VS_Depth(ModelInput_PosOnly input) : SV_Position
{
float4x4 world = GetInstanceTransform(input);
float3 worldPosition = mul(float4(input.Position.xyz, 1), world).xyz;
float4 position = mul(float4(worldPosition, 1), ViewProjectionMatrix);
return position;
}
#if USE_SKINNING
// The skeletal bones matrix buffer (stored as 4x3, 3 float4 behind each other)
Buffer<float4> BoneMatrices : register(t0);
#if PER_BONE_MOTION_BLUR
// The skeletal bones matrix buffer from the previous frame
Buffer<float4> PrevBoneMatrices : register(t1);
float3x4 GetPrevBoneMatrix(int index)
{
float4 a = PrevBoneMatrices[index * 3];
float4 b = PrevBoneMatrices[index * 3 + 1];
float4 c = PrevBoneMatrices[index * 3 + 2];
return float3x4(a, b, c);
}
float3 SkinPrevPosition(ModelInput_Skinned input)
{
float4 position = float4(input.Position.xyz, 1);
float3x4 boneMatrix = input.BlendWeights.x * GetPrevBoneMatrix(input.BlendIndices.x);
boneMatrix += input.BlendWeights.y * GetPrevBoneMatrix(input.BlendIndices.y);
boneMatrix += input.BlendWeights.z * GetPrevBoneMatrix(input.BlendIndices.z);
boneMatrix += input.BlendWeights.w * GetPrevBoneMatrix(input.BlendIndices.w);
return mul(boneMatrix, position);
}
#endif
// Cached skinning data to avoid multiple calculation
struct SkinningData
{
float3x4 BlendMatrix;
};
// Calculates the transposed transform matrix for the given bone index
float3x4 GetBoneMatrix(int index)
{
float4 a = BoneMatrices[index * 3];
float4 b = BoneMatrices[index * 3 + 1];
float4 c = BoneMatrices[index * 3 + 2];
return float3x4(a, b, c);
}
// Calculates the transposed transform matrix for the given vertex (uses blending)
float3x4 GetBoneMatrix(ModelInput_Skinned input)
{
float3x4 boneMatrix = input.BlendWeights.x * GetBoneMatrix(input.BlendIndices.x);
boneMatrix += input.BlendWeights.y * GetBoneMatrix(input.BlendIndices.y);
boneMatrix += input.BlendWeights.z * GetBoneMatrix(input.BlendIndices.z);
boneMatrix += input.BlendWeights.w * GetBoneMatrix(input.BlendIndices.w);
return boneMatrix;
}
// Transforms the vertex position by weighted sum of the skinning matrices
float3 SkinPosition(ModelInput_Skinned input, SkinningData data)
{
return mul(data.BlendMatrix, float4(input.Position.xyz, 1));
}
// Transforms the vertex position by weighted sum of the skinning matrices
float3x3 SkinTangents(ModelInput_Skinned input, SkinningData data)
{
// Unpack vertex tangent frame
float bitangentSign = input.Tangent.w ? -1.0f : +1.0f;
float3 normal = input.Normal.xyz * 2.0 - 1.0;
float3 tangent = input.Tangent.xyz * 2.0 - 1.0;
// Apply skinning
tangent = mul(data.BlendMatrix, float4(tangent, 0));
normal = mul(data.BlendMatrix, float4(normal, 0));
float3 bitangent = cross(normal, tangent) * bitangentSign;
return float3x3(tangent, bitangent, normal);
}
// Vertex Shader function for GBuffers/Depth Pass (skinned mesh rendering)
META_VS(true, FEATURE_LEVEL_ES2)
META_PERMUTATION_1(USE_SKINNING=1)
META_PERMUTATION_2(USE_SKINNING=1, PER_BONE_MOTION_BLUR=1)
META_VS_IN_ELEMENT(POSITION, 0, R32G32B32_FLOAT, 0, 0, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(TEXCOORD, 0, R16G16_FLOAT, 0, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(NORMAL, 0, R10G10B10A2_UNORM, 0, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(TANGENT, 0, R10G10B10A2_UNORM, 0, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(BLENDINDICES, 0, R8G8B8A8_UINT, 0, ALIGN, PER_VERTEX, 0, true)
META_VS_IN_ELEMENT(BLENDWEIGHT, 0, R16G16B16A16_FLOAT,0, ALIGN, PER_VERTEX, 0, true)
VertexOutput VS_Skinned(ModelInput_Skinned input)
{
VertexOutput output;
// Perform skinning
SkinningData data;
data.BlendMatrix = GetBoneMatrix(input);
float3 position = SkinPosition(input, data);
float3x3 tangentToLocal = SkinTangents(input, data);
// Compute world space vertex position
float4x4 world = GetInstanceTransform(input);
output.Geometry.WorldPosition = mul(float4(position, 1), world).xyz;
#if PER_BONE_MOTION_BLUR
float3 prevPosition = SkinPrevPosition(input);
output.Geometry.PrevWorldPosition = mul(float4(prevPosition, 1), PrevWorldMatrix).xyz;
#else
output.Geometry.PrevWorldPosition = mul(float4(position, 1), PrevWorldMatrix).xyz;
#endif
// Compute clip space position
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
// Pass vertex attributes
output.Geometry.TexCoord = input.TexCoord;
#if USE_VERTEX_COLOR
output.Geometry.VertexColor = float4(0, 0, 0, 1);
#endif
output.Geometry.LightmapUV = float2(0, 0);
output.Geometry.InstanceOrigin = world[3].xyz;
#if USE_INSTANCING
output.Geometry.InstanceParams = float2(input.InstanceOrigin.w, input.InstanceTransform1.w);
#else
output.Geometry.InstanceParams = float2(PerInstanceRandom, LODDitherFactor);
#endif
// Calculate tanget space to world space transformation matrix for unit vectors
float3x3 tangentToWorld = CalcTangentToWorld(world, tangentToLocal);
output.Geometry.WorldNormal = tangentToWorld[2];
output.Geometry.WorldTangent.xyz = tangentToWorld[0];
output.Geometry.WorldTangent.w = input.Tangent.w ? -1.0f : +1.0f;
// Get material input params if need to evaluate any material property
#if USE_POSITION_OFFSET || USE_TESSELLATION || USE_CUSTOM_VERTEX_INTERPOLATORS
MaterialInput materialInput = GetGeometryMaterialInput(output.Geometry);
materialInput.TwoSidedSign = WorldDeterminantSign;
materialInput.SvPosition = output.Position;
materialInput.PreSkinnedPosition = input.Position.xyz;
materialInput.PreSkinnedNormal = tangentToLocal[2].xyz;
Material material = GetMaterialVS(materialInput);
#endif
// Apply world position offset per-vertex
#if USE_POSITION_OFFSET
output.Geometry.WorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif
// Get tessalation multiplier (per vertex)
#if USE_TESSELLATION
output.TessellationMultiplier = material.TessellationMultiplier;
#endif
// Copy interpolants for other shader stages
#if USE_CUSTOM_VERTEX_INTERPOLATORS
output.CustomVSToPS = material.CustomVSToPS;
#endif
return output;
}
#endif
#if USE_DITHERED_LOD_TRANSITION
void ClipLODTransition(PixelInput input)
{
float ditherFactor = input.Geometry.InstanceParams.y;
if (abs(ditherFactor) > 0.001)
{
float randGrid = cos(dot(floor(input.Position.xy), float2(347.83452793, 3343.28371863)));
float randGridFrac = frac(randGrid * 1000.0);
half mask = (ditherFactor < 0.0) ? (ditherFactor + 1.0 > randGridFrac) : (ditherFactor < randGridFrac);
clip(mask - 0.001);
}
}
#endif
// Pixel Shader function for Depth Pass
META_PS(true, FEATURE_LEVEL_ES2)
void PS_Depth(PixelInput input)
{
#if USE_DITHERED_LOD_TRANSITION
// LOD masking
ClipLODTransition(input);
#endif
#if MATERIAL_MASKED || MATERIAL_BLEND != MATERIAL_BLEND_OPAQUE
// Get material parameters
MaterialInput materialInput = GetMaterialInput(input);
Material material = GetMaterialPS(materialInput);
// Perform per pixel clipping
#if MATERIAL_MASKED
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
#if MATERIAL_BLEND != MATERIAL_BLEND_OPAQUE
clip(material.Opacity - MATERIAL_OPACITY_THRESHOLD);
#endif
#endif
}
@9
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+99 -423
View File
@@ -3,7 +3,6 @@
#define MATERIAL 1
@3
// Enables/disables smooth terrain chunks LOD transitions (with morphing higher LOD near edges to the lower LOD in the neighbour)
#define USE_SMOOTH_LOD_TRANSITION 1
@@ -26,7 +25,6 @@ float3 ViewDir;
float TimeParam;
float4 ViewInfo;
float4 ScreenSize;
float4 LightmapArea;
float3 WorldInvScale;
float WorldDeterminantSign;
float PerInstanceRandom;
@@ -39,35 +37,31 @@ float2 OffsetUV;
float2 Dummy0;
@1META_CB_END
#if CAN_USE_LIGHTMAP
// Irradiance and directionality prebaked lightmaps
Texture2D Lightmap0 : register(t0);
Texture2D Lightmap1 : register(t1);
Texture2D Lightmap2 : register(t2);
#endif
// Terrain data
Texture2D Heightmap : register(t3);
Texture2D Splatmap0 : register(t4);
Texture2D Splatmap1 : register(t5);
Texture2D Heightmap : register(t0);
Texture2D Splatmap0 : register(t1);
Texture2D Splatmap1 : register(t2);
// Material shader resources
// Shader resources
@2
// Geometry data passed though the graphics rendering stages up to the pixel shader
struct GeometryData
{
float3 WorldPosition : TEXCOORD0;
float2 TexCoord : TEXCOORD1;
float2 LightmapUV : TEXCOORD2;
float3 WorldNormal : TEXCOORD3;
float HolesMask : TEXCOORD4;
#if USE_TERRAIN_LAYERS
float4 Layers[TERRAIN_LAYERS_DATA_SIZE] : TEXCOORD5;
#endif
};
// Interpolants passed from the vertex shader
struct VertexOutput
{
float4 Position : SV_Position;
float3 WorldPosition : TEXCOORD0;
float2 TexCoord : TEXCOORD1;
float2 LightmapUV : TEXCOORD2;
float3 WorldNormal : TEXCOORD3;
float HolesMask : TEXCOORD4;
#if USE_TERRAIN_LAYERS
float4 Layers[TERRAIN_LAYERS_DATA_SIZE] : TEXCOORD5;
#endif
float4 Position : SV_Position;
GeometryData Geometry;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
@@ -79,19 +73,12 @@ struct VertexOutput
// Interpolants passed to the pixel shader
struct PixelInput
{
float4 Position : SV_Position;
float3 WorldPosition : TEXCOORD0;
float2 TexCoord : TEXCOORD1;
float2 LightmapUV : TEXCOORD2;
float3 WorldNormal : TEXCOORD3;
float HolesMask : TEXCOORD4;
#if USE_TERRAIN_LAYERS
float4 Layers[TERRAIN_LAYERS_DATA_SIZE] : TEXCOORD5;
#endif
float4 Position : SV_Position;
GeometryData Geometry;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
bool IsFrontFace : SV_IsFrontFace;
bool IsFrontFace : SV_IsFrontFace;
};
// Material properties generation input
@@ -116,25 +103,66 @@ struct MaterialInput
#endif
};
// Extracts geometry data to the material input
MaterialInput GetGeometryMaterialInput(GeometryData geometry)
{
MaterialInput output = (MaterialInput)0;
output.WorldPosition = geometry.WorldPosition;
output.TexCoord = geometry.TexCoord;
#if USE_LIGHTMAP
output.LightmapUV = geometry.LightmapUV;
#endif
output.TBN = CalcTangentBasisFromWorldNormal(geometry.WorldNormal);
output.HolesMask = geometry.HolesMask;
#if USE_TERRAIN_LAYERS
output.Layers = geometry.Layers;
#endif
return output;
}
#if USE_TESSELLATION
// Interpolates the geometry positions data only (used by the tessallation when generating vertices)
#define InterpolateGeometryPositions(output, p0, w0, p1, w1, p2, w2, offset) output.WorldPosition = p0.WorldPosition * w0 + p1.WorldPosition * w1 + p2.WorldPosition * w2 + offset
// Offsets the geometry positions data only (used by the tessallation when generating vertices)
#define OffsetGeometryPositions(geometry, offset) geometry.WorldPosition += offset
// Applies the Phong tessallation to the geometry positions (used by the tessallation when doing Phong tess)
#define ApplyGeometryPositionsPhongTess(geometry, p0, p1, p2, U, V, W) \
float3 posProjectedU = TessalationProjectOntoPlane(p0.WorldNormal, p0.WorldPosition, geometry.WorldPosition); \
float3 posProjectedV = TessalationProjectOntoPlane(p1.WorldNormal, p1.WorldPosition, geometry.WorldPosition); \
float3 posProjectedW = TessalationProjectOntoPlane(p2.WorldNormal, p2.WorldPosition, geometry.WorldPosition); \
geometry.WorldPosition = U * posProjectedU + V * posProjectedV + W * posProjectedW
// Interpolates the geometry data except positions (used by the tessallation when generating vertices)
GeometryData InterpolateGeometry(GeometryData p0, float w0, GeometryData p1, float w1, GeometryData p2, float w2)
{
GeometryData output = (GeometryData)0;
output.TexCoord = p0.TexCoord * w0 + p1.TexCoord * w1 + p2.TexCoord * w2;
output.LightmapUV = p0.LightmapUV * w0 + p1.LightmapUV * w1 + p2.LightmapUV * w2;
output.WorldNormal = p0.WorldNormal * w0 + p1.WorldNormal * w1 + p2.WorldNormal * w2;
output.WorldNormal = normalize(output.WorldNormal);
output.HolesMask = p0.HolesMask * w0 + p1.HolesMask * w1 + p2.HolesMask * w2;
#if USE_TERRAIN_LAYERS
UNROLL
for (int i = 0; i < TERRAIN_LAYERS_DATA_SIZE; i++)
output.Layers[i] = p0.Layers[i] * w0 + p1.Layers[i] * w1 + p2.Layers[i] * w2;
#endif
return output;
}
#endif
MaterialInput GetMaterialInput(PixelInput input)
{
MaterialInput result = (MaterialInput)0;
result.WorldPosition = input.WorldPosition;
result.TexCoord = input.TexCoord;
#if USE_LIGHTMAP
result.LightmapUV = input.LightmapUV;
#endif
result.TBN = CalcTangentBasisFromWorldNormal(input.WorldNormal);
result.TwoSidedSign = WorldDeterminantSign * (input.IsFrontFace ? 1.0 : -1.0);
result.SvPosition = input.Position;
result.HolesMask = input.HolesMask;
#if USE_TERRAIN_LAYERS
result.Layers = input.Layers;
#endif
MaterialInput output = GetGeometryMaterialInput(input.Geometry);
output.TwoSidedSign = WorldDeterminantSign * (input.IsFrontFace ? 1.0 : -1.0);
output.SvPosition = input.Position;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
result.CustomVSToPS = input.CustomVSToPS;
output.CustomVSToPS = input.CustomVSToPS;
#endif
return result;
return output;
}
// Removes the scale vector from the local to world transformation matrix
@@ -216,6 +244,8 @@ float4 GetVertexColor(MaterialInput input)
return 1;
}
@8
// Get material properties function (for vertex shader)
Material GetMaterialVS(MaterialInput input)
{
@@ -234,10 +264,6 @@ Material GetMaterialPS(MaterialInput input)
@4
}
// Programmatically set the line number after all the material inputs which have a variable number of line endings
// This allows shader error line numbers after this point to be the same regardless of which material is being compiled
#line 1000
// Calculates LOD value (with fractional part for blending)
float CalcLOD(float2 xy, float4 morph)
{
@@ -286,7 +312,7 @@ float3x3 CalcTangentToWorld(float4x4 world, float3x3 tangentToLocal)
struct TerrainVertexInput
{
float2 TexCoord : TEXCOORD0;
float4 Morph : TEXCOORD1;
float4 Morph : TEXCOORD1;
};
// Vertex Shader function for terrain rendering
@@ -337,7 +363,7 @@ VertexOutput VS(TerrainVertexInput input)
float2 normalTemp = float2(heightmapValue.b, heightmapValue.a) * 2.0f - 1.0f;
float3 normal = float3(normalTemp.x, sqrt(1.0 - saturate(dot(normalTemp, normalTemp))), normalTemp.y);
normal = normalize(normal);
output.HolesMask = isHole ? 0 : 1;
output.Geometry.HolesMask = isHole ? 0 : 1;
if (isHole)
{
normal = float3(0, 1, 0);
@@ -354,10 +380,10 @@ VertexOutput VS(TerrainVertexInput input)
float3 position = float3(positionXZ.x, height, positionXZ.y);
// Compute world space vertex position
output.WorldPosition = mul(float4(position, 1), WorldMatrix).xyz;
output.Geometry.WorldPosition = mul(float4(position, 1), WorldMatrix).xyz;
// Compute clip space position
output.Position = mul(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix);
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
// Pass vertex attributes
#if USE_SMOOTH_LOD_TRANSITION
@@ -365,46 +391,46 @@ VertexOutput VS(TerrainVertexInput input)
#else
float2 texCoord = input.TexCoord;
#endif
output.TexCoord = positionXZ * (1.0f / TerrainChunkSizeLOD0) + OffsetUV;
output.LightmapUV = texCoord * LightmapArea.zw + LightmapArea.xy;
output.Geometry.TexCoord = positionXZ * (1.0f / TerrainChunkSizeLOD0) + OffsetUV;
output.Geometry.LightmapUV = texCoord * LightmapArea.zw + LightmapArea.xy;
// Extract terrain layers weights from the splatmap
#if USE_TERRAIN_LAYERS
output.Layers[0] = splatmap0Value;
output.Geometry.Layers[0] = splatmap0Value;
#if TERRAIN_LAYERS_DATA_SIZE > 1
output.Layers[1] = splatmap1Value;
output.Geometry.Layers[1] = splatmap1Value;
#endif
#endif
// Compute world space normal vector
float3x3 tangentToLocal = CalcTangentBasisFromWorldNormal(normal);
float3x3 tangentToWorld = CalcTangentToWorld(WorldMatrix, tangentToLocal);
output.WorldNormal = tangentToWorld[2];
output.Geometry.WorldNormal = tangentToWorld[2];
// Get material input params if need to evaluate any material property
#if USE_POSITION_OFFSET || USE_TESSELLATION || USE_CUSTOM_VERTEX_INTERPOLATORS
MaterialInput materialInput = (MaterialInput)0;
materialInput.WorldPosition = output.WorldPosition;
materialInput.TexCoord = output.TexCoord;
materialInput.WorldPosition = output.Geometry.WorldPosition;
materialInput.TexCoord = output.Geometry.TexCoord;
#if USE_LIGHTMAP
materialInput.LightmapUV = output.LightmapUV;
materialInput.LightmapUV = output.Geometry.LightmapUV;
#endif
materialInput.TBN = CalcTangentBasisFromWorldNormal(output.WorldNormal);
materialInput.TBN = CalcTangentBasisFromWorldNormal(output.Geometry.WorldNormal);
materialInput.TwoSidedSign = WorldDeterminantSign;
materialInput.SvPosition = output.Position;
materialInput.PreSkinnedPosition = position;
materialInput.PreSkinnedNormal = normal;
materialInput.HolesMask = output.HolesMask;
materialInput.HolesMask = output.Geometry.HolesMask;
#if USE_TERRAIN_LAYERS
materialInput.Layers = output.Layers;
materialInput.Layers = output.Geometry.Layers;
#endif
Material material = GetMaterialVS(materialInput);
#endif
// Apply world position offset per-vertex
#if USE_POSITION_OFFSET
output.WorldPosition += material.PositionOffset;
output.Position = mul(float4(output.WorldPosition.xyz, 1), ViewProjectionMatrix);
output.Geometry.WorldPosition += material.PositionOffset;
output.Position = mul(float4(output.Geometry.WorldPosition, 1), ViewProjectionMatrix);
#endif
// Get tessalation multiplier (per vertex)
@@ -420,357 +446,9 @@ VertexOutput VS(TerrainVertexInput input)
return output;
}
#if USE_TESSELLATION
// Interpolants passed from the hull shader to the domain shader
struct TessalationHSToDS
{
float4 Position : SV_Position;
float3 WorldPosition : TEXCOORD0;
float2 TexCoord : TEXCOORD1;
float2 LightmapUV : TEXCOORD2;
float3 WorldNormal : TEXCOORD3;
float HolesMask : TEXCOORD4;
#if USE_TERRAIN_LAYERS
float4 Layers[TERRAIN_LAYERS_DATA_SIZE] : TEXCOORD5;
#endif
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
float TessellationMultiplier : TESS;
};
// Interpolants passed from the domain shader and to the pixel shader
struct TessalationDSToPS
{
float4 Position : SV_Position;
float3 WorldPosition : TEXCOORD0;
float2 TexCoord : TEXCOORD1;
float2 LightmapUV : TEXCOORD2;
float3 WorldNormal : TEXCOORD3;
float HolesMask : TEXCOORD4;
#if USE_TERRAIN_LAYERS
float4 Layers[TERRAIN_LAYERS_DATA_SIZE] : TEXCOORD5;
#endif
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
#endif
};
MaterialInput GetMaterialInput(TessalationDSToPS input)
{
MaterialInput result = (MaterialInput)0;
result.WorldPosition = input.WorldPosition;
result.TexCoord = input.TexCoord;
#if USE_LIGHTMAP
result.LightmapUV = input.LightmapUV;
#endif
result.TBN = CalcTangentBasisFromWorldNormal(input.WorldNormal);
result.TwoSidedSign = WorldDeterminantSign;
result.SvPosition = input.Position;
result.HolesMask = input.HolesMask;
#if USE_TERRAIN_LAYERS
result.Layers = input.Layers;
#endif
#if USE_CUSTOM_VERTEX_INTERPOLATORS
result.CustomVSToPS = input.CustomVSToPS;
#endif
return result;
}
struct TessalationPatch
{
float EdgeTessFactor[3] : SV_TessFactor;
float InsideTessFactor : SV_InsideTessFactor;
#if MATERIAL_TESSELLATION == MATERIAL_TESSELLATION_PN
float3 B210 : POSITION4;
float3 B120 : POSITION5;
float3 B021 : POSITION6;
float3 B012 : POSITION7;
float3 B102 : POSITION8;
float3 B201 : POSITION9;
float3 B111 : CENTER;
#endif
};
TessalationPatch HS_PatchConstant(InputPatch<VertexOutput, 3> input)
{
TessalationPatch output;
// Average tess factors along edges, and pick an edge tess factor for the interior tessellation
float4 TessellationMultipliers;
TessellationMultipliers.x = 0.5f * (input[1].TessellationMultiplier + input[2].TessellationMultiplier);
TessellationMultipliers.y = 0.5f * (input[2].TessellationMultiplier + input[0].TessellationMultiplier);
TessellationMultipliers.z = 0.5f * (input[0].TessellationMultiplier + input[1].TessellationMultiplier);
TessellationMultipliers.w = 0.333f * (input[0].TessellationMultiplier + input[1].TessellationMultiplier + input[2].TessellationMultiplier);
TessellationMultipliers = clamp(TessellationMultipliers, 1, MAX_TESSELLATION_FACTOR);
output.EdgeTessFactor[0] = TessellationMultipliers.x; // 1->2 edge
output.EdgeTessFactor[1] = TessellationMultipliers.y; // 2->0 edge
output.EdgeTessFactor[2] = TessellationMultipliers.z; // 0->1 edge
output.InsideTessFactor = TessellationMultipliers.w;
#if MATERIAL_TESSELLATION == MATERIAL_TESSELLATION_PN
// Calculate PN-Triangle coefficients
// Refer to Vlachos 2001 for the original formula
float3 p1 = input[0].WorldPosition;
float3 p2 = input[1].WorldPosition;
float3 p3 = input[2].WorldPosition;
float3 n1 = input[0].WorldNormal;
float3 n2 = input[1].WorldNormal;
float3 n3 = input[2].WorldNormal;
// Calculate control points
output.B210 = (2.0f * p1 + p2 - dot((p2 - p1), n1) * n1) / 3.0f;
output.B120 = (2.0f * p2 + p1 - dot((p1 - p2), n2) * n2) / 3.0f;
output.B021 = (2.0f * p2 + p3 - dot((p3 - p2), n2) * n2) / 3.0f;
output.B012 = (2.0f * p3 + p2 - dot((p2 - p3), n3) * n3) / 3.0f;
output.B102 = (2.0f * p3 + p1 - dot((p1 - p3), n3) * n3) / 3.0f;
output.B201 = (2.0f * p1 + p3 - dot((p3 - p1), n1) * n1) / 3.0f;
float3 e = (output.B210 + output.B120 + output.B021 +
output.B012 + output.B102 + output.B201) / 6.0f;
float3 v = (p1 + p2 + p3) / 3.0f;
output.B111 = e + ((e - v) / 2.0f);
#endif
return output;
}
META_HS(USE_TESSELLATION, FEATURE_LEVEL_SM5)
META_HS_PATCH(TESSELLATION_IN_CONTROL_POINTS)
[domain("tri")]
[partitioning("fractional_odd")]
[outputtopology("triangle_cw")]
[maxtessfactor(MAX_TESSELLATION_FACTOR)]
[outputcontrolpoints(3)]
[patchconstantfunc("HS_PatchConstant")]
TessalationHSToDS HS(InputPatch<VertexOutput, TESSELLATION_IN_CONTROL_POINTS> input, uint ControlPointID : SV_OutputControlPointID)
{
TessalationHSToDS output;
// Pass through shader
#define COPY(thing) output.thing = input[ControlPointID].thing;
COPY(Position);
COPY(WorldPosition);
COPY(TexCoord);
COPY(LightmapUV);
COPY(WorldNormal);
COPY(HolesMask);
COPY(TessellationMultiplier);
#if USE_TERRAIN_LAYERS
COPY(Layers);
#endif
#if USE_CUSTOM_VERTEX_INTERPOLATORS
COPY(CustomVSToPS);
#endif
#undef COPY
return output;
}
#if MATERIAL_TESSELLATION == MATERIAL_TESSELLATION_PHONG
// Orthogonal projection on to plane
float3 ProjectOntoPlane(float3 planeNormal, float3 planePoint, float3 pointToProject)
{
return pointToProject - dot(pointToProject-planePoint, planeNormal) * planeNormal;
}
#endif
META_DS(USE_TESSELLATION, FEATURE_LEVEL_SM5)
[domain("tri")]
TessalationDSToPS DS(TessalationPatch constantData, float3 barycentricCoords : SV_DomainLocation, const OutputPatch<TessalationHSToDS, 3> input)
{
TessalationDSToPS output;
// Get the barycentric coords
float U = barycentricCoords.x;
float V = barycentricCoords.y;
float W = barycentricCoords.z;
// Interpolate patch attributes to generated vertices
#define INTERPOLATE(thing) output.thing = U * input[0].thing + V * input[1].thing + W * input[2].thing
#define COPY(thing) output.thing = input[0].thing
INTERPOLATE(Position);
#if MATERIAL_TESSELLATION == MATERIAL_TESSELLATION_PN
// Precompute squares and squares * 3
float UU = U * U;
float VV = V * V;
float WW = W * W;
float UU3 = UU * 3.0f;
float VV3 = VV * 3.0f;
float WW3 = WW * 3.0f;
// Interpolate using barycentric coordinates and PN Triangle control points
output.WorldPosition =
input[0].WorldPosition * UU * U +
input[1].WorldPosition * VV * V +
input[2].WorldPosition * WW * W +
constantData.B210 * UU3 * V +
constantData.B120 * VV3 * U +
constantData.B021 * VV3 * W +
constantData.B012 * WW3 * V +
constantData.B102 * WW3 * U +
constantData.B201 * UU3 * W +
constantData.B111 * 6.0f * W * U * V;
#else
INTERPOLATE(WorldPosition);
#endif
INTERPOLATE(TexCoord);
INTERPOLATE(LightmapUV);
INTERPOLATE(WorldNormal);
INTERPOLATE(HolesMask);
#if USE_TERRAIN_LAYERS
UNROLL
for (int i = 0; i < TERRAIN_LAYERS_DATA_SIZE; i++)
{
INTERPOLATE(Layers[i]);
}
#endif
#if USE_CUSTOM_VERTEX_INTERPOLATORS
UNROLL
for (int i = 0; i < CUSTOM_VERTEX_INTERPOLATORS_COUNT; i++)
{
INTERPOLATE(CustomVSToPS[i]);
}
#endif
#undef INTERPOLATE
#undef COPY
// Interpolating normal can unnormalize it, so normalize it
output.WorldNormal = normalize(output.WorldNormal);
#if MATERIAL_TESSELLATION == MATERIAL_TESSELLATION_PHONG
// Orthogonal projection in the tangent planes
float3 posProjectedU = ProjectOntoPlane(input[0].WorldNormal, input[0].WorldPosition, output.WorldPosition);
float3 posProjectedV = ProjectOntoPlane(input[1].WorldNormal, input[1].WorldPosition, output.WorldPosition);
float3 posProjectedW = ProjectOntoPlane(input[2].WorldNormal, input[2].WorldPosition, output.WorldPosition);
// Interpolate the projected points
output.WorldPosition = U * posProjectedU + V * posProjectedV + W * posProjectedW;
#endif
// Perform displacement mapping
#if USE_DISPLACEMENT
MaterialInput materialInput = GetMaterialInput(output);
Material material = GetMaterialDS(materialInput);
output.WorldPosition += material.WorldDisplacement;
#endif
// Recalculate the clip space position
output.Position = mul(float4(output.WorldPosition, 1), ViewProjectionMatrix);
return output;
}
#endif
#if USE_LIGHTMAP
float3 SampleLightmap(Material material, MaterialInput materialInput)
{
// Sample lightmaps
float4 lightmap0 = Lightmap0.Sample(SamplerLinearClamp, materialInput.LightmapUV);
float4 lightmap1 = Lightmap1.Sample(SamplerLinearClamp, materialInput.LightmapUV);
float4 lightmap2 = Lightmap2.Sample(SamplerLinearClamp, materialInput.LightmapUV);
// Unpack H-basis
float3 h0 = float3(lightmap0.x, lightmap1.x, lightmap2.x);
float3 h1 = float3(lightmap0.y, lightmap1.y, lightmap2.y);
float3 h2 = float3(lightmap0.z, lightmap1.z, lightmap2.z);
float3 h3 = float3(lightmap0.w, lightmap1.w, lightmap2.w);
// Sample baked diffuse irradiance from the H-basis coefficients
float3 normal = material.TangentNormal;
#if MATERIAL_SHADING_MODEL == SHADING_MODEL_FOLIAGE
normal *= material.TangentNormal;
#endif
return GetHBasisIrradiance(normal, h0, h1, h2, h3) / PI;
}
#endif
// Pixel Shader function for GBuffer Pass
META_PS(true, FEATURE_LEVEL_ES2)
META_PERMUTATION_1(USE_LIGHTMAP=0)
META_PERMUTATION_1(USE_LIGHTMAP=1)
void PS_GBuffer(
in PixelInput input
,out float4 Light : SV_Target0
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE
,out float4 RT0 : SV_Target1
,out float4 RT1 : SV_Target2
,out float4 RT2 : SV_Target3
#if USE_GBUFFER_CUSTOM_DATA
,out float4 RT3 : SV_Target4
#endif
#endif
)
{
Light = 0;
// Get material parameters
MaterialInput materialInput = GetMaterialInput(input);
Material material = GetMaterialPS(materialInput);
// Masking
#if MATERIAL_MASKED
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
#if USE_LIGHTMAP
float3 diffuseColor = GetDiffuseColor(material.Color, material.Metalness);
float3 specularColor = GetSpecularColor(material.Color, material.Specular, material.Metalness);
// Sample lightmap
float3 diffuseIndirectLighting = SampleLightmap(material, materialInput);
// Apply static indirect light
Light.rgb = diffuseColor * diffuseIndirectLighting * AOMultiBounce(material.AO, diffuseColor);
#endif
#if MATERIAL_BLEND == MATERIAL_BLEND_OPAQUE
// Pack material properties to GBuffer
RT0 = float4(material.Color, material.AO);
RT1 = float4(material.WorldNormal * 0.5 + 0.5, MATERIAL_SHADING_MODEL * (1.0 / 3.0));
RT2 = float4(material.Roughness, material.Metalness, material.Specular, 0);
// Custom data
#if USE_GBUFFER_CUSTOM_DATA
#if MATERIAL_SHADING_MODEL == SHADING_MODEL_SUBSURFACE
RT3 = float4(material.SubsurfaceColor, material.Opacity);
#elif MATERIAL_SHADING_MODEL == SHADING_MODEL_FOLIAGE
RT3 = float4(material.SubsurfaceColor, material.Opacity);
#else
RT3 = float4(0, 0, 0, 0);
#endif
#endif
// Add light emission
#if USE_EMISSIVE
Light.rgb += material.Emissive;
#endif
#else
// Handle blending as faked forward pass (use Light buffer and skip GBuffer modification)
Light = float4(material.Emissive, material.Opacity);
#endif
}
// Pixel Shader function for Depth Pass
META_PS(true, FEATURE_LEVEL_ES2)
void PS_Depth(PixelInput input
#if GLSL
, out float4 OutColor : SV_Target0
#endif
)
void PS_Depth(PixelInput input)
{
#if MATERIAL_MASKED
// Perform per pixel clipping if material requries it
@@ -778,8 +456,6 @@ void PS_Depth(PixelInput input
Material material = GetMaterialPS(materialInput);
clip(material.Mask - MATERIAL_MASK_THRESHOLD);
#endif
#if GLSL
OutColor = 0;
#endif
}
@9
@@ -0,0 +1,246 @@
// File generated by Flax Materials Editor
// Version: @0
#define MATERIAL 1
@3
#include "./Flax/Common.hlsl"
#include "./Flax/MaterialCommon.hlsl"
#include "./Flax/GBufferCommon.hlsl"
@7
// Primary constant buffer (with additional material parameters)
META_CB_BEGIN(0, Data)
float4x4 ViewProjectionMatrix;
float4x4 InverseViewProjectionMatrix;
float4x4 ViewMatrix;
float4x4 WorldMatrix;
float4x4 WorldMatrixInverseTransposed;
float3 ViewPos;
float ViewFar;
float3 ViewDir;
float TimeParam;
float4 ViewInfo;
float4 ScreenSize;
float3 GridSize;
float PerInstanceRandom;
float Dummy0;
float VolumetricFogMaxDistance;
int ParticleStride;
int ParticleIndex;
@1META_CB_END
// Particles attributes buffer
ByteAddressBuffer ParticlesData : register(t0);
// Shader resources
@2
// Material properties generation input
struct MaterialInput
{
float3 WorldPosition;
float TwoSidedSign;
float2 TexCoord;
uint ParticleIndex;
#if USE_VERTEX_COLOR
half4 VertexColor;
#endif
float3x3 TBN;
float4 SvPosition;
float3 PreSkinnedPosition;
float3 PreSkinnedNormal;
float3 InstanceOrigin;
float InstanceParams;
#if USE_CUSTOM_VERTEX_INTERPOLATORS
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT];
#endif
};
#define GetInstanceTransform(input) WorldMatrix;
// Removes the scale vector from the local to world transformation matrix (supports instancing)
float3x3 RemoveScaleFromLocalToWorld(float3x3 localToWorld)
{
// Extract per axis scales from localToWorld transform
float scaleX = length(localToWorld[0]);
float scaleY = length(localToWorld[1]);
float scaleZ = length(localToWorld[2]);
float3 invScale = float3(
scaleX > 0.00001f ? 1.0f / scaleX : 0.0f,
scaleY > 0.00001f ? 1.0f / scaleY : 0.0f,
scaleZ > 0.00001f ? 1.0f / scaleZ : 0.0f);
localToWorld[0] *= invScale.x;
localToWorld[1] *= invScale.y;
localToWorld[2] *= invScale.z;
return localToWorld;
}
// Transforms a vector from tangent space to world space
float3 TransformTangentVectorToWorld(MaterialInput input, float3 tangentVector)
{
return mul(tangentVector, input.TBN);
}
// Transforms a vector from world space to tangent space
float3 TransformWorldVectorToTangent(MaterialInput input, float3 worldVector)
{
return mul(input.TBN, worldVector);
}
// Transforms a vector from world space to view space
float3 TransformWorldVectorToView(MaterialInput input, float3 worldVector)
{
return mul(worldVector, (float3x3)ViewMatrix);
}
// Transforms a vector from view space to world space
float3 TransformViewVectorToWorld(MaterialInput input, float3 viewVector)
{
return mul((float3x3)ViewMatrix, viewVector);
}
// Transforms a vector from local space to world space
float3 TransformLocalVectorToWorld(MaterialInput input, float3 localVector)
{
float3x3 localToWorld = (float3x3)GetInstanceTransform(input);
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
return mul(localVector, localToWorld);
}
// Transforms a vector from local space to world space
float3 TransformWorldVectorToLocal(MaterialInput input, float3 worldVector)
{
float3x3 localToWorld = (float3x3)GetInstanceTransform(input);
//localToWorld = RemoveScaleFromLocalToWorld(localToWorld);
return mul(localToWorld, worldVector);
}
// Gets the current object position (supports instancing)
float3 GetObjectPosition(MaterialInput input)
{
return input.InstanceOrigin.xyz;
}
// Gets the current object size
float3 GetObjectSize(MaterialInput input)
{
return float3(1, 1, 1);
}
// Get the current object random value (supports instancing)
float GetPerInstanceRandom(MaterialInput input)
{
return input.InstanceParams;
}
// Get the current object LOD transition dither factor (supports instancing)
float GetLODDitherFactor(MaterialInput input)
{
return 0;
}
// Gets the interpolated vertex color (in linear space)
float4 GetVertexColor(MaterialInput input)
{
return 1;
}
uint GetParticleUint(uint particleIndex, int offset)
{
return ParticlesData.Load(particleIndex * ParticleStride + offset);
}
int GetParticleInt(uint particleIndex, int offset)
{
return asint(ParticlesData.Load(particleIndex * ParticleStride + offset));
}
float GetParticleFloat(uint particleIndex, int offset)
{
return asfloat(ParticlesData.Load(particleIndex * ParticleStride + offset));
}
float2 GetParticleVec2(uint particleIndex, int offset)
{
return asfloat(ParticlesData.Load2(particleIndex * ParticleStride + offset));
}
float3 GetParticleVec3(uint particleIndex, int offset)
{
return asfloat(ParticlesData.Load3(particleIndex * ParticleStride + offset));
}
float4 GetParticleVec4(uint particleIndex, int offset)
{
return asfloat(ParticlesData.Load4(particleIndex * ParticleStride + offset));
}
float3 TransformParticlePosition(float3 input)
{
return mul(float4(input, 1.0f), WorldMatrix).xyz;
}
float3 TransformParticleVector(float3 input)
{
return mul(float4(input, 0.0f), WorldMatrixInverseTransposed).xyz;
}
@8
// Get material properties function (for vertex shader)
Material GetMaterialVS(MaterialInput input)
{
@5
}
// Get material properties function (for domain shader)
Material GetMaterialDS(MaterialInput input)
{
@6
}
// Get material properties function (for pixel shader)
Material GetMaterialPS(MaterialInput input)
{
@4
}
// Pixel Shader function for Volumetric Fog material injection (local fog)
META_PS(true, FEATURE_LEVEL_SM5)
void PS_VolumetricFog(Quad_GS2PS input, out float4 VBufferA : SV_Target0, out float4 VBufferB : SV_Target1)
{
uint3 gridCoordinate = uint3(input.Vertex.Position.xy, input.LayerIndex);
float3 cellOffset = 0.5f;
float2 volumeUV = (gridCoordinate.xy + cellOffset.xy) / GridSize.xy;
float zSlice = gridCoordinate.z + cellOffset.z;
float sceneDepth = (zSlice / GridSize.z) * VolumetricFogMaxDistance / ViewFar;
float deviceDepth = (ViewInfo.w / sceneDepth) + ViewInfo.z;
float4 clipPos = float4(volumeUV * float2(2.0, -2.0) + float2(-1.0, 1.0), deviceDepth, 1.0);
float4 wsPos = mul(clipPos, InverseViewProjectionMatrix);
float3 positionWS = wsPos.xyz / wsPos.w;
// Get material parameters
MaterialInput materialInput = (MaterialInput)0;
materialInput.WorldPosition = positionWS;
materialInput.TexCoord = input.Vertex.TexCoord;
materialInput.ParticleIndex = ParticleIndex;
materialInput.TBN = float3x3(float3(1, 0, 0), float3(0, 1, 0), float3(0, 0, 1));
materialInput.TwoSidedSign = 1.0f;
materialInput.InstanceOrigin = WorldMatrix[3].xyz;
materialInput.InstanceParams = PerInstanceRandom;
materialInput.SvPosition = clipPos;
Material material = GetMaterialPS(materialInput);
// Compute fog properties
float3 albedo = material.Color;
float extinction = material.Opacity * material.Mask * 0.001f;
float3 emission = material.Emissive;
float3 scattering = albedo * extinction;
float absorption = max(0.0f, extinction - Luminance(scattering));
// Write fog properties
VBufferA = float4(scattering, absorption);
VBufferB = float4(emission, 0);
}
@9
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,6 +5,7 @@
API_CLASS() class %module%%class% : public Script
{
API_AUTO_SERIALIZATION();
DECLARE_SCRIPTING_TYPE(%class%);
// [Script]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+14
View File
@@ -0,0 +1,14 @@
## Mono
Custom fork: [https://github.com/FlaxEngine/mono](https://github.com/FlaxEngine/mono) with custom features for C# assemblies hot-reloading at runtime without domain unload (more: [https://flaxengine.com/blog/flax-facts-16-scripts-hot-reload/](https://flaxengine.com/blog/flax-facts-16-scripts-hot-reload/)).
### Notes
Some useful notes and tips for devs:
* When working with mono fork set `localRepoPath` to local repo location in `Source\Tools\Flax.Build\Deps\Dependencies\mono.cs`
* To update mono deps when developing/updating use `.\Development\Scripts\Windows\CallBuildTool.bat -log -ReBuildDeps -verbose -depsToBuild=mono -platform=Windows`, then build engine and run it
* `MONO_GC_DEBUG=check-remset-consistency` - it will do additional checks at each collection to see if there are any missing write barriers
* `MONO_GC_DEBUG=nursery-canaries` - it might catch some buffer overflows in case of problems in code.
* `MONO_GC_DEBUG=<log-level>:<log-file>` - will print GC debug to the log file (eg. `4:sgen-gc`).
* Methods `mono_custom_attrs_from_property` and `mono_custom_attrs_get_attr` are internally cached
* If C++ mono call a method in c# that will throw an error, error will be handled but, not completly. Calling relase domain will return random `Access memory violation`. First search for error in c# code. No workaround yet.
+6
View File
@@ -3,6 +3,12 @@
set -e
testfilesize=$(wc -c < 'Source/Logo.png')
if [ $testfilesize -le 1000 ]; then
echo "CallBuildTool ERROR: Repository was not cloned using Git LFS" 1>&2
exit 1
fi
# Compile the build tool.
xbuild /nologo /verbosity:quiet "Source/Tools/Flax.Build/Flax.Build.csproj" /property:Configuration=Release /property:Platform=AnyCPU /target:Build
+22 -60
View File
@@ -2,93 +2,55 @@
rem Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
rem Make sure the batch file exists in the root folder.
if not exist "Development\Scripts\Windows\GetMSBuildPath.bat" goto Error_BatchFileInWrongLocation
if not exist "Development\Scripts\Windows\GetMSBuildPath.bat" goto Error_InvalidLocation
for %%I in (Source\Logo.png) do if %%~zI LSS 2000 (
goto Error_MissingLFS
)
rem Get the path to MSBuild executable.
call "Development\Scripts\Windows\GetMSBuildPath.bat"
if errorlevel 1 goto Error_NoVisualStudioEnvironment
rem If using VS2017, check that NuGet package manager is installed.
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto NoVsWhere
set MSBUILD_15_EXE=
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto Compile
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
for %%j in (15.0, Current) do (
if exist "%%i\MSBuild\%%j\Bin\MSBuild.exe" (
set MSBUILD_15_EXE="%%i\MSBuild\%%j\Bin\MSBuild.exe"
goto FoundMsBuild15
set MSBUILD_PATH="%%i\MSBuild\%%j\Bin\MSBuild.exe"
goto Compile
)
)
)
:FoundMsBuild15
set MSBUILD_15_EXE_WITH_NUGET=
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.Component.MSBuild -requires Microsoft.VisualStudio.Component.NuGet -property installationPath') do (
if exist "%%i\MSBuild\15.0\Bin\MSBuild.exe" (
set MSBUILD_15_EXE_WITH_NUGET="%%i\MSBuild\15.0\Bin\MSBuild.exe"
goto FoundMsBuild15WithNuget
)
)
:FoundMsBuild15WithNuget
if not [%MSBUILD_15_EXE%] == [] (
set MSBUILD_EXE=%MSBUILD_15_EXE%
goto NoVsWhere
)
if not [%MSBUILD_EXE%] == [%MSBUILD_15_EXE_WITH_NUGET%] goto Error_RequireNugetPackageManager
:NoVsWhere
rem Check to see if the build tool source files have changed. Some can be included conditionally based on NDA access.
:Compile
md Cache\Intermediate >nul 2>nul
dir /s /b Source\Tools\Flax.Build\*.cs >Cache\Intermediate\Flax.Build.Files.txt
fc /b Cache\Intermediate\Build\Flax.Build.Files.txt Cache\Intermediate\Build\Flax.Build.PrevFiles.txt >nul 2>nul
if not errorlevel 1 goto SkipClean
copy /y Cache\Intermediate\Build\Flax.Build.Files.txt Cache\Intermediate\Build\Flax.Build.PrevFiles.txt >nul
%MSBUILD_EXE% /nologo /verbosity:quiet Source\Tools\Flax.Build\Flax.Build.csproj /property:Configuration=Release /property:Platform=AnyCPU /target:Clean
:SkipClean
%MSBUILD_EXE% /nologo /verbosity:quiet Source\Tools\Flax.Build\Flax.Build.csproj /property:Configuration=Release /property:Platform=AnyCPU /target:Build
if errorlevel 1 goto Error_CompileFailed
rem Run the build tool using the provided arguments.
copy /y Cache\Intermediate\Build\Flax.Build.Files.txt Cache\Intermediate\Build\Flax.Build.PrevFiles.txt >nul
%MSBUILD_PATH% /nologo /verbosity:quiet Source\Tools\Flax.Build\Flax.Build.csproj /property:Configuration=Release /property:Platform=AnyCPU /target:Clean
:SkipClean
%MSBUILD_PATH% /nologo /verbosity:quiet Source\Tools\Flax.Build\Flax.Build.csproj /property:Configuration=Release /property:Platform=AnyCPU /target:Build
if errorlevel 1 goto Error_CompilationFailed
Binaries\Tools\Flax.Build.exe %*
if errorlevel 1 goto Error_FlaxBuildFailed
rem Done.
exit /B 0
:Error_BatchFileInWrongLocation
echo.
echo CallBuildTool ERROR: The batch file does not appear to be located in the root directory. This script must be run from within that directory.
echo.
:Error_MissingLFS
echo CallBuildTool ERROR: Repository was not cloned using Git LFS
goto Exit
:Error_InvalidLocation
echo CallBuildTool ERROR: The script is in invalid directory.
goto Exit
:Error_NoVisualStudioEnvironment
echo.
echo CallBuildTool ERROR: We couldn't find a valid installation of Visual Studio. This program requires Visual Studio 2015. Please check that you have Visual Studio installed, then verify that the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\InstallDir (or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\InstallDir on 32-bit machines) registry value is set. Visual Studio configures this value when it is installed, and this program expects it to be set to the '\Common7\IDE\' sub-folder under a valid Visual Studio installation directory.
echo.
echo CallBuildTool ERROR: Missing Visual Studio 2015 or newer.
goto Exit
:Error_RequireNugetPackageManager
echo.
echo CallBuildTool ERROR: NuGet Package Manager is requried to be installed to use %MSBUILD_EXE%. Please run the Visual Studio Installer and add it from the individual components list (in the 'Code Tools' category).
echo.
goto Exit
:Error_CompileFailed
echo.
:Error_CompilationFailed
echo CallBuildTool ERROR: Failed to compile Flax.Build project.
echo.
goto Exit
:Error_FlaxBuildFailed
echo.
echo CallBuildTool ERROR: Flax.Build tool failed.
echo.
goto Exit
:Exit
rem Exit with error.
exit /B 1
+21 -36
View File
@@ -2,72 +2,57 @@
rem Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
set MSBUILD_EXE=
set MSBUILD_PATH=
rem Try to get the MSBuild 15 path using vswhere (see https://github.com/Microsoft/vswhere).
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto no_vswhere
if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto VsWhereNotFound
for /f "delims=" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath') do (
if exist "%%i\MSBuild\15.0\Bin\MSBuild.exe" (
set MSBUILD_EXE="%%i\MSBuild\15.0\Bin\MSBuild.exe"
goto Succeeded
set MSBUILD_PATH="%%i\MSBuild\15.0\Bin\MSBuild.exe"
goto End
)
)
:no_vswhere
:VsWhereNotFound
rem Check for MSBuild 15. This is installed alongside Visual Studio 2017, so we get the path relative to that.
call :ReadInstallPath Microsoft\VisualStudio\SxS\VS7 15.0 MSBuild\15.0\bin\MSBuild.exe
if not errorlevel 1 goto Succeeded
rem Try to get the MSBuild 14.0 path directly (see https://msdn.microsoft.com/en-us/library/hh162058(v=vs.120).aspx).
if exist "%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe" (
set MSBUILD_EXE="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe"
goto Succeeded
set MSBUILD_PATH="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe"
goto End
)
rem Try to get the MSBuild 14.0 path from the registry.
call :ReadInstallPath Microsoft\MSBuild\ToolsVersions\14.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto Succeeded
call :GetInstallPath Microsoft\VisualStudio\SxS\VS7 15.0 MSBuild\15.0\bin\MSBuild.exe
if not errorlevel 1 goto End
call :GetInstallPath Microsoft\MSBuild\ToolsVersions\14.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto End
call :GetInstallPath Microsoft\MSBuild\ToolsVersions\12.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto End
call :GetInstallPath Microsoft\MSBuild\ToolsVersions\4.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto End
rem Check for older versions of MSBuild. These are registered as separate versions in the registry.
call :ReadInstallPath Microsoft\MSBuild\ToolsVersions\12.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto Succeeded
call :ReadInstallPath Microsoft\MSBuild\ToolsVersions\4.0 MSBuildToolsPath MSBuild.exe
if not errorlevel 1 goto Succeeded
rem Searching failed.
exit /B 1
rem Searching done!
:Succeeded
:End
exit /B 0
rem Subroutine to query the registry under HKCU/HKLM Win32/Wow64 software registry keys for a certain install directory.
rem Arguments:
rem %1 = Registry path under the 'SOFTWARE' registry key
rem %2 = Value name
rem %3 = Relative path under this directory to look for an installed executable.
:ReadInstallPath
:GetInstallPath
for /f "tokens=2,*" %%A in ('REG.exe query HKCU\SOFTWARE\%1 /v %2 2^>Nul') do (
if exist "%%B%%3" (
set MSBUILD_EXE="%%B%3"
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
for /f "tokens=2,*" %%A in ('REG.exe query HKLM\SOFTWARE\%1 /v %2 2^>Nul') do (
if exist "%%B%3" (
set MSBUILD_EXE="%%B%3"
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
for /f "tokens=2,*" %%A in ('REG.exe query HKCU\SOFTWARE\Wow6432Node\%1 /v %2 2^>Nul') do (
if exist "%%B%%3" (
set MSBUILD_EXE="%%B%3"
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
for /f "tokens=2,*" %%A in ('REG.exe query HKLM\SOFTWARE\Wow6432Node\%1 /v %2 2^>Nul') do (
if exist "%%B%3" (
set MSBUILD_EXE="%%B%3"
set MSBUILD_PATH="%%B%3"
exit /B 0
)
)
+3 -3
View File
@@ -2,11 +2,11 @@
"Name": "Flax",
"Version": {
"Major": 1,
"Minor": 0,
"Build": 6214
"Minor": 1,
"Build": 6217
},
"Company": "Flax",
"Copyright": "Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.",
"Copyright": "Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.",
"GameTarget": "FlaxGame",
"EditorTarget": "FlaxEditor"
}
+2 -17
View File
@@ -6,34 +6,19 @@ setlocal
pushd
echo Generating Flax Engine project files...
rem Make sure the batch file exists in the root folder.
if not exist "%~dp0\Source" goto Error_BatchFileInWrongLocation
if not exist "Development\Scripts\Windows\CallBuildTool.bat" goto Error_BatchFileInWrongLocation
rem Run Flax.Build to generate Visual Studio solution and project files (also pass the arguments)
call "Development\Scripts\Windows\CallBuildTool.bat" -genproject %*
if errorlevel 1 goto Error_BuildToolFailed
if errorlevel 1 goto BuildToolFailed
rem Done.
popd
echo Done!
exit /B 0
:Error_BatchFileInWrongLocation
echo.
echo The batch file does not appear to be located in the root directory. This script must be run from within that directory.
echo.
pause
goto Exit
:Error_BuildToolFailed
echo.
:BuildToolFailed
echo Flax.Build tool failed.
echo.
pause
goto Exit
:Exit
rem Restore original directory before exit.
popd
exit /B 1
Regular → Executable
View File
+2 -16
View File
@@ -6,32 +6,18 @@ setlocal
pushd
echo Performing the full package...
rem Make sure the batch file exists in the root folder.
if not exist "%~dp0\Source" goto Error_BatchFileInWrongLocation
if not exist "Development\Scripts\Windows\CallBuildTool.bat" goto Error_BatchFileInWrongLocation
rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -deployPlatforms -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto Error_BuildToolFailed
if errorlevel 1 goto BuildToolFailed
rem Done.
popd
echo Done!
exit /B 0
:Error_BatchFileInWrongLocation
echo.
echo The batch file does not appear to be located in the root directory. This script must be run from within that directory.
echo.
goto Exit
:Error_BuildToolFailed
echo.
:BuildToolFailed
echo Flax.Build tool failed.
echo.
goto Exit
:Exit
rem Restore original directory before exit.
popd
exit /B 1
+3 -17
View File
@@ -6,32 +6,18 @@ setlocal
pushd
echo Building and packaging Flax Editor...
rem Make sure the batch file exists in the root folder.
if not exist "%~dp0\Source" goto Error_BatchFileInWrongLocation
if not exist "Development\Scripts\Windows\CallBuildTool.bat" goto Error_BatchFileInWrongLocation
rem Run Flax.Build to generate Visual Studio solution and project files (also pass the arguments)
rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployEditor -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto Error_BuildToolFailed
if errorlevel 1 goto BuildToolFailed
rem Done.
popd
echo Done!
exit /B 0
:Error_BatchFileInWrongLocation
echo.
echo The batch file does not appear to be located in the root directory. This script must be run from within that directory.
echo.
goto Exit
:Error_BuildToolFailed
echo.
:BuildToolFailed
echo Flax.Build tool failed.
echo.
goto Exit
:Exit
rem Restore original directory before exit.
popd
exit /B 1
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
# Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
set -e
echo Building and packaging Flax Editor...
# Change the path to the script root
cd "`dirname "$0"`"
# Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployEditor --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
+3 -17
View File
@@ -6,32 +6,18 @@ setlocal
pushd
echo Building and packaging platforms data...
rem Make sure the batch file exists in the root folder.
if not exist "%~dp0\Source" goto Error_BatchFileInWrongLocation
if not exist "Development\Scripts\Windows\CallBuildTool.bat" goto Error_BatchFileInWrongLocation
rem Run Flax.Build to generate Visual Studio solution and project files (also pass the arguments)
rem Run the build tool.
call "Development\Scripts\Windows\CallBuildTool.bat" -deploy -deployPlatforms -verbose -log -logFile="Cache\Intermediate\PackageLog.txt" %*
if errorlevel 1 goto Error_BuildToolFailed
if errorlevel 1 goto BuildToolFailed
rem Done.
popd
echo Done!
exit /B 0
:Error_BatchFileInWrongLocation
echo.
echo The batch file does not appear to be located in the root directory. This script must be run from within that directory.
echo.
goto Exit
:Error_BuildToolFailed
echo.
:BuildToolFailed
echo Flax.Build tool failed.
echo.
goto Exit
:Exit
rem Restore original directory before exit.
popd
exit /B 1
Regular → Executable
+1 -1
View File
@@ -8,5 +8,5 @@ echo Building and packaging platforms data...
# Change the path to the script root
cd "`dirname "$0"`"
# Run Flax.Build to generate project files (also pass the arguments)
# Run Flax.Build (also pass the arguments)
bash ./Development/Scripts/Linux/CallBuildTool.sh --deploy --deployPlatforms --verbose --log --logFile="Cache/Intermediate/PackageLog.txt" "$@"
+11 -10
View File
@@ -16,10 +16,6 @@ This repository contains full source code of the Flax (excluding NDA-protected p
* [Forum](https://forum.flaxengine.com)
* [Roadmap](https://trello.com/b/NQjLXRCP/flax-roadmap)
# Flax plugin for Visual Studio
Flax Visual Studio extension provides better programming workflow, C# scripts debugging functionality and allows to attach to running engine instance to debug C# source. This extension is available to download [here](https://marketplace.visualstudio.com/items?itemName=Flax.FlaxVS).
# Screenshots
![rendering](Development/Images/flax-pic-1.jpg "Rendering")
@@ -30,15 +26,20 @@ Flax Visual Studio extension provides better programming workflow, C# scripts de
Follow the instructions below to compile and run the engine from source.
## Flax plugin for Visual Studio
Flax Visual Studio extension provides better programming workflow, C# scripts debugging functionality and allows to attach to running engine instance to debug C# source. This extension is available to download [here](https://marketplace.visualstudio.com/items?itemName=Flax.FlaxVS).
## Windows
* Install Visual Studio 2015 or newer
* Install Windows 8.1 SDK or newer
* Install Microsoft Visual C++ 2015.3 v140 toolset for desktop (x86, x64)
* Install Microsoft Visual C++ 2015 v140 toolset or newer
* Clone repo (with LFS)
* Run **GenerateProjectFiles.bat**
* Open `Flax.sln` and set solution configuration to **Editor.Development** and solution platform to **Win64**
* Compile Flax project (hit F7 key)
* Set Flax (C++) or FlaxEngine (C#) as startup project
* Compile Flax project (hit F7 or CTRL+Shift+B)
* Run Flax (hit F5 key)
## Linux
@@ -46,12 +47,12 @@ Follow the instructions below to compile and run the engine from source.
* Install Visual Studio Code
* Install Mono ([https://www.mono-project.com/download/stable](https://www.mono-project.com/download/stable))
* Install Git with LFS
* Install requried packages: `sudo apt-get install nuget autoconf libtool libogg-dev automake build-essential gettext cmake python curl libtool-bin libx11-dev libpulse-dev libasound2-dev libjack-dev portaudio19-dev`
* Install compiler `sudo apt-get install clang-7 lldb-7 lld-7`
* Install requried packages: `sudo apt-get install libx11-dev libxcursor-dev libxinerama-dev nuget autoconf libogg-dev automake build-essential gettext cmake python curl libtool libtool-bin libpulse-dev libasound2-dev libjack-dev portaudio19-dev libcurl4-gnutls-dev`
* Install compiler `sudo apt-get install clang lldb lld` (Clang 6 or newer)
* Clone repo (with LFS)
* Run `sudo bash GenerateProjectFiles.sh`
* Run `./GenerateProjectFiles.sh`
* Open workspace with Visual Code
* Build and run
* Build and run (configuration and task named `Flax|Editor.Linux.Development|x64`)
## Workspace directory
+4 -5
View File
@@ -3,7 +3,7 @@
rem Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
setlocal
pushd
pushd %~dp0
echo Registering Flax Engine project files...
rem Check the current versions config
@@ -14,13 +14,13 @@ if not exist "%appdata%\Flax\Versions.txt" (
)
set EngineLocation=%cd%
find /c "%EngineLocation%" "%appdata%\Flax\Versions.txt"
if %errorlevel% equ 1 goto notfound
if %errorlevel% equ 1 goto NotFound
echo Already registered.
goto Done
rem Register the location (append to the end)
:notfound
echo Location '%EngineLocation%' is not registered. Adding it to the lsit of engine versions.
:NotFound
echo Location '%EngineLocation%' is not registered. Adding it to the list of engine versions.
echo %EngineLocation%>>"%appdata%\Flax\Versions.txt"
goto Done
@@ -31,6 +31,5 @@ echo Done!
exit /B 0
:Exit
rem Restore original directory before exit.
popd
exit /B 1
+4 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#include "EditorAnalytics.h"
#include "EditorAnalyticsController.h"
@@ -8,6 +8,7 @@
#include "Engine/Core/Math/Vector2.h"
#include "Engine/Core/Types/DateTime.h"
#include "Editor/Editor.h"
#include "Editor/ProjectInfo.h"
#include "Engine/Engine/EngineService.h"
#include "Engine/Graphics/GPUDevice.h"
#include "Engine/Utilities/StringConverter.h"
@@ -103,6 +104,8 @@ void EditorAnalytics::StartSession()
{ UA_DOCUMENT_TITLE, 0, "Flax Editor" },
#if PLATFORM_WINDOWS
{ UA_USER_AGENT, 0, "Windows " FLAXENGINE_VERSION_TEXT },
#elif PLATFORM_LINUX
{ UA_USER_AGENT, 0, "Linux " FLAXENGINE_VERSION_TEXT },
#else
#error "Unknown platform"
#endif
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#pragma once
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#include "EditorAnalyticsController.h"
#include "Editor/Cooker/GameCooker.h"
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#pragma once
+2 -3
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using Newtonsoft.Json;
@@ -26,8 +26,7 @@ namespace FlaxEditor.Content
{
if (reader.TokenType == JsonToken.String)
{
Guid id;
FlaxEngine.Json.JsonSerializer.ParseID((string)reader.Value, out id);
FlaxEngine.Json.JsonSerializer.ParseID((string)reader.Value, out Guid id);
return Editor.Instance.ContentDatabase.Find(id);
}

Some files were not shown because too many files have changed in this diff Show More