773 Commits
Author SHA1 Message Date
Simon Lübeß 8c53dcb9ca Updated submodule imgui 2026-08-16 22:34:30 +02:00
Simon Lübeß 5577aa6e11 Update Freetype-Submodule 2026-08-16 22:28:56 +02:00
Simon Lübeß 6a60fae5d5 Added missing override 2026-08-16 22:26:42 +02:00
Simon Lübeß 7b82e738eb Removed extension methods as they are part of corelib now 2026-08-16 22:25:37 +02:00
Simon Lübeß c81e695981 Fix compile errors due to Beef.Linq update 2026-08-16 22:21:53 +02:00
Simon Lübeß 2a90374b5b "Fix" warnings 2026-08-16 20:11:36 +02:00
Simon Lübeß 39d78ab4c1 Removed deprecated Application.Get() 2026-08-16 19:51:56 +02:00
Simon Lübeß 836c926a22 Updated Beef.Linq 2026-08-16 19:51:02 +02:00
Simon Lübeß e451864908 Stop warning when calling SetDebugName again 2026-08-16 19:21:25 +02:00
Simon Lübeß 229629a587 Fixed crash when resizing window 2026-08-16 16:43:15 +02:00
Simon Lübeß fd2b990a8f Reuse running Visual Studio instances 2026-08-16 14:30:24 +02:00
Simon Lübeß 29b6f37c2a Fixed memory leak 2026-08-15 13:52:45 +02:00
Simon Lübeß 188dc4b3b6 Better names for found Rider installs + context menu for copy/open path 2026-08-15 13:52:33 +02:00
Simon Lübeß 62ad8bee35 Auto detect all Visual Studio and Rider installs 2026-08-14 23:34:04 +02:00
Simon Lübeß f8e533f28d Almost entirely moved ImGui dependency (and settings) from Engine to Editor 2026-08-09 16:49:54 +02:00
Simon Lübeß faa3040471 Find Rider installations 2026-08-09 16:14:40 +02:00
Simon Lübeß 05187e6b9f Locate Visual Studio using vswhere 2026-08-02 17:33:14 +02:00
Simon Lübeß eaffc1a135 Fixed string deserialization in release builds 2026-08-02 16:28:59 +02:00
Simon Lübeß ec9fccee12 Don't touch LastOpenedScenes when we didn't save 2026-08-02 15:59:38 +02:00
Simon Lübeß 164384e55e Made not having a project loaded less crashy 2026-08-02 15:58:02 +02:00
Simon Lübeß 9b14cdddb9 At least don't crash when no project is opened 2026-08-02 12:34:26 +02:00
Simon Lübeß 85b3fd5bc9 Fix release configurations 2026-08-02 12:33:54 +02:00
Simon Lübeß c56db0f069 Added winget install instructions to readme 2026-08-02 12:04:41 +02:00
Simon Lübeß 8ccbc565ad Removed unnecessary reflection option 2026-08-02 12:03:59 +02:00
Simon Lübeß a14d86012a Finally debugged and fixed cleanup error in Font 2026-08-02 12:00:40 +02:00
Simon Lübeß 8b64afee0c Cleanup and refactor Font and FontRenderer 2026-08-02 12:00:08 +02:00
Simon Lübeß 344aabae2b Who thought Point was a good size unit for 3D text? 2026-08-02 11:59:19 +02:00
Simon Lübeß dec0a004a5 Preprocess and delete glyph shape 2026-08-02 11:58:39 +02:00
Simon Lübeß 4e314d1de2 Commit asset configs for resources without importer 2026-08-02 11:46:17 +02:00
Simon Lübeß 4157477882 Correctly handle errors of File.GetLastWriteTimeUtc 2026-08-01 23:06:29 +02:00
Simon Lübeß c65fa58940 Save asset configs for file types without importer 2026-08-01 23:06:02 +02:00
Simon Lübeß b5071e3499 Updated freetype, harfbuzz and msdfgen 2026-08-01 23:04:44 +02:00
Simon Lübeß 2f5baa5f5e Font rendering rework
Handle fonts unscaled
2026-08-01 22:55:35 +02:00
Simon Lübeß ab39386b27 Show texture dimensions in AsserViewer
- fixed color picker for background
2026-07-22 21:25:16 +02:00
Simon Lübeß 3095c8f0bb Provide build config when building Helper 2026-07-19 16:54:30 +02:00
Simon Lübeß e4e86bd21d Fixed initialization of EditorCamera
`this = default` overwrote `_cameraRotationSpeed` with 0 thus breaking user input
2026-07-19 14:27:18 +02:00
Simon Lübeß 8382060f8a Comment out wait for debugger 2026-07-19 14:22:31 +02:00
Simon Lübeß e076eabfa1 Added ToString to Quaternion 2026-07-19 14:22:02 +02:00
Simon Lübeß c8fdba6121 Fixed beef workspace build 2026-04-13 21:03:28 +02:00
Simon Lübeß 6935e9daf9 Setup WatchedSources for BuildTool Module "GlitchyEngineHelper" 2026-04-13 20:53:31 +02:00
Simon Lübeß 1e1ec7aaa9 Some changes
- Changed ModuleInfo to class, save Length for Timestamp-Hashes
- Obey recursive-flag for WatchedSources
- Verbosely skip up-to-date modules
2026-04-13 20:48:21 +02:00
Simon Lübeß 6bec99ab06 Adhere to ExcludedSubpaths while scanning directory for change 2026-04-13 20:05:41 +02:00
Simon Lübeß aad44dd835 Simple unnecessary build prevention 2026-04-13 19:58:55 +02:00
Simon Lübeß 28ad9298af Removed DirectXTK dependency 2026-04-12 22:10:39 +02:00
Simon Lübeß 86977213ff Updated msdfgen 2026-04-12 14:28:26 +02:00
Simon Lübeß 4c20cca585 Build msdfgen with BuildTool 2026-04-12 14:02:54 +02:00
Simon Lübeß 4c855819c9 Added FreeType to BuildTool 2026-04-12 12:05:55 +02:00
Simon Lübeß aabcd5f9b2 Build Box2D with BuildTool 2026-04-11 17:28:04 +02:00
Simon Lübeß 3fd5452146 Fixed debug builds for ScriptCore and GEHelper 2026-04-11 09:39:13 +02:00
Simon Lübeß 10e2294f9c BuildTool: Stop after when Module failed 2026-04-11 09:39:13 +02:00
Simon Lübeß bca4281d84 Fixed ScriptGlue function discovery and slighty automated extension assignment 2026-04-11 09:38:43 +02:00
Simon Lübeß 28a9242023 Fixed compiler bugs
Stuff happens when you don't work on a project for half a year!
2026-04-11 09:35:45 +02:00
Simon Lübeß 1b8cc93834 Added All-Target to BuildTool 2026-04-10 22:02:13 +02:00
Simon Lübeß 1eeab94575 Start of buildtool 2025-10-23 11:09:48 +02:00
Simon Lübeß 419ed7c9d2 Fixed uninitialized struct 2025-10-22 20:00:04 +02:00
Simon Lübeß 986ffeade0 Moved submodule NetHostBeef 2025-08-24 16:59:50 +02:00
Simon Lübeß c94ffbef64 Made release buildable 2025-08-24 16:54:26 +02:00
Simon Lübeß 7df651103b Custom columns for benchmarking 2025-08-17 03:01:41 +02:00
Simon Lübeß 8f51d1c626 Basic benchmarking 2025-08-17 00:26:16 +02:00
Simon Lübeß fca126c960 Start of test and benchmark 2025-08-11 22:09:54 +02:00
Simon Lübeß 4992511112 No longer add scripts to csproj 2025-08-11 22:09:00 +02:00
Simon Lübeß b94b2afc55 Dev settings for using ScriptCore as either dll or csproj 2025-08-09 23:40:31 +02:00
Simon Lübeß d002dfe25e Automatically set ScriptCore.dll reference in Visual Studio Solution/Project 2025-08-09 19:18:49 +02:00
Simon Lübeß b4f41fc218 Ignore generated files 2025-08-09 10:59:09 +02:00
Simon Lübeß ac0f4dade6 Updated Template for new dotnet runtime
- Added Submodule 'Xml-Beef'
- Use .slnx as solution-file
- Automatically set correct path to ScriptCore in Project files
2025-08-09 01:13:05 +02:00
Simon Lübeß 52cbf9dcf4 Disable circle rendering 2025-08-08 19:12:42 +02:00
Simon Lübeß e57c1c876f Removed unnecessary null terminator 2025-08-08 19:10:40 +02:00
Simon Lübeß 3f83c200f2 Secured struct layout 2025-08-08 19:09:59 +02:00
Simon Lübeß 74243cd285 Added Entity event OnCollisionEnter2D 2025-08-08 19:09:34 +02:00
Simon Lübeß bf03e99e4a Improved style checker 2025-08-08 19:03:31 +02:00
Simon Lübeß d156618453 Fixed calling engine functions from scripts
- Removed mono references in generator
- Implemented StringView type in C#
2025-08-08 19:03:09 +02:00
Simon Lübeß 042ae83a0f Setup ScriptCore to also function as analyzer 2025-08-03 12:01:22 +02:00
Simon Lübeß cc38236184 Try catch in C# Glue Functions called by engine, removed test ThrowException method 2025-08-03 12:00:35 +02:00
Simon Lübeß 184b92e95c StyleChecker works, tests dont 2025-08-03 11:58:27 +02:00
Simon Lübeß 41dacf72b6 Implement test code analyzer 2025-08-01 21:43:22 +02:00
Simon Lübeß c01ccf571e Profiling for starting play mode, fixed unnecessary font loading 2025-07-30 19:00:22 +02:00
Simon Lübeß ed644b5b41 Better engine exception for scripting 2025-07-30 18:58:26 +02:00
Simon Lübeß 72e87ee9ad Extending ScriptGlue now possible 2025-07-27 17:43:00 +02:00
Simon Lübeß 566d39d928 Fixed memory leak 2025-07-27 16:43:34 +02:00
Simon Lübeß 89bb4f4430 Removed C# code generation from beef-side script glue 2025-07-27 16:43:12 +02:00
Simon Lübeß 08846a0c0b Added EngineResult glue type, some cleanup 2025-07-26 21:03:10 +02:00
Simon Lübeß c41425ad36 Include Beef-files in ScriptCore project 2025-07-18 12:41:33 +02:00
Simon Lübeß 28311165ad ScriptEngine work and cleanup 2025-07-18 12:40:44 +02:00
Simon Lübeß 271286fb7e Remove mono from Glue functions 2025-07-17 20:07:19 +02:00
Simon Lübeß f77b153512 Fixed DLL-Import for ImGui.NET 2025-07-17 15:13:21 +02:00
Simon Lübeß f7bcff5337 Script glue works! 2025-07-17 15:07:06 +02:00
Simon Lübeß 0a53ff48f9 More generating script glue 2025-07-17 10:16:58 +02:00
Simon Lübeß edfcfd3b20 Start of using CoreCLR and automatic scriptglue generation 2025-07-14 22:14:41 +02:00
Simon Lübeß 063cbfa415 Fixed assets leaking memory 2025-07-11 12:54:04 +02:00
Simon Lübeß 311deb5bc0 Fixed Assets being registered for two IDs, getting Asset for Id 0 now returns null. 2025-07-11 12:28:09 +02:00
Simon Lübeß c2d330fc8f Handle loading error and placeholder shaders 2025-07-10 14:59:37 +02:00
Simon Lübeß 1b63c922da Asset browser: Copy, cut, paste 2025-07-10 13:31:27 +02:00
Simon Lübeß 39a825634a Path.FindFreePath: Fixed bug when filename is stringview into target string 2025-07-10 13:29:32 +02:00
Simon Lübeß ecfe838ad4 Added basic central popup service and way to highlight settings. 2025-07-08 19:35:40 +02:00
Simon Lübeß 081f7b4a7e Asset Browser: Defer navigation to next frame, show history when right clicking forward/backward button 2025-07-06 19:36:58 +02:00
Simon Lübeß 5f5192b0f4 Fast navigation in "address bar" 2025-07-06 18:52:59 +02:00
Simon Lübeß 3e9c9e8202 Asset Browser: Selection rectangle works with scrolling 2025-07-06 15:15:21 +02:00
Simon Lübeß 1e614eb944 Asset Browser: Handle navigation hotkeys only when directory is hovered 2025-07-06 14:14:39 +02:00
Simon Lübeß 1c97a5e9c4 Asset Browser: No longer show parent directory entry, navigate forward/backword with XButtons 2025-07-06 12:55:09 +02:00
Simon Lübeß 4b91116b51 Asset Browser: Navigation abstraction, show current path 2025-07-06 12:47:17 +02:00
Simon Lübeß 941cc8b767 ImGui: Added typed and scoped style vars 2025-07-06 12:44:59 +02:00
Simon Lübeß 88f6acb336 Selection Rectangle improvements 2025-07-05 22:36:35 +02:00
Simon Lübeß 736c8ce205 Improved entry placement, word wrapping for file names 2025-07-04 10:45:42 +02:00
Simon Lübeß 5cffe34620 Fixed clear selection when navigating or clicking background 2025-07-04 10:44:51 +02:00
Simon Lübeß f3b4fbd628 Spread empty space between directory entries, better parent directory handling, fixed id collision 2025-07-04 01:03:51 +02:00
Simon Lübeß e3c7057dce Basic rectangle selection in content browser 2025-07-04 00:13:33 +02:00
Simon Lübeß b00119b41e Generate ToString for vectors, generate Boolean-Opeartors for boolVectors 2025-07-04 00:13:02 +02:00
Simon Lübeß 9dc6b585bd Use StringView for Path operations 2025-07-04 00:12:19 +02:00
Simon Lübeß 1b46ff779a Remove sleep from delete task 2025-07-03 11:02:30 +02:00
Simon Lübeß c931451f10 Delete hotkey, delte files in background, Alt Up to go back a folder, basic multi select files 2025-06-30 23:14:03 +02:00
Simon Lübeß 300a2f1a8a Refactored (unified) rendering of directory items 2025-06-29 22:22:44 +02:00
Simon Lübeß e9644018ff Show directores before files in asset browser 2025-06-29 22:09:34 +02:00
Simon Lübeß 173942114f The functional remains of drop source 2025-06-29 21:40:55 +02:00
Simon Lübeß 39c9109919 Implemented base class for Com Interface implementations 2025-06-26 23:39:05 +02:00
Simon Lübeß 2cc8889ac1 Refactored DragDrop 2025-06-26 22:35:38 +02:00
Simon Lübeß 5fb8401a1a Renamed property 2025-06-26 19:29:19 +02:00
Simon Lübeß 6ed5f6d943 Added copy filename option to content browser context menu 2025-06-26 18:00:08 +02:00
Simon Lübeß 95ccb597d6 Fixed copying with multiple conflict handling flags,
made canceling and pausing of tasks more robust
2025-06-26 17:51:32 +02:00
Simon Lübeß 05671649b4 Added String.SetF 2025-06-26 17:50:04 +02:00
Simon Lübeß 50bcfa2caf Correctly copy directory hierarchy 2025-06-26 12:55:55 +02:00
Simon Lübeß 108e24eb38 advanced async copy of files 2025-06-26 10:16:39 +02:00
Simon Lübeß bfd1754d14 Fixed memory leak 2025-06-22 20:15:04 +02:00
Simon Lübeß 6af2e49387 Basic copy for drag'n'drop 2025-06-20 21:51:46 +02:00
Simon Lübeß 68745f0515 Retrieve filenames from drop event 2025-06-17 18:08:19 +02:00
Simon Lübeß 60482059a4 Test handle Windows Explorer drag'n'drop in ImGui 2025-06-17 16:46:05 +02:00
Simon Lübeß 9b6bb2b8d8 Made Vectors CRepr 2025-06-17 14:43:26 +02:00
Simon Lübeß 07faafd28d Basic drag & drop 2025-06-17 14:43:06 +02:00
Simon Lübeß 2c0b000afc Improved Texel Grid for Texture Viewer 2025-04-18 14:46:34 +02:00
Simon Lübeß 9d0fb99e3d Fixed mouse picking after gizmo usage
(and discovered more gizmo bugs...)
2025-03-29 15:13:08 +01:00
Simon Lübeß 400045b005 Allow custom resolutions for game window 2025-03-29 15:03:25 +01:00
Simon Lübeß 571bf98be2 Fixed data cycle 2025-03-23 17:46:55 +01:00
Simon Lübeß c34f585bbf Fixed temporary fix 2025-03-22 23:41:28 +01:00
Simon Lübeß 5e50d75eb9 Handle EngineBuffers, Preview Names and variable editor types for materials 2025-03-22 23:40:43 +01:00
Simon Lübeß 77a7a04637 Fixed missing semicolons 2025-03-19 21:15:37 +01:00
Simon Lübeß 6d50208700 Start of material editor 2025-03-03 20:29:35 +01:00
Simon Lübeß 10e8b3c282 Simplified serialization/deserialization of EngineObjects + added support for Assets (actually any EngineObject!) 2025-03-01 00:48:31 +01:00
Simon Lübeß b5088329f5 Texture inheritance for materials, also script access 2025-03-01 00:03:38 +01:00
Simon Lübeß 824c19c0b2 Show texel border and more swizzle options 2025-02-24 23:00:46 +01:00
Simon Lübeß 0236130df1 Fixed crashes due to wrong use of append allocations 2025-02-24 23:00:09 +01:00
Simon Lübeß 28121d1b42 Added component-wise min and max (cmin and cmax) 2025-02-16 01:04:21 +01:00
Simon Lübeß bb52f4c068 Fixes and improvements for Texture Vierwer
- Fixed bug where non-square Textures are render wrong
- Use center of preview area as 0,0
- Reset and Fit to View buttons
2025-02-16 01:04:04 +01:00
Simon Lübeß 49c3e93e08 Manage all Assets with ContentManager 2025-02-16 01:02:41 +01:00
Simon Lübeß 25e1c53a08 Allow resetting material variable 2025-02-14 15:34:33 +01:00
Simon Lübeß 24295731f3 Start of inheriting Materials, create material instance for getMaterial from scripts 2025-02-14 12:39:35 +01:00
Simon Lübeß aaed4199d3 Interact with Materials from scripts 2025-02-14 11:54:07 +01:00
Simon Lübeß e5437c6ff6 Some fixes, improvements for asset drop target 2025-02-14 11:38:39 +01:00
Simon Lübeß 688ebad278 Fixed 2d camera projection for texture viewer 2025-02-11 23:10:05 +01:00
Simon Lübeß 83b12efcff Fixed out of bounds access 2025-02-11 23:09:44 +01:00
Simon Lübeß 7a306cac69 Separate handling for hlsl and fx files 2025-02-11 23:07:04 +01:00
Simon Lübeß 06b981e88a Support materials in 2D Quad Renderer!
- Lost Circle rendering along the way
- Cleaned up 2D shaders
2025-02-11 14:02:16 +01:00
Simon Lübeß 76087d6ba4 Materials kind of working and used in some places
- Also Texture viewer fixes
2025-02-09 01:39:35 +01:00
Simon Lübeß acfb052137 New material loading pipeline almost working 2025-01-31 13:18:49 +01:00
Simon Lübeß 2f0505241f Append allocation and generics fixes 2025-01-31 13:17:12 +01:00
Simon Lübeß 577cca5886 Start of new materials, disable async asset loading 2024-11-30 16:21:00 +01:00
Simon Lübeß cf1f2a9a7b Emit parameterless constructor for vectors 2024-11-30 16:20:29 +01:00
Simon Lübeß bcf75bf8cb Engine barely starts again 2024-11-21 18:16:41 +01:00
Simon Lübeß ad73abd4ea Fixed memory leak when deleting Effect 2024-08-24 20:09:22 +02:00
Simon Lübeß b98de9835d Only hold on to vertex input layout shader code 2024-08-23 23:29:43 +02:00
Simon Lübeß d788853dd3 Cleaned up Shader usings 2024-08-23 23:01:31 +02:00
Simon Lübeß d8b3b137dd Pass VertexShader to VertexLayout, don't reassign layout 2024-08-23 23:00:10 +02:00
Simon Lübeß ff1c6db222 Removed old shader loading stuff 2024-08-22 23:42:16 +02:00
Simon Lübeß 73a6cc0854 Use blocking load method for shaders 2024-08-22 23:25:17 +02:00
Simon Lübeß 66e62f42ec First working effects with new pipeline 2024-08-22 00:34:20 +02:00
Simon Lübeß 7b7a3dc645 Started rewriting shader compilation/processing 2024-08-18 23:30:47 +02:00
Simon Lübeß f3e68bd8d8 Remove obsolete EffectLibrary 2024-08-18 22:54:46 +02:00
Simon Lübeß c908f5a0e7 A little bit better number formatting 2024-06-27 20:50:26 +02:00
Simon Lübeß b96f195afb Clear log on play option 2024-06-23 18:58:40 +02:00
Simon Lübeß bbbbe833df Changed number format in component editor 2024-06-23 18:42:31 +02:00
Simon Lübeß c6eb705977 Drag component window 2024-06-23 18:31:53 +02:00
Simon Lübeß 454ec59951 Use icon buttons for save component and context menu, right click context menu 2024-06-23 17:15:21 +02:00
Simon Lübeß 1b130a4bce Basic save component button 2024-06-23 00:27:20 +02:00
Simon Lübeß cd434d64f9 Better asset processor selection, process subassets 2024-06-13 15:44:27 +02:00
Simon Lübeß 36e98311c6 TextureAsset properties, start of better asset pipeline detection 2024-06-12 16:51:52 +02:00
Simon Lübeß b3dac4a338 Show name of selected object in property window title 2024-06-09 17:12:56 +02:00
Simon Lübeß c8be6eca5c Show error in Properties window, deselect invalid objects in Inspector window 2024-06-09 17:12:42 +02:00
Simon Lübeß 2d5e6a9278 Properties window 2024-06-09 01:44:58 +02:00
Simon Lübeß f61d1bc644 Inspector window to combine asset properties and components editor 2024-06-09 01:16:21 +02:00
Simon Lübeß ace51b396d Fixed crash when assets gets queued for reloading twice 2024-06-09 00:29:15 +02:00
Simon Lübeß 86afa234e7 Texture processor cleanup, new asset properties config UI 2024-06-08 17:03:21 +02:00
Simon Lübeß 8972e607fd Asset Placeholders 2024-06-05 13:54:46 +02:00
Simon Lübeß ff0ac74d12 Moved texture loader from editor to engine 2024-06-03 00:59:01 +02:00
Simon Lübeß 1b38a41dfc Fix dds and texture cube import 2024-06-03 00:46:55 +02:00
Simon Lübeß 108b31399a Use asset pipeline for blocking asset loading, remove old texture loader 2024-06-03 00:46:23 +02:00
Simon Lübeß b2806d9460 Reprocess, load and hot swap changed assets using new asset pipeline 2024-06-02 00:39:22 +02:00
Simon Lübeß 9e7e7f0d76 Asset (de)compression 2024-05-20 16:10:55 +02:00
Simon Lübeß ffe8954b8d Load pngs from cache 2024-05-20 13:35:37 +02:00
Simon Lübeß f0fc67db35 Removed compiler warnings for Runtime.NotImplemented 2024-05-20 13:35:00 +02:00
Simon Lübeß e5139ee3e8 Fixed DepthStencilTarget 2024-05-20 13:34:41 +02:00
Simon Lübeß 1a43ff2971 Convert texture asset and save to cache 2024-05-20 01:08:18 +02:00
Simon Lübeß 2725801db8 Start of asset management 2.0 2024-05-19 01:35:52 +02:00
Simon Lübeß 989ad4a5bd Use dedicated AssetIdentifier instead of string 2024-05-19 01:06:02 +02:00
Simon Lübeß 1fc3b70a50 Fixed memory leak in TextRendererComponent 2024-05-12 19:32:31 +02:00
Simon Lübeß 8c4880f92f Fixed AddComponent for components with Copy function 2024-05-12 19:32:06 +02:00
Simon Lübeß 045281e881 Updated submodule
box2D, freetype and imgui
2024-04-20 22:30:17 +02:00
Simon Lübeß bb7bc41e62 Kind of prevent creating invalid colliders sometimes 2024-04-15 12:35:56 +02:00
Simon Lübeß d1fc33cb6d ScriptCore: Marked EditorFlags as falgs 2024-04-15 00:02:08 +02:00
Simon Lübeß b65bdb84ae ScriptCore: Added Math.remap 2024-04-14 23:57:12 +02:00
Simon Lübeß f30bcb2f89 Slightly improved text renderer 2024-04-14 23:56:09 +02:00
Simon Lübeß 4d0617aff7 Fixed text box losing the last letter 2024-04-13 23:45:04 +02:00
Simon Lübeß a3de5ddc9c Serialization: Support sharing object references 2024-04-13 00:50:09 +02:00
Simon Lübeß 949ab4ebb0 ScriptEngine: Serialize static fields 2024-04-13 00:10:35 +02:00
Simon Lübeß df13aa8596 Refactored Scene serialization 2024-04-12 19:36:01 +02:00
Simon Lübeß d81471419d Refactored script instance serialization and now the refactoring is finally finished... 2024-04-10 14:42:07 +02:00
Simon Lübeß 95262d67d7 Fixed anoying access violation in font desctructor by leaking memory 🤷 2024-04-10 13:51:15 +02:00
Simon Lübeß 9640b153f6 Fixed compile error in some method I'm not sure why, but it wasn't used 🤷 2024-04-10 13:50:40 +02:00
Simon Lübeß f05cf721e8 Almost done refactoring ScriptEngine 2024-04-10 13:50:12 +02:00
Simon Lübeß 777f52ab49 ScriptEngine refactoring 2024-03-31 12:36:22 +02:00
Simon Lübeß abcacc84a9 Refactored ScriptEngine 2024-03-31 11:55:39 +02:00
Simon Lübeß 1279dc0a66 Implemented Copy for physics components 2024-03-28 22:40:53 +01:00
Simon Lübeß 9cee44f4d2 ScriptCore: Fixed error when deserializing list of strings 2024-03-22 10:15:24 +01:00
Simon Lübeß c6c47d0c0e ScriptCore: Implemented Pick-Method and ThreadSafeRandom 2024-03-22 10:14:38 +01:00
Simon Lübeß f8b6c50cda ScriptCore: Type.GetSimpleName and GetPrettyName 2024-03-22 10:13:16 +01:00
Simon Lübeß 94fc620662 EntityEditor: Refactored type dropdown 2024-03-22 10:12:55 +01:00
Simon Lübeß d357f44a39 Jump to correct line when opening script file from log 2024-03-22 10:05:00 +01:00
Simon Lübeß da59fd87f2 Removed sandbox project from workspace 2024-03-17 20:30:51 +01:00
Simon Lübeß d28426478b Font renderer improvements + component for scripting 2024-03-17 20:29:52 +01:00
Simon Lübeß 930d289565 Improved copying of components 2024-03-17 20:28:41 +01:00
Simon Lübeß a2c7bf7d06 Ensure generating unique Entity IDs 2024-03-17 20:25:38 +01:00
Simon Lübeß 84204aed46 No longer crash when selected entity disappears 2024-03-17 20:10:48 +01:00
Simon Lübeß 2dd826fc36 Made entity hierarchy more compact 2024-03-17 18:08:39 +01:00
Simon Lübeß 96609a6c31 FontRenderer: Basic Rich Text processing and lazy text building 2024-03-16 23:35:12 +01:00
Simon Lübeß f9ea705e77 Enum extension for SetFlag and ClearFlag 2024-03-16 23:34:10 +01:00
Simon Lübeß e703452b94 Start of text renderer component
- UC, LC, IC, RC tags
2024-03-14 22:17:57 +01:00
Simon Lübeß a87820c7da Use text height for entity visibility toggle 2024-03-10 15:21:25 +01:00
Simon Lübeß 27c433aba2 Moved play buttons into main menu 2024-03-10 15:16:55 +01:00
Simon Lübeß fc475eb468 Save and copy editor flags with scene. Replaced EditorComponent with DontSafe-flag 2024-03-10 13:11:53 +01:00
Simon Lübeß 72bd152999 Refactor 2024-03-10 13:01:05 +01:00
Simon Lübeß 8d92822845 Added EditorFlags: Hide entities in hierarchy and editor scene
- Also some Style changes
2024-03-10 12:21:20 +01:00
Simon Lübeß 5ca5404f72 Moved template copying from EditorLayer to Project 2024-03-09 20:53:27 +01:00
Simon Lübeß 9ea27a64e8 Modified template and improved template creation 2024-03-09 20:35:21 +01:00
Simon Lübeß 4e9a6b54f3 Friendship ended with VISUAL STUDIO, Now RIDER is my best friend 2024-03-09 20:33:26 +01:00
Simon Lübeß 09624e4e59 ScriptCore: Added NumberFormatAttribute 2024-03-09 01:00:59 +01:00
Simon Lübeß 5dbe1d7e50 ScriptCore: Color structs 2024-03-02 14:19:24 +01:00
Simon Lübeß ba246dd638 ScriptCore: Fixed some nullable warnings 2024-03-02 14:19:02 +01:00
Simon Lübeß caaa7646ef ScriptCore: matrix generator 2024-03-02 13:54:34 +01:00
Simon Lübeß 0a8d83ffb6 Changed Transform Update order 2024-02-26 13:47:29 +01:00
Simon Lübeß 19ee9bee89 Tooltips for Script Editor 2024-02-26 13:46:32 +01:00
Simon Lübeß aa29207e72 Show ImGui DemoWindow in EditorLayer 2024-02-26 13:40:00 +01:00
Simon Lübeß 0a822dcd79 ScriptCore: Added Transform.WorldTransform 2024-02-19 21:39:07 +01:00
Simon Lübeß 1ca9746921 Fixed crash in Logger 2024-02-19 21:38:35 +01:00
Simon Lübeß f5f32eecb2 Vector documentation 2024-02-19 18:17:45 +01:00
Simon Lübeß b84ce5e482 File filter for open and save scene 2024-02-18 00:51:53 +01:00
Simon Lübeß 1340b06af5 Basic asset thumbnails 2024-02-18 00:48:09 +01:00
Simon Lübeß 3b584f2c78 Editor: Show name of script class in script component header 2024-02-17 23:43:39 +01:00
Simon Lübeß 886c4a71dd Editor: Changed color for ImGui MenuBars 2024-02-17 23:32:47 +01:00
Simon Lübeß 86b09c173b Print pretty names and support LabelAttribute for enum cases 2024-02-17 23:32:21 +01:00
Simon Lübeß a07ea3276c ScriptCore: Added LabelAttribute 2024-02-17 23:06:55 +01:00
Simon Lübeß 3c0302b06c Editor: Show pretty script field names 2024-02-17 22:53:58 +01:00
Simon Lübeß 59aaec572b Render 2D with depth, reverse depth of camera projection
dirty fix in Renderer...
2024-02-16 17:31:32 +01:00
Simon Lübeß 0321bd91c4 3D Renderer: inverted depth buffer 2024-02-16 16:14:14 +01:00
Simon Lübeß 2ab4a7d70b Set debug names for directx textures and views in render target group 2024-02-16 16:07:10 +01:00
Simon Lübeß aba7448fe6 Improved collapsing region for PolygonCollider2D vertices 2024-01-30 23:57:07 +01:00
Simon Lübeß 4830fd289e ComponentWindow finalized
ScriptCore:
- ActivatorExtension: Fixed creation of default value or null class
- ImGuiExtension: added DragUIntX / DoubleX and CheckboxX
2024-01-30 23:40:58 +01:00
Simon Lübeß 09f7dfce90 FloatX to Numerics.VectorX converision operators 2024-01-30 23:36:35 +01:00
Simon Lübeß f86d1aa79e Improved UI of component edit window
- Also fixed some errors in list and dictionary editors
2024-01-29 19:46:52 +01:00
Simon Lübeß bae8b84d35 ScriptCore: Added some Random functions 2024-01-27 19:52:42 +01:00
Simon Lübeß 394ec2b9b2 ScriptCore: Added TryGetComponent for entities
also added NullableAttributes for better static null analysis
2024-01-27 19:47:30 +01:00
Simon Lübeß 8ff35d3967 ScriptCore: Added more properties to components
- Added CircleRenderer
- Transform: Added Rotation, RotationEuler, RotationAxisAngle and Scale
- RigidBody: Added BodyType and GravityScale
- Added ColorRGBA
2024-01-27 19:46:37 +01:00
Simon Lübeß bc535ddc26 Get/Set FixedRotation in play mode 2024-01-26 12:51:29 +01:00
Simon Lübeß d4d6cc8e38 Fixed OnCollisionEnter/Leave callbacks 2024-01-26 12:41:37 +01:00
Simon Lübeß 2399196a3a Fixed Collision2D using wrong entities for rigidbodies 2024-01-25 23:36:29 +01:00
Simon Lübeß 4538c38fd7 ScriptGlue error handling 2024-01-25 23:35:56 +01:00
Simon Lübeß 525bb050ef ScriptEngine cleanup 2024-01-25 23:35:40 +01:00
Simon Lübeß d8e4e8d028 ScriptCore: Added Parent property to Transform 2024-01-25 22:29:11 +01:00
Simon Lübeß 3815b70f06 Content Browser: Context menu item to copy path and identifier of assets 2024-01-25 22:28:02 +01:00
Simon Lübeß 7026be1c90 2D Physics and script improvements
- fixed time step
- Fixed crash caused by physics script callback being registered in simulation mode
- Moved 2D Physics config to file
- Finally gave up on the attempt to keep X and Y rotation when applying new Z-rotation from 2D rigidbody to transform and now I can sleep well
- Streamlined starting and stopping of scenes
- Scripts: execute all inits and OnCreates before OnUpdate
2024-01-22 23:19:55 +01:00
Simon Lübeß 7f40ae038a Removed Atan2 from script glue 2024-01-20 21:24:43 +01:00
Simon Lübeß 02be6d8eb7 Log: Also log filename and line number of caller 2024-01-20 21:23:34 +01:00
Simon Lübeß 55eef017e7 AssetBrowser: Bad way to open scripts in Visual Studio 2024-01-20 21:23:01 +01:00
Simon Lübeß 04a0cecf3c Fixed script play mode info 2024-01-18 21:41:18 +01:00
Simon Lübeß c906fc9667 Properly destroy script instances
Now without memory leaks!
2024-01-18 21:29:11 +01:00
Simon Lübeß 9befd9e910 ScriptCore: Added trigonometric functions to Math
I don't know why it claims I changed the entire file...
2024-01-16 13:32:46 +01:00
Simon Lübeß 60b45828c2 ScriptGlue: Added Camera component and throwing mono exceptions from beef 2024-01-15 01:22:52 +01:00
Simon Lübeß ceb4241216 ScriptGlue: Added Log.Exception
- Also pushed missing List Editor fix
2024-01-15 01:21:56 +01:00
Simon Lübeß 49db3a28c8 Fixed deserialization of generic types 2024-01-15 01:18:13 +01:00
Simon Lübeß 19d70c94e6 Added UUID.Zero 2024-01-15 01:16:30 +01:00
Simon Lübeß ba68eb7428 Editor: Show name of open scene in window title 2024-01-12 15:41:56 +01:00
Simon Lübeß 827f3bb564 EntityHierarchyWindow: Dragging entites no longer selects them 2024-01-12 15:32:21 +01:00
Simon Lübeß 6c910ab03b Editor: Prevent saving while in not in edit mode 2024-01-12 00:31:10 +01:00
Simon Lübeß 55b4be05c2 ScriptCore: Properly use nullable 2024-01-12 00:17:40 +01:00
Simon Lübeß 3d0c010139 EntityHierarchyWindow: Fixed right click deselecting entities 2024-01-11 23:36:00 +01:00
Simon Lübeß 91cef7ad4b Added checkbox to enable and disable polygon collider vertex handles 2024-01-11 22:55:40 +01:00
Simon Lübeß 7cdc398494 Added basic decimal editor 2024-01-11 22:55:18 +01:00
Simon Lübeß 99a12a118c Fixed Script data for entity copying 2024-01-09 13:41:54 +01:00
Simon Lübeß b93e081e0a Fixed URL of Submodule Box2D 2024-01-08 14:37:14 +01:00
Simon Lübeß 86139f870c ScriptCore: Cleanup and refactoring
A bit of nullable stuff
2024-01-07 23:56:44 +01:00
Simon Lübeß bfc9d4a0a5 Save and Load script data from files 2024-01-07 18:35:33 +01:00
Simon Lübeß a302a26f80 Moved SerializationType and Object to separate files 2024-01-06 13:27:24 +01:00
Simon Lübeß 9a09a1d878 ScriptCore: Escape sequence for char editor 2024-01-06 13:17:23 +01:00
Simon Lübeß 31e7edcc9c ScriptCore: Open newly created dictionary entry 2024-01-06 13:16:36 +01:00
Simon Lübeß 5d9973a791 ScriptCore: Add Entry for dictionaries 2024-01-06 13:12:50 +01:00
Simon Lübeß 13baf2f4bc ScriptCore: Show Custom Editor
Implemented basic Dictionary editor
2024-01-05 15:46:54 +01:00
Simon Lübeß 9da675e4bb Use delegates for custom serializers 2024-01-05 14:34:11 +01:00
Simon Lübeß a5e767df01 Enabled nullable for ScriptCore 2024-01-05 14:33:50 +01:00
Simon Lübeß 3de861110e Custom Serializers
- Dictionary serializer
2024-01-05 13:37:58 +01:00
Simon Lübeß 16f4dd349b Serialize and Deserialize Lists and 1D-Arrays 2024-01-01 13:03:34 +01:00
Simon Lübeß c111fff32b ScriptCore: Added extension Type.IsAssignableTo 2024-01-01 13:02:50 +01:00
Simon Lübeß 19fb969718 ScriptCore: Added custom debug display for UUID 2024-01-01 13:02:34 +01:00
Simon Lübeß e5f2da66a9 ScriptCore Fixed CreateInstanceSafe(Type type, params object[] args) 2024-01-01 13:02:15 +01:00
Simon Lübeß 418aa71241 ScriptCore: Fixed adding element to arrays 2023-12-31 17:22:04 +01:00
Simon Lübeß beb696ee5d Added basic ArrayEditor 2023-12-31 17:10:17 +01:00
Simon Lübeß ed3884e30e ScriptCore: Made creation of class instance safer 2023-12-31 17:05:27 +01:00
Simon Lübeß bd72a67d29 Fixed List add/remove element buttons not working 2023-12-31 17:01:23 +01:00
Simon Lübeß 9e222daeb2 ScriptCore: Fixed deserialization of null values 2023-12-28 23:05:49 +01:00
Simon Lübeß 34ddfc11f7 Update Submodule DirectX 2023-12-28 22:56:29 +01:00
Simon Lübeß 5051829753 Split up, clean up and internalize EntitySerializer 2023-12-28 22:50:24 +01:00
Simon Lübeß 2fc45a50e0 ScriptCore: Fixed component and entity reference serialization 2023-12-28 22:40:59 +01:00
Simon Lübeß 2e82f24fd7 Initialize ScriptGlue whenever ScriptEngine loads assemblies 2023-12-26 02:01:14 +01:00
Simon Lübeß a4c311c2e4 Implemented Entity and Component Drop-Targets and added Name property for entities
- Also fixed non generic GetComponent
- Use UUID as Drag-Drop value for entities
- Removed unused methods from ComponentEditWindow
- Started a marginally type-safe version of ImGui.Payload
2023-12-26 02:00:44 +01:00
Simon Lübeß 4fa6384544 Fixed ScriptCore post build script to enable hot reloading for ScriptCore 2023-12-26 00:42:09 +01:00
Simon Lübeß 2f86f751a4 Serialize Enums (and maybe Entitiy/Component refs) 2023-12-25 21:46:19 +01:00
Simon Lübeß 215e1f6500 Catch Activator exceptions 2023-12-25 20:25:55 +01:00
Simon Lübeß acefbb58bd Serialize/Deserialize simple classes 2023-12-25 20:08:48 +01:00
Simon Lübeß 7bd69c162f Fixed serialization of null-strings 2023-12-25 18:58:06 +01:00
Simon Lübeß 20814a61b6 Fixed memory leak in AssetFile 2023-12-25 16:30:58 +01:00
Simon Lübeß abb119589c Reload scripts in Play Mode!!!
- Dont serialize static fields
- Added some profiling to ScriptEngine
- Removed superseded ScriptFieldMaps
2023-12-24 01:33:48 +01:00
Simon Lübeß d0f0a34247 Start of Script Instance deserialization
- Also deserialize when stopping the game to restore pre play state
- Fixed ancient bug where ClearDictionaryAndDeleteKeys falsly deletes the dictionary
- Added ClearDictionaryAndDeleteValues helper mixin
2023-12-24 01:30:01 +01:00
Simon Lübeß c9116812b4 Serialize Data 2023-12-23 00:44:04 +01:00
Simon Lübeß a6f68a59d6 Moved basic ScriptEngine classes into separate object 2023-12-22 19:11:40 +01:00
Simon Lübeß 424e995fae ScriptCore: Made trivial pointer stuff complicated to fix some warnings 2023-12-18 01:44:44 +01:00
Simon Lübeß 4b30fc1a69 ScriptCore: Fixed nullable warning 2023-12-18 01:43:23 +01:00
Simon Lübeß 203e8c4ddb ScriptCore: Generate GetHashCode for Vectors
Fixes warnings
2023-12-18 01:43:02 +01:00
Simon Lübeß 945a0e5603 Fixed Half 2023-12-17 19:23:19 +01:00
Simon Lübeß 3a3778651d ScriptCore: Moved Physics2D into Physics namespace 2023-12-17 18:47:29 +01:00
Simon Lübeß 6a87d1ac09 ScriptCore: Use engine implementation of half to no longer rely on Half-Package 2023-12-17 18:47:07 +01:00
Simon Lübeß 64f7896c15 Updated ImGui to 1.90.1 2023-12-17 02:22:04 +01:00
Simon Lübeß 89e4e4ef17 Start of entity serialization 2023-12-15 14:53:31 +01:00
Simon Lübeß b884ee8303 Moved Components to their respective namespaces 2023-12-15 14:53:10 +01:00
Simon Lübeß 66281ebddb Added icon for editor 2023-12-15 14:52:19 +01:00
Simon Lübeß a129156641 Documentation 2023-12-13 14:45:33 +01:00
Simon Lübeß ed756f5847 Fixed scripts OnUpdate not being called in play mode 2023-12-13 14:01:23 +01:00
Simon Lübeß 4a2635a8c3 ScriptCore: Moved Component + Doc 2023-12-13 14:00:27 +01:00
Simon Lübeß 105ff57206 Merge branch 'main' of github.com:aharabada/glitchy-engine-beef 2023-12-12 13:38:47 +01:00
Simon Lübeß e69e1b5526 Show Buttons in entity editor
- ScriptEngine: Added HasCustomAttribute- extension method
- ScriptEngine: Added Application class
2023-12-12 13:38:29 +01:00
aharabada 4ed3dcf96f Update README.md 2023-12-12 02:34:06 +01:00
Simon Lübeß 13cb043cf4 Removed TODOs related to native script component (which was removed) 2023-12-10 12:52:49 +01:00
Simon Lübeß bedbc696c3 ScriptCore: Added UUID.CreateNew 2023-12-10 12:50:11 +01:00
Simon Lübeß 1238a43896 Start and Stop script runtime for editor scene 2023-12-03 14:06:40 +01:00
Simon Lübeß aaa48158c3 Removed script editor from beef side 2023-12-02 00:40:17 +01:00
Simon Lübeß 5852e11ccb Start of edit mode scripts
- Initialize script instances in edit mode
- Run OnCreate and OnUpdate for Entities with RunInEditMode-Attribute
2023-12-02 00:28:04 +01:00
Simon Lübeß 23b38a7a31 Removed references to nonexistent files/folders 2023-12-01 23:52:16 +01:00
Simon Lübeß dc551fb85c Remove native script component 2023-12-01 23:51:53 +01:00
Simon Lübeß df6b522741 Improved postbuild script for ScriptCore: Automatically create target directory 2023-12-01 23:45:02 +01:00
Simon Lübeß 8f93e1e0e5 Ignore ScriptCore build output 2023-12-01 23:22:41 +01:00
Simon Lübeß 48cdcee8a8 Fixed null pointer exception in ShowScriptEditor when script component has no instance 2023-12-01 23:14:51 +01:00
Simon Lübeß 270e34b983 Fixed list of struct drag and drop, added context menu to remove list entries 2023-12-01 23:14:19 +01:00
Simon Lübeß df446188b6 Add support for strings and BoolX in script engine, show strings as textfields in editor 2023-12-01 23:13:30 +01:00
Simon Lübeß b68bad5bda Keep Entities selected when switching between Play- and Edit-Mode
- Fixed the check whether all selected entities have the same parent
2023-11-29 14:16:36 +01:00
Simon Lübeß 0257b93c7b Move List elements via Drag and Drop 2023-11-22 19:28:02 +01:00
Simon Lübeß 872a400966 Scripts: More range attributes for fields
- Added Minimum- and Maximum attributes
- Documentation for Min, Max and Range
- EntityEditor: Refactoring + Range Attributes
2023-11-22 01:59:57 +01:00
Simon Lübeß ffe86a18cf Scripts: First implementation of Range- and Readonly-Attributes + added support for all primitive types 2023-11-22 00:57:18 +01:00
Simon Lübeß 881bb8ee51 Scriptengine: Support char-type 2023-11-22 00:55:07 +01:00
Simon Lübeß 05350d4768 Renamed EditfloatX to EditFloatX 2023-11-22 00:54:43 +01:00
Simon Lübeß 8127884b50 Improved List editor and added Enum editor, fixed changed fields not updating 2023-11-18 18:06:13 +01:00
Simon Lübeß 18867fd208 Scripting: VectorGeneratorgenerate Equals methods 2023-11-18 18:03:14 +01:00
Simon Lübeß 849a8582f6 Scripting: Added Log functions to print objects 2023-11-18 18:02:37 +01:00
Simon Lübeß f28eabf807 Fixed mono not finding assemblies like linq, etc. 2023-11-18 17:56:09 +01:00
Simon Lübeß 060d1ae6fc Scripting: Implemented Equals and GetHashCode for UUID 2023-11-18 16:45:46 +01:00
Simon Lübeß 24365ec477 Call correct UUID constructor for Entities, fixed crash and weirdness when Scripts have fields that are classes
Let's not talk about the fact that this was a one line fix all along...
2023-11-18 02:05:55 +01:00
Simon Lübeß 214889470f Scene: Set ScriptEngine Context (Scene) when copying entities
Fixes invalid access when constructors throw exceptions
2023-11-18 02:00:11 +01:00
Simon Lübeß 2a4eac814b ScriptGlue: Changed signature of Entity_GetScriptInstance 2023-11-18 01:59:10 +01:00
Simon Lübeß 1a92f4aec1 Started reworking entity initialisation 2023-11-18 01:04:12 +01:00
Simon Lübeß 02a2ccb6f9 Copy ScriptCore dependencies to output, EntityEditor: Start of lists 2023-11-16 18:32:13 +01:00
Simon Lübeß d2972d1b03 Updated submodule "gltf" 2023-11-15 16:25:12 +01:00
Simon Lübeß d718c6625d Allow separators in "Create new Asset" dropdown (also changed text to just "Create new") 2023-11-15 16:23:22 +01:00
Simon Lübeß 6f1467046d Tried EntityEditor in C# 2023-11-10 12:41:58 +01:00
Simon Lübeß b41eaad788 Disposable Rigidbody2D 2023-10-28 21:48:56 +02:00
Simon Lübeß 38fc1f63b3 Small script engine improvements
- Fixed script class name not visible in Component Editor
- Retain user assembly file system watcher (fixed deletion while handling events)
- Fixed crash when a scritp constains a List or Array (by ignoring them for now)
- Fixed Typo in Genericinst
- Scene: Invoke OnCreate for copied entity scripts
2023-10-28 21:48:43 +02:00
Simon Lübeß 909012f518 Moved Script Solution (.sln) to project root
- Updated vswhere.exe
- Scripts created via Asset browser are now being added to the project
- Fixed Apply not being called for extended Settings
- Correctly wrap New File preview only when line full
- Create Project: Show warning, when target directory already exists
2023-10-27 22:29:10 +02:00
Simon Lübeß 3d8756ec42 Added context menu entry to create C#-Scripts.
Allow entering file name before creation
2023-10-19 19:27:01 +02:00
Simon Lübeß bad7b08046 EditorContentManager: Fixed asset reloading
(thats why unit tests exist... or at least types...)
2023-09-29 18:56:37 +02:00
Simon Lübeß d32bc6c475 Properties Window: Combined "Save"- and "Apply"-Buttons into one "Save"-Button 2023-09-29 18:51:21 +02:00
Simon Lübeß 688046fcf9 Scripting: Create Rigidbodies and Colliders during runtime 2023-09-21 15:10:20 +02:00
Simon Lübeß 446dc2ca2a Scripting: Basic copying of entities during runtime + Reference Components using UUID 2023-09-21 14:23:00 +02:00
Simon Lübeß ba54d48dfe Fixed referencing entities and components that are not the script owners entity 2023-09-16 22:14:52 +02:00
Simon Lübeß 754c149493 Entity Creation and Destruction from scripts
- ScriptEngine: Allow destroying scripts during runtime
- Scripting:
    - Create new entities using Constructors
    - Added Destroy functions for Entities
    - Added SetScript/RemoveScript functions for Entities
    - Allow adding multiple components at once
    - Added Is-Method
- Mono Wrapper: Added Array-Functions
- WorldEnumerator: Fixed crash due to dangling list pointer after entity creation
- Scene:
    - Basic create Rigidbodies during runtime
    - Start of entity copying (For runtime use)
    - Added DestroyEntityDeferred
- SceneSerializer:
    - Added option to assign new IDs to entities
2023-09-15 23:22:27 +02:00
Simon Lübeß ff54eb738e UUID: Removed empty constructor, added static Create-Function 2023-09-13 13:14:54 +02:00
Simon Lübeß 370eaf9bc7 Skip CMake compiler testing 2023-09-13 01:02:13 +02:00
Simon Lübeß 5af174ecee ScriptCore: atan2 2023-09-05 23:15:48 +02:00
Simon Lübeß 7bffd01401 Rigidbody2D Get/Set Linear and Angular Velocity 2023-09-05 23:15:33 +02:00
Simon Lübeß cd333f4f02 EditVector: Allow Disabling individual components
+ Disable XY-Angle when Entity has Rigidbody2D Component (This is something for future me, I couldn't figure it out...)
+ Start of handling of non trivial tranform nesting and rotations on XY axes
+ TranformComponent.RotationEuler: Normalize quaternion before converison
2023-09-05 23:14:51 +02:00
Simon Lübeß 2f58f0e142 Renamed RigidBody2D to Rigidbody2D
+ Math.normalize(Quaternion)
+ Position and Rotation properties for Rigidbody2D
+ use In, Out on beef side in ScriptGlue
2023-09-03 19:42:50 +02:00
Simon Lübeß 0165279220 Implemented "Open recent Project" menu entry
+ Clean up handle -> asset map when chaning Asset or Resource directory
2023-08-21 14:11:51 +02:00
Simon Lübeß 3affb8a32f Scripting: Added Set and GetPosition to Rigidbody2D
+ Vectors: Hide swizzles in Debugger + Generate ToString
2023-08-21 13:20:12 +02:00
Simon Lübeß d3c19dd8da 2D Polygon Collider editor with Gizmos
+ Added Handles class
2023-08-21 13:18:51 +02:00
Simon Lübeß 377997f903 Fixed mouse wrapping to wrong position when window is moved 2023-08-14 23:56:43 +02:00
Simon Lübeß d7201299c7 Fixed physics only simulation
+ Don't run scripts in physics only mode
+ Don't initialize scritps in physics only mode
+ Don't setup physics callbacks in physics only mode
2023-08-14 22:38:55 +02:00
Simon Lübeß a112fcc64a Automatic switch between Player <-> Editor Tabs
+ Allow Editor to inject into Settings
2023-08-14 22:10:27 +02:00
Simon Lübeß f71e851ab5 Push Loggers earlyer to hopefully avoid race condition
+ Fix null check in EditorLogger
2023-08-14 22:09:35 +02:00
Simon Lübeß 040e87d57f Fixed Selection and Deletion in Entity Hierarchy Window 2023-08-14 14:32:58 +02:00
Simon Lübeß 74b17c8599 2D Polygon Collider 2023-08-13 12:03:06 +02:00
Simon Lübeß 4e5d3cfd64 Add OnCollisionLeave2D 2023-08-10 22:07:58 +02:00
Simon Lübeß b28ca14e15 Updated Box2D 2023-08-10 20:38:49 +02:00
Simon Lübeß aafcc41286 Invoke on collision enter + start of attach child colliders to rigidbody
+ Changed default Namespace of ScriptCore to GlitchyEngine
+ Implicit Casts float2 <-> b2Vec2
+ Entity constructor internal
+ Renamed RigidBody2D to Rigidbody2D (notice the B)
+ Basic Debug Draw actual 2D Colliders
+ Added Entity::GetParentWithComponent
2023-08-10 19:55:45 +02:00
Simon Lübeß 987246a806 Asset Drag'n'Drop preview 2023-08-02 14:59:35 +02:00
Simon Lübeß f654a4f379 Fixed AssetHierarchy not updating + Drag'n'drop Files in Asset Browser 2023-08-02 13:48:06 +02:00
Simon Lübeß 92334d8150 Hide obsolete Application.Get() 2023-08-02 00:08:30 +02:00
Simon Lübeß 0101f546a5 Use InvokeOnMainThread for asset tree updates 2023-08-02 00:08:17 +02:00
Simon Lübeß 6c4ac923c6 Asset renaming + AssetHierarchy: major refactoring for file tree construction
+ AssetFile: Added "AssetConfigPath" Property
+ Less crashy, more cleaner
2023-08-01 23:56:52 +02:00
Simon Lübeß 51441f0e70 Fixed memory leak 2023-08-01 23:20:25 +02:00
Simon Lübeß d2600c7517 Fixed Race-Condition in SamplerStateManager 2023-08-01 22:50:09 +02:00
Simon Lübeß 60725c3588 Universal AssetHandles. Serialize AssetHandle instead of AssetIdentifier
A bit unstable
2023-08-01 21:38:54 +02:00
Simon Lübeß 6d7f26b1f4 Added "Create new Folder" to Asset Browser context menu 2023-08-01 16:45:54 +02:00
Simon Lübeß b1f89a345f Deletion of Assets and Directories 2023-08-01 16:45:33 +02:00
Simon Lübeß 253dd8087e Added option to create Materials in Asset Browser 2023-08-01 16:24:31 +02:00
Simon Lübeß e8a5594540 Allow changing Effect of Materials
+ TextureDimension Property for Texture
2023-08-01 13:28:04 +02:00
Simon Lübeß 5d8c1b111a Project user settings, load recent scenes, properly cleanup ScriptEngine when switching scenes 2023-07-31 20:09:56 +02:00
Simon Lübeß 3298053d9d Fixed Asset Drag'n'Drop 2023-07-31 20:07:12 +02:00
Simon Lübeß adccb74f44 Editor Layer cleanup 2023-07-31 18:48:36 +02:00
Simon Lübeß 97113b5df6 Start of Create Asset Context Menu
+ Asset Hierarchy: Fixed Assets in Folder-Root not being shown
2023-07-31 17:40:05 +02:00
Simon Lübeß c374d86ec7 Cleanup 2023-07-31 16:40:27 +02:00
Simon Lübeß 803fd7f8ba Fixed crash when ScriptComponent has no Instance in Play Mode 2023-07-31 16:36:02 +02:00
Simon Lübeß 11a57f5285 Fixed ComponentEditWindow showing component editor after it was deleted 2023-07-31 16:35:38 +02:00
Simon Lübeß 0d015b485e Basic project creation
+ Added TreeNode.RemoveChild
+ Added Directory.Copy
+ Path.Combine now replaces alt directory separator
+ Project: Renamed ProjectName to Name
+ Project.Load: Save settings, if file doesn't exist
2023-07-31 16:35:12 +02:00
Simon Lübeß 17e4a6a589 Updated Beef.Linq 2023-07-30 20:32:19 +02:00
Simon Lübeß c1a87ed946 Separated Assets to Resources (Engine assets) and Assets (Project specific)
+ AssetHierarchy: Exposed RootNode
+ ContentBrowserWindow: Fixed Empty Folder not being Leaf-Node
+ TreeNode: Added IsParentOf, IsChildOf and IsInSubtree.
    + Fixed InternalDeleteTreeAndChildren for null trees
2023-07-30 20:30:06 +02:00
Simon Lübeß 20dae92be7 Fixed Assets having scrollbars in content browser 2023-07-30 13:55:50 +02:00
Simon Lübeß df67f32399 Start of project system
+ added Directory.IsEmpty
2023-07-30 13:23:34 +02:00
Simon Lübeß 14a802d057 Added new line to EditorLogger 2023-07-30 13:21:33 +02:00
Simon Lübeß 12d6df3edf Fixed crash when AssetViewer has size of 0 (RTFM) 2023-07-29 18:54:45 +02:00
Simon Lübeß 2838449186 Ignore MonoDebugger.log 2023-07-28 21:15:23 +02:00
Simon Lübeß 75513bea3d Removed obsolete texture viewer 2023-07-28 21:09:33 +02:00
Simon Lübeß 16c3d7c44d Updated ImGui 2023-07-28 13:38:59 +02:00
Simon Lübeß 7ae069baf6 Fixed loading UI font 2023-07-28 12:26:15 +02:00
Simon Lübeß 00dc3faa19 Failed to show and edit script sctruct
+ SizeInBytes for MonoFields
2023-07-28 11:48:01 +02:00
Simon Lübeß f39acdadb3 Show enum fields in Edit mode 2023-07-28 00:07:10 +02:00
Simon Lübeß 1254d01545 Handle exceptions from C# Scripts + Log window + EditorLogger
+ Renamed Platform/DX11/ImGui.bf to .../Dx11ImGui.bf for clarity
+ ImGuiExtension: ImageButtonEx thata takes a TextureViewBinding
+ EditorLogger that logs to the LogWindow
+ Current logger can now be changed
+ Info, Trace, Warning and Error Icons
2023-07-27 21:58:42 +02:00
Simon Lübeß 0bc517842f Allow changing logger 2023-07-27 00:42:42 +02:00
Simon Lübeß 3e63281508 Fixed mono debugging... 2023-07-26 22:56:43 +02:00
Simon Lübeß ef486b7082 Basic entity highlighting 2023-07-25 19:37:13 +02:00
Simon Lübeß 81a61d5a90 Drag'n'drop for components
+ Added CreateInstance to ScriptClass
+ Added CreateComponentInstance to ScriptInstance
2023-07-25 16:37:41 +02:00
Simon Lübeß 37197cbdf1 Allow dragging and dropping of Entities in editor
+ New Dictionary Helpers
+ Made ImGui Payloads safer
+ Start of Component drag'n'drop
2023-07-24 23:17:00 +02:00
Simon Lübeß b53ed2d8f2 Made script deserialization more robust 2023-07-24 21:28:58 +02:00
Simon Lübeß 457b43352a Debugging, but it doesn't work for some reason 2023-07-21 16:16:24 +02:00
Simon Lübeß cc7fb7311f Added single step for simulation and play mode
+ Added ManualStepTime to GameTime
2023-07-20 23:21:21 +02:00
Simon Lübeß 5f27b8001a Automatic script assembly reloading 2023-07-20 22:11:11 +02:00
Simon Lübeß 0cbb8a4966 Fixed C# -> Beef Type mapping 2023-07-20 17:53:32 +02:00
Simon Lübeß 79adc70f01 Gitignores and missing updates to scripts 2023-07-20 17:51:06 +02:00
Simon Lübeß 78ba016b03 Log Exceptions in thrown by Script OnUpdate-Function 2023-07-20 17:48:50 +02:00
Simon Lübeß 3e55a1614a Shader like vectors for C# Scripting 2023-07-20 17:48:28 +02:00
Simon Lübeß f0de874572 Start of generate vectors for C# 2023-07-19 18:43:26 +02:00
Simon Lübeß 6e02a04a4f Changed ScriptCore to DotNet Standard 2.0 2023-07-19 15:45:36 +02:00
Simon Lübeß cd1562f372 Basic Script reloading
+ ScriptComponent now saves script name instead of direct ScriptClass reference
+ Added ClearDictionaryAndDeleteKeys helper
+ Moved ScriptFieldType to separate file
+ _ScriptFieldMap now uses String as Key
2023-07-18 22:06:34 +02:00
Simon Lübeß e8505f6bdb Scripting: FindEntityWithName and get script instance
+ Some C# UUID stuff
+ Added some Mono functions
+ ScriptEngine:
  + ID -> ScriptInstance map in ScriptEngine
  + GetManagedInstance

+ Fixed Scene not visible after loading a new scene
  + Renamed OnViewportResize to SetViewportSize for Scene and SceneRenderer
2023-07-17 20:27:18 +02:00
Simon Lübeß 66d66d3308 Serialize script fields in "array" + more forgiving deserialization 2023-07-17 04:04:01 +02:00
Simon Lübeß 88b393157a Make sure we always initialize with a scene 2023-07-17 04:00:30 +02:00
Simon Lübeß 28155ec92c Allow opening a scene on launch
+ don't resize on load/new scene
2023-07-17 02:19:49 +02:00
Simon Lübeß 1641bafd06 Don't instantiate scripts for Editor + ScriptComponent Serialzation + Don't crash when scene loading failed 2023-07-17 01:27:58 +02:00
Simon Lübeß 76bff3a6c1 Texture importer now supports mip maps 2023-07-06 17:06:59 +02:00
Simon Lübeß a507eeb1cd Kind of fixed a memory leak 2023-07-01 12:49:17 +02:00
Simon Lübeß 77c45db122 Replaced IntX by intX, Basic AssetViewer (can view Textures, kind of) 2023-07-01 00:15:01 +02:00
Simon Lübeß e12fcaacff Added Math min/max for float 2023-06-28 22:03:43 +02:00
Simon Lübeß b31d43820a Support emissive materials 2023-06-28 19:33:39 +02:00
Simon Lübeß 334c2c0366 Search in Content Browser (and added ForEach in TreeNode) 2023-06-28 19:27:52 +02:00
Simon Lübeß bb520b43ec Added support for Cube Textures, Improved dds import (and textures in general), Texture refactoring and DX11 DeviceContext synchronization 2023-06-25 17:58:16 +02:00
Simon Lübeß 46693666aa Fixed current directories context menu not opening
i.e. when right clicking the background of the current directory
2023-06-25 03:20:35 +02:00
Simon Lübeß 9e1f648aa0 Transitioned from VectorX to floatX
And some trying to update Rigidbody when transform changes
2023-06-25 02:47:33 +02:00
Simon Lübeß 5f5da2ed35 Moved vector type files 2023-06-25 01:11:06 +02:00
Simon Lübeß fa2277cd99 Start of shader like vectors + added 16 bit float 2023-06-24 23:45:56 +02:00
Simon Lübeß 54936d5744 Fixed crash when viewport size is negative 2023-06-24 13:07:07 +02:00
Simon Lübeß 04d69717a3 Automatically pull and build mono once + .gitignore 2023-06-18 21:03:59 +02:00
Simon Lübeß 3becc1e25b fixed Settings-File not being created and start of Recent-Projects-Menu 2023-06-18 16:05:03 +02:00
Simon Lübeß e8e6207bc1 Merge branch 'scripting' of github.com:aharabada/glitchy-engine-beef into scripting
# Conflicts:
#	GlitchyEngine/src/Scripting/ScriptClass.bf
#	GlitchyEngine/src/Scripting/ScriptEngine.bf
#	GlitchyEngine/src/Scripting/ScriptInstance.bf
#	GlitchyEngine/src/World/Scene.bf
#	GlitchyEngineHelper/src/Mono/Mono.bf
2023-06-18 14:33:28 +02:00
Simon Lübeß f4c5bf9c2d Added binding for mono_field_get_value_object 2023-06-18 14:24:26 +02:00
Simon Lübeß f4607a6210 Script default values after init, Fix memory leak, Copy Script values on Play 2023-05-31 14:38:07 +02:00
Simon Lübeß 6a59deb9e2 Weiß ich nicht, ist Monate her... 2023-05-30 16:54:57 +02:00
Simon Lübeß ac1817fe33 Weiß ich nicht, ist Monate her... 2023-05-30 16:52:27 +02:00
Simon Lübeß 5855b13873 Wer weiß, was ich alles so gemacht hatte...
- Fixed crash caused by early ScriptEngine shutdown
2023-05-30 16:50:22 +02:00
Simon Lübeß ef5e4ba64f Fixed ScriptClass leaking 2023-03-30 15:13:21 +02:00
Simon Lübeß 4fd9a924a0 Added basic component access in Scripts 2023-03-29 16:32:46 +02:00
Simon Lübeß e60d74fccd Basic entity scripting 2023-03-29 13:33:34 +02:00
Simon Lübeß 5e5134a607 Added Mono for C# scripting 2023-03-26 13:11:44 +02:00
Simon Lübeß fd6826785a Updated submodules again? 2023-03-25 13:24:50 +01:00
Simon Lübeß 43bcf01299 Merge branch 'asset_handle' into main 2023-03-25 13:20:40 +01:00
Simon Lübeß 81ae5f1135 Updated submodules 2023-03-25 13:19:59 +01:00
Simon Lübeß 0ee2f5fa9e Merge branch 'asset_handle' into main 2023-03-25 13:15:56 +01:00
Simon Lübeß b76d4cd558 Merge remote-tracking branch 'origin/asset_handle' into asset_handle 2023-03-25 13:04:52 +01:00
Simon Lübeß 5893cfb74a Refactor 2023-03-25 13:04:02 +01:00
Simon Lübeß ed952155b6 Refactor 2023-03-25 00:41:34 +01:00
Simon Lübeß d54cdf43ee Simulation mode and pause/resume 2023-03-24 23:50:46 +01:00
Simon Lübeß f16fbc3984 Separated window for game and editor 2023-03-24 22:48:55 +01:00
Simon Lübeß 184480243f Collider rendering 2023-03-24 19:13:32 +01:00
Simon Lübeß fc1875ed96 Added Line batch rendering 2023-03-24 12:54:46 +01:00
Simon Lübeß 5733166b74 Fixed uint render targets always being cleared to zero 2023-03-19 12:49:12 +01:00
Simon Lübeß 2ba4b68e09 Split up sprite and circle renderer component 2023-03-19 12:19:22 +01:00
Simon Lübeß edcec02e94 Fixed AssetHandle serialization
- Serialize MeshComponents
- Fixed handling renamed files
2023-03-19 01:04:32 +01:00
Simon Lübeß c164aeecaa Copy scene when entering play mode 2023-03-18 23:30:57 +01:00
Simon Lübeß 793aa40975 Add up button und split scrolling in content browser
- Add Parent to TreeNode
- Start of Rename handling
2023-03-18 19:59:56 +01:00
Simon Lübeß 50714976e9 Start of async asset loading
- Refactored content manager and asset loaders
- Asset placeholder
- Error asset
2023-03-18 18:59:30 +01:00
Simon Lübeß 7b6662cbc4 Fixed Textures in Materials 2023-03-16 23:32:02 +01:00
Simon Lübeß cfa046d2ea Refactored EditorContentManager 2023-03-16 23:31:19 +01:00
Simon Lübeß b22f73a156 Handles barely work now, mostly no crashes 2023-03-16 17:57:23 +01:00
Simon Lübeß c3fb9bbd5d More asset handles 2023-03-13 20:35:36 +01:00
Simon Lübeß c22d122921 Start of asset handles 2023-03-13 20:35:30 +01:00
Simon Lübeß ad14c9f6ed AssetHandle Code snippets for design reference 2023-03-13 15:56:31 +01:00
Simon Lübeß 2ce357cd12 Basic material serialisation 2023-03-05 16:38:50 +01:00
Simon Lübeß 2324ae852d Moved material editing from component window to asset editor
- EditorContentManager now returns null if asset wasn't found (instead of crashing)
- FixUp asset identifier when dragging from asset browser
- Lock current asset in properties editor
2023-01-08 20:31:43 +01:00
Simon Lübeß d3d284256c Fixed WorldEnumerator crashes if one of the components doesn't exist 2023-01-08 20:29:06 +01:00
Simon Lübeß e38373dccf Serialize Mesh and MeshRenderer in scene + fixed Light serialization 2023-01-08 19:31:01 +01:00
Simon Lübeß b5ca86d8de Fixed scope of full path 2023-01-08 16:48:38 +01:00
Simon Lübeß 4589030da6 Load effects via content manager + virtual InitContentManager in App 2023-01-08 00:17:04 +01:00
Simon Lübeß 3da60355df Model and Material loading via content manager 2023-01-07 12:15:14 +01:00
Simon Lübeß ee30920b56 Crappy hot reloading of textures and Properties editor for textures 2023-01-03 22:21:26 +01:00
Simon Lübeß 427323744b Fixed Sampler State filters + Documentation 2023-01-03 22:18:43 +01:00
Simon Lübeß 9d97579857 More content browser stuff
- Seperate AssetHierarchy from EditorContentManager
- Make files selectable and context menu
2023-01-02 20:00:48 +01:00
Simon Lübeß fdf680508d Don't recreate the entire asset tree 2023-01-01 18:25:36 +01:00
Simon Lübeß 0b3f242082 Added Submodule "Beef.Linq" 2023-01-01 18:18:27 +01:00
Simon Lübeß 502cee47e7 EditorContentManager Part 2 2023-01-01 16:53:58 +01:00
Simon Lübeß c389a77274 EditorContentManager Part 1 2023-01-01 16:53:45 +01:00
Simon Lübeß dffd43a36f RenderAPI changes and removed Context parameter from Effect and Material 2022-11-27 17:18:16 +01:00
Simon Lübeß d47ac23e1b Raw Input and some ImGuiExtension changes 2022-11-26 15:24:33 +01:00
Simon Lübeß 8f22cbb8bc Fixed circle rendering and added 2D circle collider 2022-11-26 12:17:31 +01:00
Simon Lübeß 0155a38ae6 UUID 2022-11-16 13:09:26 +01:00
Simon Lübeß a42544f171 2D Physics 2022-10-08 16:56:15 +02:00
Simon Lübeß 202083930a Play Button 2022-10-06 16:33:33 +02:00
Simon Lübeß 6958d27c30 Fixed editor camera for real 2022-09-29 16:39:58 +02:00
Simon Lübeß f8544c8f64 Updated imgui 2022-09-28 22:02:37 +02:00
Simon Lübeß e95c5731b6 Basic Model drag'n'drop 2022-09-27 20:24:03 +02:00
Simon Lübeß 3ec537762a Overload '->' operator for TreeNode 2022-09-27 00:01:05 +02:00
Simon Lübeß e035832ab0 Fixed mouse wrapping when scene viewport is inactive 2022-09-27 00:00:17 +02:00
Simon Lübeß 0f1eddad5f Updated submodule DirectX 2022-09-07 18:28:40 +02:00
Simon Lübeß d2dca12d0c Use corrent RefCounter 2022-08-19 20:01:05 +02:00
Simon Lübeß 0588a93ec4 Use ACES tone mapping 2022-08-18 14:03:33 +02:00
Simon Lübeß 42e386a142 Fixed component name 2022-08-18 13:51:40 +02:00
Simon Lübeß 21c8d839ef Fixed mouse picking 2022-08-18 13:51:12 +02:00
Simon Lübeß bc1f466d18 Drag drop Texture 2022-08-13 13:47:58 +02:00
Simon Lübeß 8495c6db28 Drag Texture 2022-07-26 08:00:17 +02:00
Simon Lübeß bff4418b84 Content browser 2022-07-25 17:03:28 +02:00
Simon Lübeß 0339ae4422 Adjust to fix in beef mixins 2022-06-15 15:31:44 +02:00
Simon Lübeß eb03eca4dd Manual constant buffer binding 2022-06-13 14:10:54 +02:00
Simon Lübeß a926ef4af2 Updated gltf 2022-06-13 13:26:04 +02:00
Simon Lübeß 866353a157 Refactored Effects + start of EngineBuffers (I hate it) 2022-06-07 13:12:03 +02:00
Simon Lübeß a80018e80c Removed redundant Point struct and SceneViewport improvements
- Keyboard shortcuts for Gizmo control
- Improved mousepick-blocking
2022-06-02 12:17:57 +02:00
Simon Lübeß e41645e12a Composit Target and gamma correct rendering 2022-05-31 22:41:20 +02:00
Simon Lübeß 8db2ce1d05 Mouse picking 2022-05-30 14:06:52 +02:00
Simon Lübeß 47fdce0a7e Triangle fullscreen quad 2022-05-28 15:53:35 +02:00
Simon Lübeß d212576719 Render EntityIDs (breaks post processing) 2022-05-28 15:42:48 +02:00
Simon Lübeß 164d420a25 DX11: Automatically validate input layouts against vertex shaders 2022-05-26 11:27:02 +02:00
Simon Lübeß 28f1fad464 RenderTargetGroup GetData, Shader uint support 2022-05-25 22:00:11 +02:00
Simon Lübeß 1418063d68 RenderTargetGroup 2022-05-20 18:37:59 +02:00
Simon Lübeß 4cd0bff91d Fixed editorcamera stuttering, Added editor icons 2022-05-18 14:12:26 +02:00
Simon Lübeß 5d8a4ad3a7 Editor camera and Editor/Runtime scene update separation 2022-05-17 19:06:28 +02:00
Simon Lübeß ccea61fb79 Updated bon 2022-05-16 19:23:45 +02:00
Simon Lübeß de3da8ded8 Gizmo angle snapping 2022-05-16 10:11:33 +02:00
Simon Lübeß 62bb5baac9 Gizmo improvements 2022-05-15 14:36:07 +02:00
Simon Lübeß 3956080520 Start of serializaation
- Allow enumerating over unregistered components
- Refactored Editor a bit
2022-05-14 23:01:08 +02:00
Simon Lübeß 1d3d30f88d Desketchified DX11 shader binding 2022-05-13 15:13:09 +02:00
Simon Lübeß b1a1268319 Terrible postprocessing and start of Editor GUI for lights 2022-05-11 22:49:36 +02:00
Simon Lübeß 56e92a7d67 Added Lights 2022-05-11 11:39:59 +02:00
Simon Lübeß f4c9dd8ade MeshRendererComponentEditor
- Explicit conversion from VectorX to float[X]
- Expose "Columns" and "Rows" properties of BufferVariable
- Effects: VariableDescriptors
2022-05-10 22:29:40 +02:00
Simon Lübeß 2e0cc289df Material.GetVariable and (maybe) fixed SetVariable for Matrix3x3 2022-05-10 22:06:07 +02:00
Simon Lübeß 336e52fbac Fix Modelloader 2022-05-10 11:48:16 +02:00
Simon Lübeß f527af13c3 EnsureTypeMatch speedup 2022-05-09 22:58:22 +02:00
Simon Lübeß fe0d5fa529 More profiling 2022-05-09 22:53:48 +02:00
Simon Lübeß b37b1b4bf9 UnbindTexture, PBR changes, Test scene 2022-05-09 22:11:46 +02:00
Simon Lübeß 3c2c37b270 Shader #include + Remved unused Dx11Effect 2022-05-09 18:19:24 +02:00
Simon Lübeß dc235399c8 Start of PBR 2022-05-09 16:45:16 +02:00
Simon Lübeß 2817c5b1a1 Start of 3d renderer integration 2022-05-04 18:38:59 +02:00
Simon Lübeß 412d0ea965 Fixed release build and automatic compiling of CPP Helper 2022-05-04 18:34:56 +02:00
Simon Lübeß 9e23ac0fcf Removed dangling DXTK-project dependencie 2022-05-04 18:33:43 +02:00
Simon Lübeß a43572817d Vector tweaks 2022-05-04 17:46:15 +02:00
Simon Lübeß 805423a64e Rendertarget inherits from texture 2022-05-04 14:53:31 +02:00
Simon Lübeß 9c93ccee47 Removed redundant submodule-entry 2022-04-13 12:32:42 +02:00
Simon Lübeß f1ce63ee3b Removed submodule GlitchyEngine/vendor/DirectXTK 2022-04-13 00:01:05 +02:00
Simon Lübeß e685b4fbba Added DirectXTK to GlitchyEngineHelper 2022-04-13 00:00:41 +02:00
Simon Lübeß 9105c12e33 Added buildcommand 2022-04-12 14:32:00 +02:00
Simon Lübeß 863c264001 UI Tweaks, ChildEnumerator, ComponentAdded-Handlers 2022-04-12 00:48:20 +02:00
Simon Lübeß bec202e23a Settings / SettingsWindow 2022-04-10 13:12:09 +02:00
Simon Lübeß bca72cf0d4 Add / Remove Components 2022-04-10 12:18:43 +02:00
Simon Lübeß af37154071 Better Transform component and edit gui 2022-04-09 12:35:36 +02:00
Simon Lübeß c7fde476e8 Updated DX11 Bindings 2022-04-09 12:34:28 +02:00
Simon Lübeß 604e34a12a Start of ContentManager 2022-04-09 12:34:09 +02:00
Simon Lübeß b94c84d304 GlitchyEngineHelper project 2022-04-09 12:33:05 +02:00
Simon Lübeß d47bc37886 SpriteRenderer Editor, enabled alpha-blending and depth 2022-04-02 00:10:00 +02:00
Simon Lübeß c13b0a26d1 Overhauled component editors 2022-04-01 23:29:35 +02:00
Simon Lübeß e82f70ba02 Native scripting 2022-03-03 01:39:04 +01:00
Simon Lübeß cbee9f59d8 Many ecs, component and editor changes 2022-03-02 01:59:51 +01:00
Simon Lübeß afe36b19df Removed unnecessary "override extern"s 2022-03-02 01:57:04 +01:00
Simon Lübeß 9197a209d6 Ecs changes
- BitArray has always at least sizeof(uint) bits
- Renamed Entity to EcsEntity
- Added value parameter to EcsWorld.AssignComponent
- Matched EcsWorld generic parameters
- Added Scene
- Added Entity
2022-02-28 23:34:52 +01:00
Simon Lübeß ba5ccd7107 Editor window 2022-02-28 18:08:13 +01:00
Simon Lübeß c80ca4d9a1 Cleaned up DX11 report 2022-02-28 12:13:44 +01:00
Simon Lübeß 92fd8bb572 Removed Bind from Texture 2022-02-27 12:30:09 +01:00
Simon Lübeß b341c70a26 Editor changes
- Updated Renderer2D shaders
- Fixed scene viewport having resolution
- Show Grid even if no entity is selected
- Explicit conversion from ImGui.VecX <-> VectorX
- Simplified EditorLayer
2022-02-27 12:21:30 +01:00
Simon Lübeß 8c8f0d9fc7 Basic tilemap 2022-02-26 18:05:56 +01:00
Simon Lübeß 8638b7ac3b ImGuiLayer cleanup 2022-02-26 18:05:47 +01:00
Simon Lübeß be7c3d1d8b Subtextures 2022-02-23 13:41:59 +01:00
Simon Lübeß 699522ff67 Fixed textureviewer 2022-02-22 20:18:37 +01:00
Simon Lübeß 6f999da1b8 Fixed fallback font rendering 2022-02-22 20:18:06 +01:00
Simon Lübeß 373980d5ad SwizzleVectorAttribute no longer generates invalid setters 2022-02-21 17:06:48 +01:00
Simon Lübeß 0db85de067 Release build fixes + ImGui build flag
Fonts still not working
2022-02-18 16:03:24 +01:00
Simon Lübeß fae2bdf084 Updated submodules
Updated submodule GlitchyEngine/vendor/imgui
Updated submodule GlitchyEngine/vendor/msdfgen
2022-02-17 01:12:02 +01:00
Simon Lübeß 0f0afc2a90 Renderer2D improvements + stats 2022-02-16 20:44:31 +01:00
Simon Lübeß 66dad82dc6 Added ColorHSV 2022-02-14 20:40:50 +01:00
Simon Lübeß 0e684af17d Added Window.SetIcon 2022-02-14 20:38:01 +01:00
Simon Lübeß 82898f1d5c Added DeltaTime 2022-02-14 20:37:31 +01:00
Simon Lübeß a2db0774f8 Cleanup 2022-02-13 02:14:56 +01:00
Simon Lübeß 5b1f694bc9 SwapChain.AspectRatio fix 2022-01-22 10:44:10 +01:00
Simon Lübeß 69be98bb38 FontRenderer: Allow preparing empty strings 2022-01-22 10:42:27 +01:00
Simon Lübeß 7eb4001a1b PrepareFont calculates total pen advance 2022-01-21 21:19:44 +01:00
Simon Lübeß bca4552341 Added AspectRation property to SwapChain 2022-01-21 21:19:02 +01:00
Simon Lübeß d96ec6f21b Renderer2D: DrawQuad with Matrix + BeginScene now takes any camera 2022-01-21 21:17:43 +01:00
Simon Lübeß 44fe2c3281 Start of gamma correction 2022-01-15 17:50:52 +01:00
Simon Lübeß 6a55108a37 Fixed RenderTargets leaking a texure when it's a Swapchain target 2022-01-15 17:49:36 +01:00
Simon Lübeß a7b2515cf4 Added PNG-Loader to Texture2D 2022-01-15 14:34:46 +01:00
Simon Lübeß ee9dfd4593 Don't use Harfbuzz for simple text rendering + Ignored warnings 2022-01-15 13:29:45 +01:00
Simon Lübeß 3c1897b926 Even more Profiling 2022-01-14 22:01:41 +01:00
Simon Lübeß 8a84843f54 Updated Freetype-beef 2022-01-14 21:50:06 +01:00
Simon Lübeß 06469f3350 Instrumentation 2022-01-14 21:49:15 +01:00
Simon Lübeß 78faf4cb81 Simple bidirectional text 2022-01-08 02:17:35 +01:00
Simon Lübeß e292029015 Start of font preparation 2022-01-07 18:42:43 +01:00
Simon Lübeß 5373d92297 Updated Freetype 2022-01-07 03:28:39 +01:00
Simon Lübeß deedb62a03 Merge remote-tracking branch 'origin/main' into main 2022-01-05 15:42:57 +01:00
Simon Lübeß 6199496987 Fixed release build 2022-01-05 15:36:34 +01:00
Simon Lübeß 826ac68873 Basic Harfbuzz support and use MSDGen with Skia 2022-01-05 15:31:09 +01:00
Simon Lübeß b2ce560bfc Added DepthStencilState 2022-01-01 19:34:59 +01:00
Simon Lübeß 664ba552ea Added struct and disposable component Generators 2021-12-30 16:52:32 +01:00
Simon Lübeß b555cc37d1 Simplified dispose function of DisposableComponents 2021-12-30 16:52:13 +01:00
Simon Lübeß b3ab30e72a DrawQuad with transform matrix 2021-12-30 16:18:43 +01:00
Simon Lübeß 1cc37ee168 Run default constructor when assigning component 2021-12-30 16:18:22 +01:00
Simon Lübeß f4d64b15fa Merge remote-tracking branch 'origin/main' into main 2021-12-15 21:25:17 +01:00
Simon Lübeß e55b73db0f Renamed Int-Vector and added swizzle 2021-12-08 20:58:26 +01:00
Simon Lübeß f28984bec5 Enabled vector swizzle 2021-12-04 15:52:48 +01:00
Simon Lübeß 0fd6ac1dee Fixed preprocessor macros 2021-10-30 14:21:26 +02:00
Simon Lübeß 419509ab7f Improved Define names 2021-10-30 14:17:17 +02:00
Simon Lübeß 2bc87b437a Removed delete:append in GameTime 2021-10-30 11:25:31 +02:00
Simon Lübeß b3f9376dc8 Added Min/Max to Vectors 2021-10-30 11:24:58 +02:00
Simon Lübeß ffafa380ea Added Backbuffer to Swapchain + RenderCommand API changes 2021-10-15 22:40:42 +02:00
Simon Lübeß 90e654b750 Renderer2D cleanup 2021-10-15 22:39:24 +02:00
Simon Lübeß adaf62de62 Fixed circle instancing buffer + clip pixels 2021-10-15 12:57:32 +02:00
Simon Lübeß dcb8424c2d Added circle rendering to Renderer2D 2021-10-14 23:01:08 +02:00
Simon Lübeß 84df8c111b Fixed various memory leaks + ModelLoader cleanup 2021-10-14 20:47:25 +02:00
Simon Lübeß cd82a99450 Added helpers for deleting/clearing Lists of RefCounters 2021-10-14 20:42:24 +02:00
Simon Lübeß 9216462a51 ComponentPools no longer falsely trigger leak detection
Fixes #3
2021-10-14 20:40:18 +02:00
Simon Lübeß 3eb7068bca Dispose Components when EcsWorld gets deleted 2021-10-14 18:56:29 +02:00
Simon Lübeß 54870330b6 Fixed memory leak 2021-10-14 15:54:13 +02:00
Simon Lübeß ac74aeb116 Updated Submodule msdfgen 2021-10-13 23:12:32 +02:00
Simon Lübeß b5bfcf5741 Fixed memory leak 2021-10-13 23:04:43 +02:00
Simon Lübeß 0cbbf94fe6 Use static D3D11 device and context 2021-10-13 22:56:22 +02:00
Simon Lübeß 84daee95e4 Replaced RefCounted with RefCounter 2021-10-13 09:52:12 +02:00
Simon Lübeß 2cd9ab3e69 Fixed memory leaks 2021-10-11 12:41:56 +02:00
Simon Lübeß 5a82b89622 Fixed memory leak in Renderer2D 2021-10-09 16:47:20 +02:00
Simon Lübeß b020855ec5 Cleaned ExampleLayer2D 2021-09-29 23:58:01 +02:00
Simon Lübeß 4dc6c916ae Reimplemented Renderer2D
- Renderer2D now static
- Renderer now calls Init and Deinit of Renderer2D
- Renderer2D  now calls Init and Deinit of FontRenderer
- Fixed Deinit order of Layers and renderer (e.g. Layers now deinit first)
- Sandbox2D now uses SandboxApp (only loads different layer)
2021-09-29 23:27:41 +02:00
Simon Lübeß 9a9d75afbc Movement speed now depends on zoom 2021-09-29 23:18:32 +02:00
Simon Lübeß fab0f99951 Added guizmo
Translation is broken for some reason
2021-09-28 21:56:51 +02:00
Simon Lübeß 122f7e9904 Replaced imgui with engine specific repository 2021-09-28 21:27:08 +02:00
Simon Lübeß eb2bbf4b82 Keep references to Images used by ImGui 2021-09-21 16:49:10 +02:00
Simon Lübeß 611782653c Adapted Editor to new RenderTarget api 2021-09-21 16:36:22 +02:00
Simon Lübeß 229d2b578e Reworked RenderTarget2D and corresponding API 2021-09-21 16:30:34 +02:00
Simon Lübeß 8e39d7988b Added RefCounted helpers 2021-09-21 16:29:22 +02:00
Simon Lübeß 4debaee7d4 SetViewport now part of RenderCommand 2021-09-21 13:15:43 +02:00
Simon Lübeß 4af61a372f Fire WindowResizeEvent when window minimizes
Also no longer updates layer-stack when the application is minimized
2021-09-21 13:14:58 +02:00
Simon Lübeß 3f1f5736b5 Improved MSDF generation and rendering 2021-09-20 15:42:10 +02:00
Simon Lübeß 2afff4ec20 Added MSDF to Font and FontRenderer 2021-09-19 21:19:00 +02:00
Simon Lübeß 764b9f27b6 Start of TextureViewer 2021-09-19 21:16:57 +02:00
Simon Lübeß 2d5c408b54 Flush Renderer2D when instance buffer is full 2021-09-19 17:36:58 +02:00
Simon Lübeß 22a4bc355e Fixed typo 2021-09-19 17:35:53 +02:00
Simon Lübeß 90284739c0 Added support for int shader variables 2021-09-19 14:22:37 +02:00
Simon Lübeß 8471b7d7b9 Added SamplerState for white texture 2021-09-19 13:33:48 +02:00
Simon Lübeß 38fd5fa2c8 Switched to static c-library, updated submodules 2021-09-18 22:44:11 +02:00
Simon Lübeß 0c4fd27226 Removed warnings when converting Vectors from GlitchyEngine to DirectX 2021-09-18 18:59:01 +02:00
Simon Lübeß a80a63fbc1 Start of msdf text 2021-09-18 18:39:34 +02:00
Simon Lübeß 9cd95ed0e4 Renderer2D can now use custom effects 2021-09-18 18:38:45 +02:00
Simon Lübeß b5efaf2b5b Added submodule msdfgen 2021-09-18 18:37:12 +02:00
Simon Lübeß da6d242353 Adapted to internal change in Texture 2021-09-17 13:09:15 +02:00
Simon Lübeß 0b1ec9a837 Improved Editor
- Added window docking
- Added MenuBar
- Added scene viewport
- Added closing and reopening for editor windows
2021-09-17 13:05:15 +02:00
Simon Lübeß 45d298b755 Added overload for Image to ImGui extension 2021-09-17 13:00:17 +02:00
Simon Lübeß 266d7a4651 Added RenderTarget2D 2021-09-17 12:58:33 +02:00
Simon Lübeß d051b392d0 Fixed class name in EditorApp 2021-09-16 18:16:40 +02:00
Simon Lübeß e2fc373a06 Update EntityHierarchyWindow.bf 2021-09-16 18:14:37 +02:00
Simon Lübeß 48de55f987 Updated imgui 2021-09-16 18:13:10 +02:00
Simon Lübeß 0079b80b1c Created editor project and moved Editor there 2021-09-16 13:19:25 +02:00
Simon Lübeß f6b073557a Updated .gitignore 2021-09-16 13:18:49 +02:00
Simon Lübeß b8626f3c27 Made buffer fixed array 2021-09-15 18:43:45 +02:00
Simon Lübeß 0b8be33d68 Workaround for localTransform calculation changing transform values 2021-09-15 17:53:27 +02:00
Simon Lübeß e14ebec387 Added Component editor for Transform- and DebugNameComponent 2021-09-15 17:52:35 +02:00
Simon Lübeß b4bb5c4a39 Added Editor and EntityHierarchyWindow 2021-09-15 13:27:03 +02:00
Simon Lübeß c04cd8a956 Added generic TreeNode class 2021-09-15 13:25:57 +02:00
Simon Lübeß 908167c83e Added DebugNameComponent 2021-09-14 23:54:50 +02:00
Simon Lübeß ab17598972 [ECS] WorldEnumerator now skips deleted entities 2021-09-14 23:29:33 +02:00
Simon Lübeß db05a5a6a9 [ECS] Fixed_disposingPools gets trashed when _componentPools reallocates 2021-09-14 23:28:18 +02:00
Simon Lübeß cb2c83678e Assigning a component again now returns the component instead of null 2021-09-14 23:00:42 +02:00
Simon Lübeß b0b5f76423 Animations now component based 2021-09-13 20:52:41 +02:00
Simon Lübeß 44374a84a7 Added DrawCoordinateCross function 2021-09-11 17:50:30 +02:00
Simon Lübeß 39f5893c7e Updated AnimationClip, Model Loader now loads Nodes into ECS
- SandboxApp: Started basic skinned mesh render system
2021-09-11 17:00:11 +02:00
Simon Lübeß 89bb475994 Added SkinnedMeshRendererComponent 2021-09-11 16:58:00 +02:00
Simon Lübeß c4ed04ba96 Replaced Error with debug assert 2021-09-11 16:57:33 +02:00
Simon Lübeß 886ce2fe3d Added basic AnimationComponent 2021-09-11 16:57:16 +02:00
Simon Lübeß 8442f7741d Fixed setting matrix array in material 2021-09-11 16:31:58 +02:00
Simon Lübeß 29749f64e9 Added WorldEnumerator with 4 generic parameters 2021-09-11 16:31:16 +02:00
Simon Lübeß 5c95668a1d Start of DebugRenderer 2021-09-11 12:58:25 +02:00
Simon Lübeß cb51880925 Reference fixes 2021-09-11 12:57:44 +02:00
Simon Lübeß da24643c64 Added SetVariable for Matrix-arrays 2021-09-11 12:50:27 +02:00
Simon Lübeß f761f87e1d Added Setter for LocalTransform 2021-09-11 12:49:17 +02:00
Simon Lübeß fc2f1cd7e6 Skeleton and AnimationClip now refcounted 2021-09-11 12:48:49 +02:00
Simon Lübeß 155495eeef Added basic Matrix decomposition 2021-09-11 12:46:30 +02:00
Simon Lübeß 1491ea8e75 PI now optimal, added Zero-Check 2021-09-11 12:45:59 +02:00
Simon Lübeß ff4cd48f1e Changed Rotation from Euler to Quaternion (TransformComponent) 2021-09-03 16:44:50 +02:00
Simon Lübeß d555a80d8d Updated Quaternion and added Test 2021-09-02 23:36:17 +02:00
Simon Lübeß 2d8efa0154 Added MathHelper
- common Values of Pi
- Degree <-> Radians conversions
2021-09-02 23:34:42 +02:00
Simon Lübeß 78aeacc8a1 Added project for UnitTesting 2021-09-02 23:33:41 +02:00
Simon Lübeß 5545d84284 Changed pointer type to prevent compiler error 2021-09-02 13:09:32 +02:00
Simon Lübeß 30280c5f93 Re-Removed old code in TransformSystem 2021-09-02 13:02:43 +02:00
Simon Lübeß e42b587d88 Added MeshRendererComponent
updated SandoxApp to utilize it
2021-09-02 12:34:28 +02:00
Simon Lübeß c270fdcb03 Fixed parentTransform not causing update of child transform
(also improved performance)
2021-09-02 12:30:18 +02:00
Simon Lübeß 0534824c07 Refactored SetVariable and added some more types 2021-09-02 12:28:36 +02:00
Simon Lübeß 5ce7ebe674 Added generic World Enumerators
also moved WorldEnumerators out of EcsWorld
2021-09-02 12:20:33 +02:00
Simon Lübeß c9e9a11e4e No longer showing ImGui demo-window 2021-09-02 12:18:46 +02:00
Simon Lübeß d1175519eb Disabled assert that forces Debugger to be present 2021-09-02 12:17:44 +02:00
Simon Lübeß 566b4ea59e Switched Allocator from Debug to CRT 2021-09-02 12:17:12 +02:00
Simon Lübeß 0e7217778f Implemented disposing for component 2021-08-29 20:23:44 +02:00
Simon Lübeß b376525d30 Added Entity hierarchy and hierarchical transforms 2021-08-28 22:28:40 +02:00
Simon Lübeß ce03f7c600 Start of AnimationSystem 2021-08-27 22:37:59 +02:00
Simon Lübeß eafdc2f17f Transposed matrix resulting from RotationQuaternion 2021-08-27 20:54:34 +02:00
Simon Lübeß 22252f9161 Application now has EffectLibrary field 2021-08-25 22:46:50 +02:00
Simon Lübeß 7dda8bdd25 Added properties to PerspectiveCameraController 2021-08-25 22:42:48 +02:00
Simon Lübeß 41754f5c67 Added IndexOf and IndexOfBinary to Array 2021-08-25 22:39:34 +02:00
Simon Lübeß 099763e1e3 Added Vertexcount to GeometryBinding and made Indexbuffer optional 2021-08-25 22:39:11 +02:00
Simon Lübeß a8bef51834 Deduplicated Vertexbuffer constructor 2021-08-25 22:36:05 +02:00
Simon Lübeß c880c4ef73 Removed unneeded debug code 2021-08-25 22:28:33 +02:00
Simon Lübeß 8ab740fa2e Added basic support for arrays in BufferVariables 2021-08-25 22:27:04 +02:00
Simon Lübeß 93513f3ea8 Vector Lerp 2021-08-25 22:22:59 +02:00
Simon Lübeß 9dbf9fd501 Added Quaternions 2021-08-25 22:19:02 +02:00
Simon Lübeß e239de52d6 Added Line and Ray drawing 2021-08-20 19:44:26 +02:00
Simon Lübeß 9e06d4d51f Refactored SetVertexShader and SetPixelShader 2021-08-15 14:19:24 +02:00
Simon Lübeß d200c2c849 Refactored FontRenderer, fixed Sandbox2D 2021-08-15 13:20:38 +02:00
Simon Lübeß f5f3bad8db Fixed Renderer2D
- Fixed textures not being bound
- Fixed destructor trying to delete scoped object
2021-08-11 17:20:48 +02:00
Simon Lübeß 344accea60 Implemented Materials
- Shaders get Textureslots via reflection
- added Textureslots to Effect
2021-08-09 18:03:47 +02:00
Simon Lübeß 2326e69c0c Added submodule gltf
This time for sure
2021-08-06 12:31:51 +02:00
Simon Lübeß 80e0bae347 Added GLTF submodule and start of ModelLoader 2021-08-06 12:22:46 +02:00
Simon Lübeß 5c0ee3bae0 VertexBuffer, VertexLayout and GeometryBinding improvements
- VertexBuffer: Added constructor that takes stride instead of type
- VertexLayout: Added Refcounting to VertexLayout and ownership parameters for VertexElements
- Fixed: GeometryBinding using stride and offset from buffer instead of buffer binding
2021-08-05 18:32:21 +02:00
Simon Lübeß e04d058381 Added PerspectiveCameraController 2021-08-04 19:23:29 +02:00
Simon Lübeß 0735aae74f Added OrthographicCameraController 2021-08-04 17:22:49 +02:00
Simon Lübeß 3ac99491cf Changed EventDispacher from class to struct 2021-08-04 17:22:14 +02:00
Simon Lübeß 303578a83f Fixed Width and Height property of ApplicationEvent 2021-08-04 17:21:03 +02:00
Simon Lübeß ce163db30b Unified texture loading, updated DirectX-beef 2021-07-22 18:57:35 +02:00
Simon Lübeß dbdb8a0d32 Made FontRenderer static, added scale and linegap to DrawText
it seems I forgot to push the freetype-submodule
2021-07-19 20:19:57 +02:00
Simon Lübeß 9b418521af Fixed WasKeyPressed and WasKeyReleased 2021-07-19 20:07:30 +02:00
Simon Lübeß b1ad7b5ba3 Added single stepping 2021-07-19 20:06:37 +02:00
Simon Lübeß 9158da60c2 Refcounted Font, added Fallback property 2021-06-23 19:39:32 +02:00
Simon Lübeß 7f8379ea6c Implemented FontRenderer 2021-06-23 19:17:17 +02:00
Simon Lübeß 8c957f9d9f Renderer2D: render Null-Texture and custom UV-Coordinates 2021-06-23 19:16:40 +02:00
Simon Lübeß 819476a3ec Added constructor and SetData to Texture2D
obviously this has to be done for the other texture types as well at some point
2021-06-23 19:11:37 +02:00
Simon Lübeß 1f1b32e101 Moved CPUAccessFlags and Usage to seperate file 2021-06-23 19:10:04 +02:00
Simon Lübeß f131b21273 Added default SamplerStates 2021-06-23 19:08:41 +02:00
Simon Lübeß 5ae0192bc6 Added DepthStencilTarget to Sandbox2DApp 2021-06-02 16:51:45 +02:00
Simon Lübeß dc088dcb0a Added pixelformat parameter to DepthStencilTarget-constructor 2021-06-02 16:51:25 +02:00
Simon Lübeß bf94f10a64 Added rudimentary DepthStencilTarget 2021-05-30 19:49:10 +02:00
Simon Lübeß 562f4855bd Added Renderer2D and 2D Example 2021-05-30 19:38:24 +02:00
Simon Lübeß 64579f9603 Constantbuffer now supports single bools 2021-05-30 19:38:08 +02:00
Simon Lübeß ae290936b9 Added basic support for instanced rendering 2021-05-30 19:37:23 +02:00
Simon Lübeß 0f2c481616 Fixed vector indexed access 2021-05-22 15:08:14 +02:00
Simon Lübeß b19dd60e52 Debuglogger no longer asserts a Debugger to be present in release builds 2021-05-20 12:42:17 +02:00
Simon Lübeß 2f281f13fd Updated submodule imgui-beef 2021-05-18 23:02:31 +02:00
Simon Lübeß 3eeca63d91 Fixed DirectXTK-Submodule path (for real this time) 2021-05-18 19:39:34 +02:00
Simon Lübeß 3f938d3488 Fixed DirectXTK-Submodule path 2021-05-18 19:37:21 +02:00
Simon Lübeß 7fb1f30303 Componentified Camera 2021-05-17 20:07:58 +02:00
Simon Lübeß 3e0c4b2eb7 Releasing RasterizerState insted of deleting 2021-04-09 19:38:20 +02:00
Simon Lübeß bfd81745e9 Disabled Vector swizzle
caused by beef bug
2021-04-09 19:37:54 +02:00
Simon Lübeß 6376bde112 Implemented basic ECS 2021-04-09 19:35:24 +02:00
Simon Lübeß 047c09017c Removed epsilon value from camera
(bug fixed in DirectX-beef)
2021-04-09 19:35:19 +02:00
Simon Lübeß 1f687f9b96 Added TextureCube 2021-04-09 19:35:13 +02:00
Simon Lübeß ad4933a1f9 Added larger epsilon to perspective camera 2021-04-09 19:35:08 +02:00
Simon Lübeß 838bb7ec2e Added explicit conversion from float to Vector 2021-04-09 19:34:44 +02:00
Simon Lübeß 92a3eaa426 Added protected function to create Texture2D from raw data 2021-04-09 19:32:24 +02:00
Simon Lübeß 4227882afa Added GE_D3D11 flag 2021-04-09 19:32:02 +02:00
Simon Lübeß 5a8499ac43 Moved ImplBind implementation from Texture2D to Texture 2021-04-09 19:31:49 +02:00
Simon Lübeß 72cb982b13 Added lodepng-beef 2021-04-09 19:31:18 +02:00
Simon Lübeß 92b22acb91 Added refcounting to RasterizerState 2021-04-09 19:28:46 +02:00
Simon Lübeß 2ad45edef5 Improved Windows keyboard input
- added handling of syskey-messages (alt-Key now generates Key events)
- right and left variants of keys now generate seperate events (e.g. left shift and right shift are seperate keys now instead of simply being "shift")
- added method to get the localized name of a Key
2021-03-14 17:59:13 +01:00
Simon Lübeß cfff2cb738 Added window (de-)activate events 2021-03-13 17:50:58 +01:00
Simon Lübeß 163dadbe37 Added EffectLibrary 2021-03-05 16:40:45 +01:00
Simon Lübeß 08daa2f59e Added Int32 vectors 2021-03-03 16:42:17 +01:00
599 changed files with 76554 additions and 2902 deletions
+9 -1
View File
@@ -4,4 +4,12 @@ build/
.vs/
recovery/
vendor/directx
Sandbox/imgui.ini
imgui.ini
GlitchyEditor/settings.bon
GlitchyEditor/MonoDebugger.log
# Ignore files in build-directory of ScriptCore
GlitchyEditor/Resources/Scripts/*
.cache
generated
+36 -6
View File
@@ -1,9 +1,39 @@
[submodule "GlitchyEngine/vendor/directx"]
path = GlitchyEngine/vendor/directx
url = https://github.com/aharabada/directx-beef.git
[submodule "GlitchyEngine/vendor/imgui-beef"]
path = GlitchyEngine/vendor/imgui-beef
url = https://github.com/aharabada/imgui-beef
[submodule ".\\GlitchyEngine\\vendor\\DirectXTK"]
path = .\\GlitchyEngine\\vendor\\DirectXTK
url = https://github.com/aharabada/DirectXTK-beef.git
[submodule "vendor/lodepng-beef"]
path = vendor/lodepng-beef
url = https://github.com/aharabada/lodepng-beef.git
[submodule "GlitchyEngine/vendor/freetype"]
path = GlitchyEngine/vendor/freetype
url = https://github.com/aharabada/FreeType-beef.git
[submodule "GlitchyEngine/vendor/gltf"]
path = GlitchyEngine/vendor/gltf
url = https://github.com/aharabada/cgltf-beef.git
[submodule "GlitchyEngine/vendor/msdfgen"]
path = GlitchyEngine/vendor/msdfgen
url = https://github.com/aharabada/msdfgen-beef.git
[submodule "GlitchyEngine/vendor/imgui"]
path = GlitchyEngine/vendor/imgui
url = https://github.com/aharabada/ImGui_GlitchyEngine.git
[submodule "GlitchyEngineHelper/vendor/xxHash"]
path = GlitchyEngineHelper/vendor/xxHash
url = https://github.com/Cyan4973/xxHash.git
[submodule "GlitchyEngine/vendor/bon"]
path = GlitchyEngine/vendor/bon
url = https://github.com/EinScott/bon.git
[submodule "GlitchyEngine/vendor/box2D"]
path = GlitchyEngine/vendor/box2D
url = https://github.com/aharabada/box2d-beef.git
[submodule "GlitchyEngine/vendor/Beef.Linq"]
path = GlitchyEngine/vendor/Beef.Linq
url = https://github.com/aharabada/Beef.Linq.git
[submodule "vendor/ImGui.NET"]
path = vendor/ImGui.NET
url = https://github.com/aharabada/ImGui.NET.git
[submodule "GlitchyEngine/vendor/NetHostBeef"]
path = GlitchyEngine/vendor/NetHostBeef
url = https://github.com/aharabada/NetHostBeef.git
[submodule "GlitchyEngine/vendor/Xml-Beef"]
path = GlitchyEngine/vendor/Xml-Beef
url = https://github.com/aharabada/Xml-Beef.git
+33 -2
View File
@@ -1,5 +1,36 @@
FileVersion = 1
Projects = {Sandbox = {Path = "Sandbox"}, GlitchyEngine = {Path = "GlitchyEngine"}, GlitchLog = {Path = "GlitchLog"}, DirectX = {Path = "GlitchyEngine/vendor/directx/DirectX"}, ImGui = {Path = "GlitchyEngine/vendor/imgui-beef/ImGui"}, ImGuiImplWin32 = {Path = "GlitchyEngine/vendor/imgui-beef/ImGuiImplWin32"}, ImGuiImplDX11 = {Path = "GlitchyEngine/vendor/imgui-beef/ImGuiImplDX11"}, DirectXTK = {Path = "GlitchyEngine/vendor/DirectXTK/DirectXTK-beef"}}
Locked = ["ImGui"]
[Workspace]
StartupProject = "Sandbox"
StartupProject = "GlitchyEditor"
[Projects]
GlitchyEngine = {Path = "GlitchyEngine"}
GlitchLog = {Path = "GlitchLog"}
DirectX = {Path = "GlitchyEngine/vendor/directx/DirectX"}
LodePng = {Path = "vendor/lodepng-beef/lodepng-beef"}
FreeType = {Path = "GlitchyEngine/vendor/freetype"}
cgltf-beef = {Path = "GlitchyEngine/vendor/gltf/cgltf-beef"}
GlitchyEditor = {Path = "GlitchyEditor"}
msdfgen-beef = {Path = "GlitchyEngine/vendor/msdfgen/msdfgen-beef"}
ImGui = {Path = "GlitchyEngine/vendor/imgui/ImGui"}
ImGuiImplDX11 = {Path = "GlitchyEngine/vendor/imgui/ImGuiImplDX11"}
ImGuiImplWin32 = {Path = "GlitchyEngine/vendor/imgui/ImGuiImplWin32"}
ImGuizmo = {Path = "GlitchyEngine/vendor/imgui/ImGuizmo"}
GlitchyEngineHelper = {Path = "GlitchyEngineHelper"}
bon = {Path = "GlitchyEngine/vendor/bon"}
box2d-beef = {Path = "GlitchyEngine/vendor/box2D"}
"Beef.Linq" = {Path = "GlitchyEngine/vendor/Beef.Linq/src"}
ScriptCore = {Path = "ScriptCore"}
NetHostBeef = {Path = "GlitchyEngine/vendor/NetHostBeef/NetHostBeef"}
"GlitchyEngine.Test" = {Path = "GlitchyEngine.Test"}
Xml-Beef = {Path = "GlitchyEngine/vendor/Xml-Beef"}
"GlitchyEngine.Benchmark" = {Path = "GlitchyEngine.Benchmark"}
[WorkspaceFolders]
GlitchyEngine = ["GlitchyEngine", "GlitchLog", "GlitchyEngineHelper", "ScriptCore", "GlitchyEngine.Test", "GlitchyEngine.Benchmark"]
"GlitchyEngine/Dependencies" = ["cgltf-beef", "DirectX", "FreeType", "ImGui", "ImGuiImplDX11", "ImGuiImplWin32", "ImGuizmo", "LodePng", "msdfgen-beef", "bon", "box2d-beef", "Beef.Linq", "NetHostBeef", "Xml-Beef"]
Beef = ["Beefy2D", "corlib"]
[Configs.Debug.Win64]
AllocStackTraceDepth = 12
@@ -0,0 +1,92 @@
///
/// Loading and usage of an asset.
///
// Shows the usage of the Content Manager.
// An asset is loaded with Content.LoadAsset(AssetName)
// Loading an asset returns an AssetHandle.
// Usually you want to hold on to the AssetHandle.
// If you need the actual asset you can use Content.GetAsset<AssetType>(AssetHandle) to retrieve the actual asset.
/*
* Only hold on to AssetHandle.
* Do NOT hold actual Assets! The Asset might get invalidated
* (e.g. reloading after the source-file changed).
*/
AssetHandle _lineEffect;
void Start()
{
/*
* Loading an asset returns a handle to that asset.
*/
_lineEffect = Content.LoadAsset("Shaders\\LineEffect.hlsl");
}
void Update()
{
// Use case 1:
{
// Retrieve the actual asset. Note that this Asset is only guaranteed to persist
// for the current frame.
Effect fx = Content.GetAsset<Effect>(_lineEffect);
// Note: Assets are ref counted, however since they are not inteded to be held GetAsset
// does NOT increment the reference counter so you usually should NOT decrement it.
// The exception is when you manually hold on to an asset (see Example below)
// Use asset
fx.Variables["ViewProjection"].SetData(viewProjection * transform);
fx.Variables["Color"].SetData(color);
fx.ApplyChanges();
fx.Bind();
}
// Use case 2:
{
// Retrieve the actual asset.
Effect fx = _lineEffect.Get<Effect>();
// ...
// Same as case 1
}
}
///
/// Holding on to an actual asset.
///
// Shows the usage of the Content Manager when you hold a reference to the actual Asset instead of the handle.
// This should usually not be done. Eventhough it is technically fine, it has the implication, that if the
// content manager decides to reload the asset the changes will not be reflected in the held reference
// (which they would if you used GetAsset before every usage.)
// Also the content manager can't unload the asset because the reference counter wouldn't be zero.
// Though there currently is no way for the content manager to unload an asset unless it is specifically told to do so.
/*
* Field to hold the asset.
*/
Effect _lineEffect;
void Start()
{
// Load the Asset.
AssetHandle handle = Content.LoadAsset("Shaders\\LineEffect.hlsl");
// Get the actual asset.
_lineEffect = Content.GetAsset<Effect>(handle); // Alternative: _lineEffect = handle.Get<Effect>();
// Increment the reference counter so that the asset doesn't get unloaded.
_lineEffect.AddRef();
}
void Destroy()
{
// Make sure to release the asset once you don't need it anymore. Otherwise it will leak.
_lineEffect.Release();
}
void Update()
{
_lineEffect.Variables["ViewProjection"].SetData(viewProjection * transform);
_lineEffect.Variables["Color"].SetData(color);
_lineEffect.ApplyChanges();
_lineEffect.Bind();
}
@@ -0,0 +1,44 @@
///
/// This shows the usage of a smart/typed Asset Handle.
///
// In the basic usage-patterns the user has two options:
// Either he/she holds a handle and has to query for the actual asset every time
// or he/she hold the actual asset and loses reloading capabilities.
// The idea of the auto asset is to provide a way that can provide both.
AssetHandle<Effect> _lineEffect;
void Start()
{
/*
* Loading an asset returns a handle to that asset.
* The asset handle is implicitly converted to a smart AssetHandle.
*/
_lineEffect = Content.LoadAsset("Shaders\\LineEffect.hlsl");
}
void Update()
{
// Use case 1 (Convenience)
{
_lineEffect.Variables["ViewProjection"].SetData(viewProjection * transform);
_lineEffect.Variables["Color"].SetData(color);
_lineEffect.ApplyChanges();
_lineEffect.Bind();
}
// Use case 2 (Technically more efficient)
{
Effect fx = _lineEffect.Get();
fx.Variables["ViewProjection"].SetData(viewProjection * transform);
fx.Variables["Color"].SetData(color);
fx.ApplyChanges();
fx.Bind();
}
}
//
// Auto Assets use comp time to expose all the fields, Methods and properties of the actual asset.
// They will automatically check if the asset for the handle changed and update accordingly.
// This means it is more convenient to use than both basic patterns and has all benefits of both.
//
+3
View File
@@ -0,0 +1,3 @@
# Design Code Examples
This directory (and its subdirectories) contains non functional code snippets showing the intended usage of certain systems of the engine.
+6 -34
View File
@@ -5,34 +5,6 @@ using internal GlitchLog;
namespace GlitchLog
{
public abstract class Logger
{
protected LogLevel _logLevel;
public LogLevel Level
{
get => _logLevel;
set => _logLevel = value;
}
public abstract String Name {get; set;}
public abstract void Trace(StringView format, params Object[] args);
public abstract void Info(StringView format, params Object[] args);
public abstract void Warning(StringView format, params Object[] args);
public abstract void Error(StringView format, params Object[] args);
public abstract void Critical(StringView format, params Object[] args);
public abstract void Assert(bool condition, String error = Compiler.CallerExpression[0], String filePath = Compiler.CallerFilePath, int line = Compiler.CallerLineNum);
#if !DEBUG
[SkipCall]
#endif
public abstract void AssertDebug(bool condition, String error = Compiler.CallerExpression[0], String filePath = Compiler.CallerFilePath, int line = Compiler.CallerLineNum);
public abstract void Log(LogLevel level, StringView format, params Object[] args);
}
public class DebugLogger : Logger
{
// {l} = log level (first parameter)
@@ -50,10 +22,10 @@ namespace GlitchLog
public this()
{
Runtime.Assert(Debug.IsDebuggerPresent, "The DebugLogger requires a debugger to be present.");
//Debug.Assert(Debug.IsDebuggerPresent, "The DebugLogger requires a debugger to be present.");
}
#if GL_NOLOG || GL_NOTRACE
#if GL_NOLOG || GL_LOG_NOTRACE
[SkipCall]
#endif
[Inline]
@@ -62,7 +34,7 @@ namespace GlitchLog
InternalLog(.Trace, format, params args);
}
#if GL_NOLOG || GL_NOINFO
#if GL_NOLOG || GL_LOG_NOINFO
[SkipCall]
#endif
[Inline]
@@ -71,7 +43,7 @@ namespace GlitchLog
InternalLog(.Info, format, params args);
}
#if GL_NOLOG || GL_NOWARNING
#if GL_NOLOG || GL_LOG_NOWARNING
[SkipCall]
#endif
[Inline]
@@ -80,7 +52,7 @@ namespace GlitchLog
InternalLog(.Warning, format, params args);
}
#if GL_NOLOG || GL_NOERROR
#if GL_NOLOG || GL_LOG_NOERROR
[SkipCall]
#endif
[Inline]
@@ -89,7 +61,7 @@ namespace GlitchLog
InternalLog(.Error, format, params args);
}
#if GL_NOLOG || GL_NOCRITICAL
#if GL_NOLOG || GL_LOG_NOCRITICAL
[SkipCall]
#endif
[Inline]
+31
View File
@@ -0,0 +1,31 @@
using System;
namespace GlitchLog;
public abstract class Logger
{
protected LogLevel _logLevel;
public LogLevel Level
{
get => _logLevel;
set => _logLevel = value;
}
public abstract String Name {get; set;}
public abstract void Trace(StringView format, params Object[] args);
public abstract void Info(StringView format, params Object[] args);
public abstract void Warning(StringView format, params Object[] args);
public abstract void Error(StringView format, params Object[] args);
public abstract void Critical(StringView format, params Object[] args);
public abstract void Assert(bool condition, String error = Compiler.CallerExpression[0], String filePath = Compiler.CallerFilePath, int line = Compiler.CallerLineNum);
#if !DEBUG
[SkipCall]
#endif
public abstract void AssertDebug(bool condition, String error = Compiler.CallerExpression[0], String filePath = Compiler.CallerFilePath, int line = Compiler.CallerLineNum);
public abstract void Log(LogLevel level, StringView format, params Object[] args);
}
+37
View File
@@ -0,0 +1,37 @@
FileVersion = 1
[Project]
Name = "GlitchyEditor"
TargetType = "BeefGUIApplication"
StartupObject = "GlitchyEngine.Program"
ProcessorMacros = ["GE_EDITOR_IMGUI_DEMO", "GE_GRAPHICS_DX11"]
[Dependencies]
corlib = "*"
GlitchLog = "*"
GlitchyEngine = "*"
Xml-Beef = "*"
ImGuiImplDX11 = "*"
ImGuiImplWin32 = "*"
ImGuizmo = "*"
"Beef.Linq" = "*"
[Platform.Windows]
IconFile = "$(ProjectDir)/Resources/Textures/GlitchyEngineIcon.ico"
[Configs.Debug.Win64]
PostBuildCmds = ["CopyFilesIfNewer(\"$(WorkspaceDir)/bin/vswhere.exe\", \"$(TargetDir)\")"]
DebugCommandArguments = "\"D:\\Development\\Git\\SingleStateToOrbit\""
PreprocessorMacros = ["DEBUG", "IMGUI"]
[Configs.Release.Win64]
TargetDirectory = "$(BuildDir)/dist"
PostBuildCmds = ["CopyFilesIfNewer(\"$(WorkspaceDir)/bin/vswhere.exe\", \"$(TargetDir)\")"]
DebugCommandArguments = "\"D:\\Development\\Git\\SingleStateToOrbit\""
PreprocessorMacros = ["RELEASE", "IMGUI"]
[Configs.Paranoid.Win64]
PostBuildCmds = ["CopyFilesIfNewer(\"$(WorkspaceDir)/bin/vswhere.exe\", \"$(TargetDir)\")"]
[Configs.Test.Win64]
PostBuildCmds = ["CopyFilesIfNewer(\"$(WorkspaceDir)/bin/vswhere.exe\", \"$(TargetDir)\")"]
+1
View File
@@ -0,0 +1 @@
project_user.bon
Binary file not shown.
@@ -0,0 +1,5 @@
{
AssetLoader = "ModelAssetLoader",
Config = (GlitchyEditor.Assets.ModelAssetLoaderConfig){}/* No reflection data for GlitchyEditor.Assets.ModelAssetLoaderConfig. Add [BonTarget] or force it */,
AssetHandle = 141014598923215615
}
@@ -0,0 +1,5 @@
{
AssetLoader = "ModelAssetLoader",
Config = (GlitchyEditor.Assets.ModelAssetLoaderConfig){}/* No reflection data for GlitchyEditor.Assets.ModelAssetLoaderConfig. Add [BonTarget] or force it */,
AssetHandle = 11221639476224465119
}
@@ -0,0 +1,119 @@
{
Name = "Scene name here pls!!!",
Entities = [
{
Id = 8726995825602656358,
NameComponent = {
Name = "Camera"
},
TransformComponent = {
Position = {
X = 0,
Y = 2,
Z = -5
},
Rotation = {
X = 0,
Y = 0.21643962,
Z = 0,
W = 0.976296008
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0.436332315,
Z = 0
}
},
CameraComponent = {
Primary = true,
ProjectionType = .InfinitePerspective,
PerspectiveFovY = 1.30899692,
PerspectiveNearPlane = 0.100000001,
PerspectiveFarPlane = 10000,
OrthographicHeight = 10,
OrthographicNearPlane = 0,
OrthographicFarPlane = 10,
AspectRatio = 1.83772814,
FixedAspectRatio = false
}
},
{
Id = 5254899955475338567,
NameComponent = {
Name = "Light"
},
TransformComponent = {
Position = {
X = -3,
Y = 4,
Z = -1.5
},
Rotation = {
X = 0.239775807,
Y = 0.61432755,
Z = 0.0315670744,
W = 0.751074195
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0.3490659,
Y = 1.3089968,
Z = 0.34906587
}
},
LightComponent = {
LightType = .Directional,
Illuminance = 10,
Color = {
R = 1,
G = 0.949999988,
B = 0.800000012
}
}
},
{
Id = 10018854473822844403,
NameComponent = {
Name = "Entity"
},
TransformComponent = {
Position = {
X = 0,
Y = 0,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
MeshComponent = {
Mesh = 141014598923215615
},
MeshRendererComponent = {
Material = 15093501654975430075
}
}
]
}
@@ -0,0 +1,224 @@
{
Name = "Scene name here pls!!!",
Entities = [
{
Id = 5169765174113462770,
NameComponent = {
Name = "Sphere"
},
TransformComponent = {
Position = {
X = 0,
Y = 0.5,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
MeshComponent = {
Mesh = "Assets/Models/sphere.glb"
},
MeshRendererComponent = {
Material = "Assets/Textures/TestMaterial.mat"
}
},
{
Id = 17158420331978163131,
NameComponent = {
Name = "Light"
},
TransformComponent = {
Position = {
X = -1,
Y = 4,
Z = -4
},
Rotation = {
X = 0.614328027,
Y = 0.23977606,
Z = 0.0315669999,
W = 0.751073778
},
Scale = {
X = 0.999998808,
Y = 1,
Z = 1.00000095
},
EditorEulerRotation = {
X = 1.30899811,
Y = 0.349065989,
Z = 0.349065989
}
},
LightComponent = {
LightType = .Directional,
Illuminance = 10,
Color = {
R = 1,
G = 0.991771996,
B = 0.74086231
}
}
},
{
Id = 5556050645816939548,
NameComponent = {
Name = "Plane"
},
TransformComponent = {
Position = {
X = 0,
Y = 0,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 10,
Y = 1,
Z = 10
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
MeshComponent = {
Mesh = "Assets/Models/plane.glb"
},
MeshRendererComponent = {
Material = "Assets/Textures/TestMaterial.mat"
}
},
{
Id = 3947673900993587516,
NameComponent = {
Name = "Camera"
},
TransformComponent = {
Position = {
X = 0,
Y = 2,
Z = -5
},
Rotation = {
X = 0.216440007,
Y = 0,
Z = 0,
W = 0.976296008
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0.436332017,
Y = 0,
Z = 0
}
},
CameraComponent = {
Primary = true,
ProjectionType = .InfinitePerspective,
PerspectiveFovY = 1.30899692,
PerspectiveNearPlane = 0.100000001,
PerspectiveFarPlane = 10000,
OrthographicHeight = 10,
OrthographicNearPlane = 0,
OrthographicFarPlane = 10,
AspectRatio = 1.87453413,
FixedAspectRatio = false
}
},
{
Id = 420718992779301759,
NameComponent = {
Name = "Entity"
},
TransformComponent = {
Position = {
X = 3,
Y = 0.501076996,
Z = -0.669378757
},
Rotation = {
X = 0.18301262,
Y = -0.683013558,
Z = 0.683012187,
W = 0.183013007
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 1.57079458,
Y = -2.61799288,
Z = 0
}
},
MeshComponent = {
Mesh = ""
},
MeshRendererComponent = {
Material = ""
}
},
{
Id = 8080288871271083510,
NameComponent = {
Name = "Rocket"
},
TransformComponent = {
Position = {
X = 2.37353563,
Y = 0.629615188,
Z = -1.34831977
},
Rotation = {
X = 0.270598024,
Y = -0.65328151,
Z = 0.65328151,
W = 0.270598054
},
Scale = {
X = 0.999999821,
Y = 0.999999762,
Z = 0.999999702
},
EditorEulerRotation = {
X = 1.57079649,
Y = -2.35619426,
Z = 8.94069601e-08
}
},
MeshComponent = {
Mesh = "Assets/Models/plane.glb"
},
MeshRendererComponent = {
Material = "Assets/Textures/RocketMaterial.mat"
}
}
]
}
@@ -0,0 +1,212 @@
{
Name = "Scene name here pls!!!",
Entities = [
{
Id = 6000868443984780499,
NameComponent = {
Name = "Child"
},
SpriterRendererComponent = {
Color = {
R = 1,
G = 0.388184,
B = 0.090109,
A = 1
},
UvTransform = {
X = 0,
Y = 0,
Z = 1,
W = 1
}
},
TransformComponent = {
ParentId = 820806682740348099,
Position = {
X = 0,
Y = 0.75,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 0.5,
Y = 0.5,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
}
},
{
Id = 820806682740348099,
NameComponent = {
Name = "Quad"
},
SpriterRendererComponent = {
Color = {
R = 0,
G = 0.551178,
B = 0.328787,
A = 1
},
UvTransform = {
X = 0,
Y = 0,
Z = 1,
W = 1
}
},
TransformComponent = {
Position = {
X = 0,
Y = 2,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
Rigidbody2D = {
BodyType = .Dynamic,
FixedRotation = false
},
BoxCollider2D = {
Offset = {
X = 0,
Y = 0
},
Size = {
X = 0.5,
Y = 0.5
},
Density = 1,
Friction = 0.5,
Restitution = 0,
RestitutionThreshold = 0.5
}
},
{
Id = 15398726361722237419,
NameComponent = {
Name = "Floor"
},
SpriterRendererComponent = {
Color = {
R = 1,
G = 0.941886,
B = 0.401485,
A = 1
},
UvTransform = {
X = 0,
Y = 0,
Z = 1,
W = 1
}
},
TransformComponent = {
Position = {
X = 0,
Y = -0.5,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 10,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
Rigidbody2D = {
BodyType = .Static,
FixedRotation = false
},
BoxCollider2D = {
Offset = {
X = 0,
Y = 0
},
Size = {
X = 0.5,
Y = 0.5
},
Density = 1,
Friction = 0.5,
Restitution = 0,
RestitutionThreshold = 0.5
}
},
{
Id = 1491484622542812645,
NameComponent = {
Name = "Camera"
},
TransformComponent = {
Position = {
X = 0,
Y = 1,
Z = -5
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
CameraComponent = {
Primary = true,
ProjectionType = .InfinitePerspective,
PerspectiveFovY = 1.308997,
PerspectiveNearPlane = 0.1,
PerspectiveFarPlane = 10000,
OrthographicHeight = 10,
OrthographicNearPlane = 0,
OrthographicFarPlane = 10,
AspectRatio = 2.116827,
FixedAspectRatio = false
}
}
]
}
@@ -0,0 +1,505 @@
{
Name = "Scene name here pls!!!",
Entities = [
{
Id = 820806682740348099,
NameComponent = {
Name = "Quad"
},
SpriteRendererComponent = {
Color = {
R = 0,
G = 0.55117774,
B = 0.32878688,
A = 1
},
Sprite = "Assets/Textures/TestMat/rustediron2_albedo.png",
UvTransform = {
X = 0,
Y = 0,
Z = 1,
W = 1
}
},
TransformComponent = {
Position = {
X = -0.72789681,
Y = 2,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
Rigidbody2D = {
BodyType = .Dynamic,
FixedRotation = false
},
BoxCollider2D = {
Offset = {
X = 0,
Y = 0
},
Size = {
X = 0.5,
Y = 0.5
},
Density = 1,
Friction = 0.5,
Restitution = 0,
RestitutionThreshold = 0.5
}
},
{
Id = 15398726361722237419,
NameComponent = {
Name = "Floor"
},
SpriteRendererComponent = {
Color = {
R = 1,
G = 0.941887021,
B = 0.401484489,
A = 1
},
Sprite = "",
UvTransform = {
X = 0,
Y = 0,
Z = 1,
W = 1
}
},
TransformComponent = {
Position = {
X = 0,
Y = -0.5,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 10,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
Rigidbody2D = {
BodyType = .Static,
FixedRotation = false
},
BoxCollider2D = {
Offset = {
X = 0,
Y = 0
},
Size = {
X = 0.5,
Y = 0.5
},
Density = 1,
Friction = 0.5,
Restitution = 0,
RestitutionThreshold = 0.5
}
},
{
Id = 1491484622542812645,
NameComponent = {
Name = "Camera"
},
TransformComponent = {
Position = {
X = 0,
Y = 1,
Z = -5
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
CameraComponent = {
Primary = true,
ProjectionType = .InfinitePerspective,
PerspectiveFovY = 1.30899692,
PerspectiveNearPlane = 0.100000001,
PerspectiveFarPlane = 10000,
OrthographicHeight = 10,
OrthographicNearPlane = 0,
OrthographicFarPlane = 10,
AspectRatio = 2.05582929,
FixedAspectRatio = false
},
ScriptComponent = {
ScriptClass = "Sandbox.Camera",
Fields = [
DistanceFromPlayer = (Float)-7,
DontFollowRadius = (Float)3
] }
},
{
Id = 15710354273720487680,
NameComponent = {
Name = "Player"
},
CircleRendererComponent = {
Color = {
R = 1,
G = 0,
B = 0,
A = 1
},
InnerRadius = 0.300000012,
Sprite = "",
UvTransform = {
X = 0,
Y = 0,
Z = 1,
W = 1
}
},
TransformComponent = {
Position = {
X = -0.121203206,
Y = 0.660161078,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
Rigidbody2D = {
BodyType = .Dynamic,
FixedRotation = false
},
CircleCollider2D = {
Offset = {
X = 0,
Y = 0
},
Radius = 0.5,
Density = 1,
Friction = 0.5,
Restitution = 0,
RestitutionThreshold = 0.5
},
ScriptComponent = {
ScriptClass = "Sandbox.MyTestEntity",
Fields = [
_rigidBody = (Component)15710354273720487680,
TheEntity = (Entity)0,
JumpForce = (Float)200,
MoveForce = (Float)148,
MyNumber = (Int)22,
Camera = (Entity)1491484622542812645
] }
},
{
Id = 935640822766280888,
NameComponent = {
Name = "Light"
},
TransformComponent = {
Position = {
X = 3.88327599,
Y = 0,
Z = -0.808795214
},
Rotation = {
X = 0.497987002,
Y = -0.103420995,
Z = 0.155380026,
W = 0.846859217
},
Scale = {
X = 0.999997795,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 1.09089541,
Y = -0.340793997,
Z = 0.160857871
}
},
LightComponent = {
LightType = .Directional,
Illuminance = 12.8999996,
Color = {
R = 0.985467017,
G = 1,
B = 0.569977939
}
}
},
{
Id = 721949523193525565,
NameComponent = {
Name = "Sphere"
},
TransformComponent = {
Position = {
X = 0,
Y = 0,
Z = 2.56930423
},
Rotation = {
X = 0,
Y = 0,
Z = 0,
W = 1
},
Scale = {
X = 1,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0
}
},
MeshComponent = {
Mesh = "Assets/Models/sphere.glb"
},
MeshRendererComponent = {
Material = "Assets/Textures/TestMaterial.mat"
}
},
{
Id = 2241063100006479259,
NameComponent = {
Name = "Floor 2"
},
SpriteRendererComponent = {
Color = {
R = 0.425658971,
G = 0.855207443,
B = 0.0558161177,
A = 1
},
Sprite = "",
UvTransform = {
X = 0,
Y = 0,
Z = 1,
W = 1
}
},
TransformComponent = {
Position = {
X = 6.74610233,
Y = -2.03225946,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = -0.331792623,
W = 0.94335258
},
Scale = {
X = 5.29557419,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = -0.676406503
}
},
Rigidbody2D = {
BodyType = .Static,
FixedRotation = false
},
BoxCollider2D = {
Offset = {
X = 0,
Y = 0
},
Size = {
X = 0.5,
Y = 0.5
},
Density = 1,
Friction = 0.5,
Restitution = 0,
RestitutionThreshold = 0.5
}
},
{
Id = 5126705881069187728,
NameComponent = {
Name = "Floor 3"
},
SpriteRendererComponent = {
Color = {
R = 0.666117013,
G = 0.0600316115,
B = 1,
A = 1
},
Sprite = "",
UvTransform = {
X = 0,
Y = 0,
Z = 1,
W = 1
}
},
TransformComponent = {
Position = {
X = 15.2321281,
Y = -1.98709273,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0.134986058,
W = 0.990847468
},
Scale = {
X = 13.9764528,
Y = 1,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0.270798802
}
},
Rigidbody2D = {
BodyType = .Static,
FixedRotation = false
},
BoxCollider2D = {
Offset = {
X = 0,
Y = 0
},
Size = {
X = 0.5,
Y = 0.5
},
Density = 1,
Friction = 0.5,
Restitution = 0.800000012,
RestitutionThreshold = 0.5
}
},
{
Id = 6861260438693901700,
NameComponent = {
Name = "Floor 4"
},
SpriteRendererComponent = {
Color = {
R = 0.176544309,
G = 0.666713238,
B = 0.687030852,
A = 1
},
Sprite = "",
UvTransform = {
X = 0,
Y = 0,
Z = 1,
W = 1
}
},
TransformComponent = {
Position = {
X = -6.27842855,
Y = 2.62550163,
Z = 0
},
Rotation = {
X = 0,
Y = 0,
Z = 0.187087879,
W = 0.982343197
},
Scale = {
X = 0.999999464,
Y = 6.49634314,
Z = 1
},
EditorEulerRotation = {
X = 0,
Y = 0,
Z = 0.376393616
}
},
Rigidbody2D = {
BodyType = .Static,
FixedRotation = false
},
BoxCollider2D = {
Offset = {
X = 0,
Y = 0
},
Size = {
X = 0.5,
Y = 0.5
},
Density = 1,
Friction = 0.5,
Restitution = 0.899999857,
RestitutionThreshold = 0.5
}
}
]
}
@@ -0,0 +1,398 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GlitchyEngine;
using GlitchyEngine.Math;
using static GlitchyEngine.Math.Math;
namespace Sandbox;
public class Camera : Entity
{
public float DistanceFromPlayer = 5.0f;
public float DontFollowRadius = 3.0f;
void OnUpdate(float deltaTime)
{
Entity player = FindEntityWithName("Player");
if (player != null)
{
float2 playerPosition = player.Transform.Translation.XY;
float2 cameraPosition = Transform.Translation.XY;
float2 distanceVector = playerPosition - cameraPosition;
float distance = length(distanceVector);
float2 neededMovement = float2.Zero;
if (distance > DontFollowRadius)
{
neededMovement = distanceVector - (distanceVector / distance) * DontFollowRadius;
}
Transform.Translation = new float3(cameraPosition + neededMovement, DistanceFromPlayer);
}
else
{
Log.Error("Player not found!");
}
}
}
@@ -0,0 +1,155 @@
using System;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using GlitchyEngine;
using GlitchyEngine.Editor;
using GlitchyEngine.Math;
using static GlitchyEngine.Math.Math;
namespace Sandbox
{
public enum MyEnum
{
Yes = 1,
No,
Maybe = 1337
}
public struct MyStruct
{
public float TheFloat;
public float2 TheVector;
public MyEnum TheEnum;
}
class MyTestEntity : Entity
{
[ShowInEditor]
RigidBody2D _rigidBody;
//public bool Bo;
//public byte By;
//public ushort Us;
//public uint Ui;
//public ulong Ul;
//public sbyte Sb;
//public short Sh;
//public int In;
//public long Lo;
//public float Fl;
//public double Do;
//public float2 V2;
//public float3 V3;
//public float4 V4;
public Entity TheEntity;
public float JumpForce = 2000;
[ShowInEditor] float MoveForce = 1000;
[ShowInEditor] private int MyNumber = 1337;
//[ShowInEditor] public double MyDouble = 1000.0f;
public MyStruct AStruct;
public MyEnum AEnum = MyEnum.Maybe;
public Camera Camera;
/// <summary>
/// Called after the script component was created. (The entity might not be fully created yet)
/// </summary>
void OnCreate()
{
Log.Info($"Create! {UUID}");
Log.Info($"Jump Force: {JumpForce}");
//_rigidBody ??= GetComponent<RigidBody2D>() ?? AddComponent<RigidBody2D>();
if (_rigidBody == null)
{
Log.Error("_rigidBody was not set in editor.");
}
if (Camera == null)
{
Log.Warning("Camera wasn't set in editor. Searching...");
Camera = FindEntityWithName("Camera").As<Camera>();
if (Camera == null)
{
Log.Error("Camera not found.");
}
}
Log.Warning("Achtung.");
try
{
SubVoid();
}
catch (Exception e)
{
Console.WriteLine(e);
throw e;
}
}
void SubVoid()
{
throw new Exception("Ouha!", new IndexOutOfRangeException("Bist du jecke2?!", new AccessViolationException("Haleluja")));
}
/// <summary>
/// Called every frame.
/// </summary>
/// <param name="deltaTime"></param>
void OnUpdate(float deltaTime)
{
float2 force = float2.Zero;
if (Input.IsKeyPressed(Key.A))
{
force.X -= MoveForce * deltaTime;
}
if (Input.IsKeyPressed(Key.D))
{
force.X += MoveForce * deltaTime;
}
if (Input.IsKeyPressed(Key.Q))
Camera.DistanceFromPlayer -= deltaTime;
if (Input.IsKeyPressed(Key.E))
Camera.DistanceFromPlayer += deltaTime;
if (Input.IsKeyPressing(Key.Space))
{
force.Y += JumpForce;
}
if (Input.IsKeyPressing(Key.N))
SubVoid();
_rigidBody.ApplyForceToCenter(force);
if (Input.IsMouseButtonReleasing(MouseButton.MiddleButton))
{
Log.Info($"Ouha! {MyNumber}");
Physics2D.Gravity *= new float2(1, -1);
}
}
/// <summary>
/// Called before the component is being destroyed.
/// </summary>
void OnDestroy()
{
Log.Trace("Destroy");
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("SandboxProject")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SandboxProject")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("7a70819c-5317-402a-8553-95c5a001e370")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7A70819C-5317-402A-8553-95C5A001E370}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SandboxProject</RootNamespace>
<AssemblyName>SandboxProject</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>default</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>default</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Camera.cs" />
<Compile Include="MyTestEntity.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\ScriptCore\ScriptCore.csproj">
<Project>{6222c226-fc78-498c-80ba-5cf10ac9123c}</Project>
<Name>ScriptCore</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -0,0 +1,37 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SandboxProject", "SandboxProject.csproj", "{7A70819C-5317-402A-8553-95C5A001E370}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScriptCore", "..\..\..\..\ScriptCore\ScriptCore.csproj", "{6222C226-FC78-498C-80BA-5CF10AC9123C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScriptCoreGenerator", "..\..\..\..\ScriptCoreGenerator\ScriptCoreGenerator.csproj", "{5D662996-1E1E-4170-A08A-B26CDB63A0DE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7A70819C-5317-402A-8553-95C5A001E370}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A70819C-5317-402A-8553-95C5A001E370}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A70819C-5317-402A-8553-95C5A001E370}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A70819C-5317-402A-8553-95C5A001E370}.Release|Any CPU.Build.0 = Release|Any CPU
{6222C226-FC78-498C-80BA-5CF10AC9123C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6222C226-FC78-498C-80BA-5CF10AC9123C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6222C226-FC78-498C-80BA-5CF10AC9123C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6222C226-FC78-498C-80BA-5CF10AC9123C}.Release|Any CPU.Build.0 = Release|Any CPU
{5D662996-1E1E-4170-A08A-B26CDB63A0DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D662996-1E1E-4170-A08A-B26CDB63A0DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D662996-1E1E-4170-A08A-B26CDB63A0DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D662996-1E1E-4170-A08A-B26CDB63A0DE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B5D43D8D-D80B-41AA-BE40-1DC507D87148}
EndGlobalSection
EndGlobal
Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 13149961070100324290
}
@@ -0,0 +1,39 @@
{
Effect = "Resources/Shaders/myEffect.hlsl",
Textures = [
"AlbedoTexture": 8153940681327484189,
"NormalTexture": 15822842502398518390,
"MetallicTexture": 13527693616095745667,
"RoughnessTexture": 4141437666158293647,
"EmissiveTexture": 0
],
Variables = [
"AlbedoColor": .ColorRGBA{
Value = {
R = 1,
G = 1,
B = 1,
A = 1
}
},
"NormalScaling": .Float2{
Value = {
X = 1,
Y = 1
}
},
"MetallicFactor": .Float{
Value = 1
},
"RoughnessFactor": .Float{
Value = 0
},
"EmissiveColor": .Float3{
Value = {
X = 0,
Y = 0,
Z = 0
}
}
]
}
@@ -0,0 +1,5 @@
{
AssetLoader = "MaterialAssetLoader",
Config = (GlitchyEditor.Assets.ModelAssetLoaderConfig){}/* No reflection data for GlitchyEditor.Assets.ModelAssetLoaderConfig. Add [BonTarget] or force it */,
AssetHandle = 15093501654975430075
}
@@ -0,0 +1,31 @@
{
Effect = "Resources/Shaders/myEffect.hlsl",
Textures = [
"AlbedoTexture": "Assets/Textures/rocket.png",
"NormalTexture": "Assets/Textures/TestMat/rustediron2_normal.png",
"MetallicTexture": "Assets/Textures/TestMat/rustediron2_metallic.png",
"RoughnessTexture": "Assets/Textures/TestMat/rustediron2_roughness.png"
],
Variables = [
"AlbedoColor": .ColorRGBA{
Value = {
R = 1,
G = 1,
B = 1,
A = 1
}
},
"NormalScaling": .Float2{
Value = {
X = 1,
Y = 1
}
},
"MetallicFactor": .Float{
Value = 0
},
"RoughnessFactor": .Float{
Value = 1
}
]
}
@@ -0,0 +1,5 @@
{
AssetLoader = "MaterialAssetLoader",
Config = (GlitchyEditor.Assets.ModelAssetLoaderConfig){}/* No reflection data for GlitchyEditor.Assets.ModelAssetLoaderConfig. Add [BonTarget] or force it */,
AssetHandle = 8829406607210635133
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 5558090951492679375
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 8153940681327484189
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 13527693616095745667
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 MiB

@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 15822842502398518390
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 4141437666158293647
}
@@ -0,0 +1,39 @@
{
Effect = "Resources/Shaders/myEffect.hlsl",
Textures = [
"AlbedoTexture": "Assets/Textures/TestMat/rustediron2_albedo.png",
"NormalTexture": "Assets/Textures/TestMat/rustediron2_normal.png",
"MetallicTexture": "Assets/Textures/TestMat/rustediron2_metallic.png",
"RoughnessTexture": "Assets/Textures/TestMat/rustediron2_roughness.png",
"EmissiveTexture": "Assets/Textures/rocket.png"
],
Variables = [
"AlbedoColor": .ColorRGBA{
Value = {
R = 1,
G = 1,
B = 1,
A = 1
}
},
"NormalScaling": .Float2{
Value = {
X = 1,
Y = 1
}
},
"MetallicFactor": .Float{
Value = 1
},
"RoughnessFactor": .Float{
Value = 1
},
"EmissiveColor": .ColorRGB{
Value = {
R = 1,
G = 0,
B = 0
}
}
]
}
@@ -0,0 +1,5 @@
{
AssetLoader = "MaterialAssetLoader",
Config = (GlitchyEditor.Assets.ModelAssetLoaderConfig){}/* No reflection data for GlitchyEditor.Assets.ModelAssetLoaderConfig. Add [BonTarget] or force it */,
AssetHandle = 9886473966965265328
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 14357509390762845070
}
@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 5635535744559587375
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 10807131213209469263
}
@@ -0,0 +1,24 @@
{
AssetLoader = "EditorTextureAssetLoader",
Config = (GlitchyEditor.Assets.EditorTextureAssetLoaderConfig){
_samplerStateDescription = {
MinFilter = .Linear,
MagFilter = .Linear,
MipFilter = .Linear,
ComparisonFunction = .Never,
AddressModeU = .Clamp,
AddressModeV = .Clamp,
AddressModeW = .Clamp,
MipMinLOD = -3.40282347e+38,
MipMaxLOD = 3.40282347e+38,
MaxAnisotropy = 1,
BorderColor = {
R = 1,
G = 1,
B = 1,
A = 1
}
}
},
AssetHandle = 5889819840498959425
}
+1
View File
@@ -0,0 +1 @@
{_projectName="SandboxProject"}
@@ -0,0 +1 @@
{_recentScenes=["Assets\\Scenes\\physics2D.scene"]}
+1
View File
@@ -0,0 +1 @@
4.5/
+1
View File
@@ -0,0 +1 @@
Install mono and copy the folder `lib/mono/4.5` here!
Binary file not shown.
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 9434890118063137951
}
@@ -0,0 +1,5 @@
{
Effect = 7757902626263730438,
Textures = [],
Constants = []
}
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "MaterialImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 14657247797693923776
}
@@ -0,0 +1,5 @@
{
Effect = 2172704887168568810,
Textures = [],
Constants = []
}
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "MaterialImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 15110879072477854834
}
@@ -0,0 +1,401 @@
# Ignore user Settings
project_user.bon
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 12886429392536704724
}
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- General configuration -->
<AssemblyTitle>[ProjectName]</AssemblyTitle>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Library</OutputType>
<Nullable>enable</Nullable>
<!-- Define the output path -->
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>./.cache/bin/</OutputPath>
<!-- Generates a runtimeconfig-file and copies nuget references to the output -->
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<ItemGroup>
<Reference Include="ScriptCore" OutputItemType="Analyzer" ReferenceOutputAssembly="true">
<HintPath>/ScriptCore.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 17767079304205108419
}
@@ -0,0 +1,3 @@
<Solution>
<Project Path="[ProjectName].csproj" />
</Solution>
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 15274144675004602184
}
+52
View File
@@ -0,0 +1,52 @@
//=================================================================================================
//
// Baking Lab
// by MJP and David Neubelt
// http://mynameismjp.wordpress.com/
//
// All code licensed under the MIT license
//
//=================================================================================================
// The code in this file was originally written by Stephen Hill (@self_shadow), who deserves all
// credit for coming up with this fit and implementing it. Buy him a beer next time you see him. :)
// Source: https://github.com/TheRealMJP/BakingLab/blob/master/BakingLab/ACES.hlsl
// sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT
static const float3x3 ACESInputMat =
{
{0.59719, 0.35458, 0.04823},
{0.07600, 0.90834, 0.01566},
{0.02840, 0.13383, 0.83777}
};
// ODT_SAT => XYZ => D60_2_D65 => sRGB
static const float3x3 ACESOutputMat =
{
{ 1.60475, -0.53108, -0.07367},
{-0.10208, 1.10813, -0.00605},
{-0.00327, -0.07276, 1.07602}
};
float3 RRTAndODTFit(float3 v)
{
float3 a = v * (v + 0.0245786f) - 0.000090537f;
float3 b = v * (0.983729f * v + 0.4329510f) + 0.238081f;
return a / b;
}
float3 ACESFitted(float3 color)
{
color = mul(ACESInputMat, color);
// Apply RRT and ODT
color = RRTAndODTFit(color);
color = mul(ACESOutputMat, color);
// Clamp to [0, 1]
color = saturate(color);
return color;
}
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 928998782684229984
}
@@ -0,0 +1,16 @@
cbuffer Constants : register(b0)
{
uint ClearValue;
}
float4 VS(float2 input : POSITION) : SV_Position
{
return float4(input, 0.0f, 1.0f);
}
uint PS(float4 input : SV_Position) : SV_Target0
{
return ClearValue;
}
#pragma Effect[VS = VS; PS = PS]
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 3971197750817239312
}
@@ -0,0 +1,35 @@
// TODO: General pipeline for post processing effects
Texture2D Texture : register(t0);
SamplerState TextureSampler : register(s0);
struct VS_IN
{
float2 Position : POSITION;
float2 TexCoord : TEXCOORD0;
};
struct PS_IN
{
float4 Position : SV_POSITION;
float2 TexCoord : TEXCOORD;
};
PS_IN VS(VS_IN input)
{
PS_IN output;
output.Position = float4(input.Position, 0, 1);
output.TexCoord = input.TexCoord;
return output;
}
float4 PS(PS_IN input) : SV_TARGET
{
float4 color = Texture.Sample(TextureSampler, input.TexCoord);
return float4(pow(color.rgb, 1.0f / 2.2f), color.a);
}
#pragma Effect[VS = VS; PS = PS]
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 315199643377983302
}
@@ -0,0 +1,59 @@
#pragma EngineBuffer[ Name = "SceneConstants"; Binding = "Scene" ]
cbuffer SceneConstants : register(b0)
{
float4x4 ViewProjection;
}
#pragma EngineBuffer[ Name = "ObjectConstants"; Binding = "Object" ]
cbuffer ObjectConstants : register(b1)
{
float4x4 Transform;
/**
* \brief Inverted and transposed transform matrix.
* \remarks This matrix is used in order to correctly transform normal vectors.
*/
float4x3 Transform_InvT;
#ifdef OutputEntityId
uint EntityId;
#endif
}
/**
* \brief Pixel Shader output for lit surfaces.
*/
struct PS_OUT_Lit
{
/** RGB: Albedo A: Transparency */
float4 Albedo : SV_TARGET0;
/** RG: TextureNormal.XY | BA: GeoNrm.XY */
float4 Normal : SV_TARGET1;
/** R: GeoNrm.Z | GBA: GeoTan.XYZ */
float4 Tangent : SV_TARGET2;
/** RGB: world position XYZ | A: 1.0 */
float4 Position : SV_TARGET3;
/** RGB: emissive light and color | A: unused */
float4 Emissive : SV_TARGET4;
/** R: Metallicity | G: Roughness | B: Ambient | A: Unused */
float4 Material : SV_TARGET5;
#ifdef OutputEntityId
/** Needed for editor picking. Simply pass through the EntityId. */
uint EntityId : SV_TARGET6;
#endif
};
/**
* \brief Pixel Shader output for unlit surfaces.
*/
struct PS_OUT_Unlit
{
/** RGB: Color A: Transparency */
float4 Color : SV_TARGET0;
/** RGB: emissive light and color | A: unused */
float4 Emissive : SV_TARGET1;
/** RGB: world position XYZ | A: 1.0 */
float4 Position : SV_TARGET2;
#ifdef OutputEntityId
uint EntityId : SV_TARGET5;
#endif
};
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 8508337008960456447
}
@@ -0,0 +1,74 @@
#pragma EngineBuffer[ Name = "SceneConstants"; Binding = "Scene" ]
/**
* Contains constants that apply to the current scene.
*/
cbuffer SceneConstants : register(b0)
{
/**
* View projection matrix of the active camera.
*/
float4x4 ViewProjection;
}
/**
* Contains the data provided by the engine for a 2D vertex shader.
*/
struct VS_Input
{
// Geometry
/**
* Vertex position
*/
float2 Position : POSITION;
/**
* Vertex texture coordinate
*/
float2 Texcoord : TEXCOORD0;
// Instance data
/**
* model to world transform matrix of the current quad.
*/
float4x4 Transform : TRANSFORM;
/**
* Color of the current quad.
*/
float4 Color : COLOR;
/**
* model to world transform matrix of the current quad.
*/
float4 UVTransform : TEXCOORD1;
#ifdef EDITOR
/**
* The ECS ID of the entity associated with the current quad.
*/
uint EntityId : ENTITYID;
#endif
};
/**
* Contains the output data of the vertex shader that will be passed into the pixel shader.
*/
typedef struct PS_Input
{
/**
* The screen space position of the current vertex.
*/
float4 Position : SV_Position;
/**
* The transformed texture coordinates of the current vertex.
*/
float2 Texcoord : TEXCOORD;
/**
* The color of the current vertex.
*/
float4 Color : COLOR;
#ifdef EDITOR
/**
* The ECS ID of the entity associated with the current quad.
* This should always just be passed through.
*/
nointerpolation uint EntityId : ENTITYID;
#endif
} VS_Output;
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 15977579743485633133
}
@@ -0,0 +1,28 @@
#define PI 3.14159265358979323846f
/**
* Calculates the diffuse lighting of a lambertian surface
* @param diffuseColor (rho/ pi) * C_diffuse
* @param illuminanceColor The product of the "brightness" and the light color.
* @param n_dot_l The dot product of the surface normal and the light direction.
*/
float3 CalculateDiffuseReflection(float3 diffuseColor, float3 illuminanceColor, float3 n_dot_l)
{
float3 directColor = illuminanceColor * saturate(n_dot_l);
return (directColor * diffuseColor);
}
/**
* Calculates the blinn-phong-specular reflection
* @param n The normalized surface normal
* @param h The normalized half way vector (nrm(l + v))
* @param alpha The reflections alpha-value
* @param illuminanceColor The product of the "brightness" and the light color.
* @param n_dot_l The dot product of the surface normal and the light direction.
*/
float3 CalculateSpecularReflection(float3 n, float3 h, float alpha, float3 illuminanceColor, float n_dot_l)
{
float highlight = pow(saturate(dot(n, h)), alpha) * float(n_dot_l > 0.0);
return (illuminanceColor * highlight); // Todo: * SpecularColor
}
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 5789702360838490150
}
+78
View File
@@ -0,0 +1,78 @@
/*
* This File contains Function for PBR.
*/
#ifndef __PBR_HLSL__
#define __PBR_HLSL__
#include "ShaderHelpers.hlsl"
// #define PBR_IBL
/**
* Normal Distribution Function. (Trowbridge-Reits GGX)
* Calculates the relative surface area of microfacets exactly aligned to the halfway vector.
* @param normal The surface normal.
* @param halfway The halfway vector between the surface normal and the view direction.
* @param roughness Roughness value.
* @returns The relative surface area of microfacets exactly aligned to the halfway vector.
*/
float NormalDistributionGGX(float3 normal, float3 halfway, float roughness)
{
// Square roughness because it looks better
float a = roughness * roughness;
float aa = a * a;
float n_dot_h = max(dot(normal, halfway), 0.0f);
float denom = (n_dot_h * n_dot_h) * (aa - 1.0f) + 1.0f;
denom = PI * denom * denom;
return aa / denom;
}
/**
* Geometry Function calculating the overshadowing of microfacets based on roughness. (Schlick-Beckmann GGX).
* @param dot-product of normal vector and vector from surface to camera.
* @param k Roughness value.
*/
float GeometrySchlickGGX(float n_dot_v, float k)
{
return n_dot_v / (n_dot_v * (1 - k) + k);
}
/**
* Geometry Function calculating the overshadowing of microfacets based on roughness. (Smith)
* @param normal The surface normal.
* @param viewDir Vector from surface to viewer.
* @param lightDir Vector from surface to light source.
* @param roughness Roughness value.
*/
float GeometrySmith(float3 normal, float3 viewDir, float3 lightDir, float roughness)
{
#ifdef PBR_IBL
// IBL
float k = roughness * roughness / 2;
#else
// Direct lighting
float k = (roughness + 1.0f);
k = (k * k) / 8;
#endif
const float n_dot_v = max(dot(normal, viewDir), 0.0f);
float n_dot_l = max(dot(normal, lightDir), 0.0f);
return GeometrySchlickGGX(n_dot_v, k) * GeometrySchlickGGX(n_dot_l, k);
}
/**
* Calculates the fresnel value.
* @param n_dot_v Dot product of the normal and view direction
* @param F0 base reflectivity.
*/
float3 FresnelSchlick(float n_dot_v, float3 F0)
{
return F0 + (1.0 - F0) * pow(clamp(1.0 - n_dot_v, 0.0, 1.0), 5.0);
}
#endif // __PBR_HLSL__
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 13875759478508290092
}
@@ -0,0 +1,28 @@
#include "GlitchyEngine.hlsl"
struct VS_IN
{
float3 Position : POSITION;
};
struct PS_IN
{
float4 Position : SV_POSITION;
};
PS_IN VS(VS_IN input)
{
PS_IN output;
float4 worldPosition = mul(Transform, float4(input.Position, 1));
output.Position = mul(ViewProjection, worldPosition);
return output;
}
float4 PS(PS_IN input) : SV_TARGET
{
return float4(1, 0, 1, 1);
}
#pragma Effect[VS = VS; PS = PS]
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 652951988555027469
}
@@ -0,0 +1,28 @@
#include "GlitchyEngine.hlsl"
struct VS_IN
{
float3 Position : POSITION;
};
struct PS_IN
{
float4 Position : SV_POSITION;
};
PS_IN VS(VS_IN input)
{
PS_IN output;
float4 worldPosition = mul(Transform, float4(input.Position, 1));
output.Position = mul(ViewProjection, worldPosition);
return output;
}
float4 PS(PS_IN input) : SV_TARGET
{
return float4(0, 1, 1, 1);
}
#pragma Effect[VS = VS; PS = PS]
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 3052446500956620342
}
@@ -0,0 +1,178 @@
#include "ShaderHelpers.hlsl"
Texture2DArray Texture : register(t0);
SamplerState Sampler : register(s0);
Texture2DArray<int4> IntTexture : register(t1);
SamplerState IntSampler : register(s1);
Texture2DArray<uint4> UIntTexture : register(t2);
SamplerState UIntSampler : register(s2);
#define SWIZZLE_ZERO 0
#define SWIZZLE_ONE 1
#define SWIZZLE_R 2
#define SWIZZLE_G 3
#define SWIZZLE_B 4
#define SWIZZLE_A 5
#define SWIZZLE_ONE_MINUS_R 6
#define SWIZZLE_ONE_MINUS_G 7
#define SWIZZLE_ONE_MINUS_B 8
#define SWIZZLE_ONE_MINUS_A 9
cbuffer Constants
{
float ColorOffset = 0.5;
float AlphaOffset = 0.0;
float ColorScale = 0.5;
float AlphaScale = 1.0;
float MipLevel = 0.0;
float ArraySlice = 0.0;
// 0: Float | 1: Int | 2: Uint
int Mode = 0;
int4 Swizzle = int4(SWIZZLE_R, SWIZZLE_G, SWIZZLE_B, SWIZZLE_A);
float2 Texels;
float4x4 WorldViewProjection;
bool ShowTexelBorders = true;
float TexelBorderCutoff = 10;
}
struct VS_Input
{
float2 Position : POSITION;
float2 Texcoord : TEXCOORD0;
};
struct PS_Input
{
float4 Position : SV_Position;
float2 Texcoord : TEXCOORD0;
};
PS_Input VS(VS_Input input)
{
PS_Input output;
output.Position = mul(WorldViewProjection, float4(input.Position, 0.0f, 1.0f));
output.Texcoord = input.Texcoord;
return output;
}
void SwizzleColor(int swizzleMode, float4 colorToSwizzle, inout float output)
{
switch (swizzleMode)
{
case SWIZZLE_ZERO:
output = 0.0;
break;
case SWIZZLE_ONE:
output = 1.0;
break;
case SWIZZLE_R:
output = colorToSwizzle.r;
break;
case SWIZZLE_G:
output = colorToSwizzle.g;
break;
case SWIZZLE_B:
output = colorToSwizzle.b;
break;
case SWIZZLE_A:
output = colorToSwizzle.a;
break;
case SWIZZLE_ONE_MINUS_R:
output = 1.0 - colorToSwizzle.r;
break;
case SWIZZLE_ONE_MINUS_G:
output = 1.0 - colorToSwizzle.g;
break;
case SWIZZLE_ONE_MINUS_B:
output = 1.0 - colorToSwizzle.b;
break;
case SWIZZLE_ONE_MINUS_A:
output = 1.0 - colorToSwizzle.a;
break;
default:
break;
}
}
/**
* Returns whether or not the current pixel lies on the border between two texels.
* @param texelPosition The position in texel coordinates [0...Texels)
* @param color The sampled color at the current position. This will be modified if the pixel is on a texel border.
*/
void ApplyTexelBorder(float2 texelPosition, inout float4 color)
{
// Calculate derivatives of texelPosition -> how many texels to we move if we move one pixel in x/y direction
float2 grad = fwidth(texelPosition);
float texelsPerPixel = min(grad.x, grad.y);
float pixelsPerTexel = 1.0 / texelsPerPixel;
// Calculate the distance between the screen pixel and the texel border in texels.
float2 fracPart = frac(texelPosition);
float2 distanceToBorder = min(fracPart, 1.0 - fracPart);
// One, if texel is closer to border than threshold.
// Threshold is half the size of a screen pixel in texel-space.
float2 borderTest = step(distanceToBorder, texelsPerPixel / 2.0);
//float2 borderTest = saturate(1.0 - distanceToBorder / grad);
float isOnLine = max(borderTest.x, borderTest.y);
float fade = saturate((pixelsPerTexel - TexelBorderCutoff / 2.0) / (TexelBorderCutoff / 2.0));
// TODO: This can flicker while moving/zooming, because we are by design on a texel border!
float luminance = ColorToLuminance(color.rgb);
// Ensure the border is always at least 0.5 luminance away from the texel.
float4 borderColor = float4(((luminance + 0.5) % 1).xxx, 1.0);
color = lerp(color, borderColor, isOnLine * fade * 0.8);
}
float4 PS(PS_Input input) : SV_Target0
{
float4 outputColor;
float2 texelPosition = input.Texcoord * Texels;
if (Mode == 0)
{
//float4 color = Texture.SampleLevel(Sampler, float3(input.Texcoord, ArraySlice), MipLevel);
// Quasi next neighbor
float4 color = Texture.Load(int4(texelPosition, ArraySlice, MipLevel));
outputColor = float4(ColorOffset.xxx, AlphaOffset) + color * float4(ColorScale.xxx, AlphaScale);
}
else if (Mode == 1)
{
int4 color = IntTexture.Load(int4(texelPosition, ArraySlice, MipLevel));
outputColor = float4(ColorOffset.xxx, AlphaOffset) + color * float4(ColorScale.xxx, AlphaScale);
}
else if (Mode == 2)
{
uint4 color = UIntTexture.Load(int4(texelPosition, ArraySlice, MipLevel));
outputColor = float4(ColorOffset.xxx, AlphaOffset) + color * float4(ColorScale.xxx, AlphaScale);
}
float4 swizzledOutput = float4(0, 0, 0, 1);
SwizzleColor(Swizzle.r, outputColor, swizzledOutput.r);
SwizzleColor(Swizzle.g, outputColor, swizzledOutput.g);
SwizzleColor(Swizzle.b, outputColor, swizzledOutput.b);
SwizzleColor(Swizzle.a, outputColor, swizzledOutput.a);
if (ShowTexelBorders)
{
ApplyTexelBorder(texelPosition, swizzledOutput);
}
return swizzledOutput;
}
#pragma Effect[VS=VS; PS=PS]
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 17953005509950866729
}
@@ -0,0 +1,101 @@
#ifndef __SHADER_HELPERS_HLSL__
#define __SHADER_HELPERS_HLSL__
#define PI 3.14159265358979323846f
/*
* Calculates the weighted sum of two normal vectors.
* nrm1: The first normal vector
* nrm2: The second normal vector
* a: The weight factor for nrm1
* b: The weight factor for nrm2
*/
float3 BlendNormals(float3 nrm1, float3 nrm2, float a, float b)
{
return normalize(float3(a * nrm1.x / nrm1.z + b * nrm2.x / nrm2.z,
a * nrm1.y / nrm1.z + b * nrm2.y / nrm2.z,
1.0f));
}
/*
* Scales a normal vector by a factor where 0 results in the vector (0, 0, 1)
* nrm: The normal vector
* a: The scaling factor
*/
float3 ScaleNormal(float3 nrm1, float a)
{
return normalize(float3(a * nrm1.x / nrm1.z,
a * nrm1.y / nrm1.z,
1.0f));
}
/*
* Scales a normal vector by a factor where 0 results in the vector (0, 0, 1)
* nrm: The normal vector
* a: The scaling factor
*/
float3 ScaleNormal(float3 nrm1, float2 a)
{
return normalize(float3(a.x * nrm1.x / nrm1.z,
a.y * nrm1.y / nrm1.z,
1.0f));
}
/*
* Reconstructs the z-component of a normalized normal vector from a two-component value
* cnrm: The x- and y-components of a normalized normal vector
*/
float3 DecompressNormal(float2 cnrm)
{
return float3(cnrm, sqrt(1.0 - cnrm.x * cnrm.x - cnrm.y * cnrm.y));
}
/*
* Reconstructs the tangent space from a normal and a tangent
* normal: The surface normal
* tangent: The surface tangent
* sigma: Defines the handedness of the tangent space matrix. 1.0 if it is right handend. -1.0 if it is left handed
*/
float3x3 ConstructTangentSpace(float3 normal, float3 tangent, float3 sigma)
{
float3 n = normalize(normal);
float3 t = normalize(tangent - n * dot(tangent, n));
float3 b = cross(n, t) * sigma;
return float3x3(t, b, n);
}
/**
* Calculates the luminance of an rgb-value.
* @param rgb The rgb color.
* @return The luminance of the given rgb color.
*/
float ColorToLuminance(float3 rgb)
{
return dot(rgb, float3(0.212639,0.715169,0.072192));
}
/**
* Extrancts the handedness of the bitangent that is encoded in the z-component of the tangent.
* @param tangentz The z-component of the tangent with the handedness encoded.
* @return The handedness of the bitangent (bitangent = handedness * tangent x normal)
*/
float GetBitangentHandedness(float tangentz)
{
// handedness is in least significant bit of tangent.z
uint z = asuint(tangentz);
return (z & 1) > 0 ? 1.0 : -1.0;
}
/**
* Transforms the given texture coordinates using the provided UV transform.
* @param texcoords The texture coordinates to transform.
* @param uvTransform the UV transform. X, Y: UV offset | Z, W: UV scaling.
* @return The transformed uv coordinates.
*/
float2 TransformTexcoords(float2 texcoords, float4 uvTransform)
{
return uvTransform.xy + uvTransform.zw * texcoords;
}
#endif // __SHADER_HELPERS_HLSL__
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 15853638422335091598
}
@@ -0,0 +1,39 @@
#include "ACES.hlsl"
Texture2D CameraTarget : register(t0);
SamplerState CameraTargetSampler : register(s0);
struct VS_IN
{
float2 Position : POSITION;
float2 TexCoord : TEXCOORD0;
};
struct PS_IN
{
float4 Position : SV_POSITION;
float2 TexCoord : TEXCOORD;
};
PS_IN VS(VS_IN input)
{
PS_IN output;
output.Position = float4(input.Position, 0, 1);
output.TexCoord = input.TexCoord;
return output;
}
float4 PS(PS_IN input) : SV_TARGET
{
float4 rawColor = CameraTarget.Sample(CameraTargetSampler, input.TexCoord);
// float3 color = rawColor.rgb / (rawColor.rgb + 1.0f);
float3 color = ACESFitted(rawColor.rgb);
return float4(color, 1);
}
#pragma Effect[VS = VS; PS = PS]
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 16539769359681819317
}
@@ -0,0 +1,88 @@
#define EDITOR
Texture2D Texture : register(t0);
SamplerState Sampler : register(s0);
cbuffer Constants : register(b0)
{
float4x4 ViewProjection;
};
struct VS_Input
{
float2 Position : POSITION;
float2 Texcoord : TEXCOORD0;
float4x4 Transform : TRANSFORM;
float4 Color : COLOR;
float4 UVTransform : TEXCOORD1;
float InnerRadius : TEXCOORD2;
#ifdef EDITOR
uint EntityId : ENTITYID;
#endif
};
struct PS_Input
{
float4 Position : SV_Position;
float2 RawPos : TEXCOORD0;
float2 Texcoord : TEXCOORD1;
float4 Color : COLOR;
#ifdef EDITOR
nointerpolation uint EntityId : ENTITYID;
#endif
float InnerRadius : TEXCOORD2;
};
PS_Input VS(VS_Input input)
{
PS_Input output;
output.Position = mul(ViewProjection, mul(input.Transform, float4(input.Position, 0.0f, 1.0f)));
output.Texcoord = input.UVTransform.xy + input.UVTransform.zw * input.Texcoord;
output.RawPos = input.Position;
output.Color = input.Color;
output.InnerRadius = input.InnerRadius;
#ifdef EDITOR
output.EntityId = input.EntityId;
#endif
return output;
}
struct PS_Output
{
float4 Color : SV_Target0;
#ifdef EDITOR
uint EntityId : SV_TARGET1;
#endif
};
PS_Output PS(PS_Input input)
{
PS_Output output;
float2 uv = input.RawPos * 2;
float distance = 1.0f - length(uv);
// Smoothing edges based on derivative (not sure if RawPos is the best value for this)
float f = fwidth(input.RawPos.x) + fwidth(input.RawPos.y);
float amount = smoothstep(0.0f, f, distance);
amount *= smoothstep(input.InnerRadius + f, input.InnerRadius, distance);
// Discard invisible pixels
clip(amount - 0.5f);
output.Color = Texture.Sample(Sampler, input.Texcoord) * input.Color;
output.Color.a *= amount;
#ifdef EDITOR
output.EntityId = input.EntityId;
#endif
return output;
}
#pragma Effect[VS=VS; PS=PS]
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 15706760057808399494
}
@@ -0,0 +1,31 @@
cbuffer Constants : register(b0)
{
float4x4 ViewProjection;
float4 Color;
};
struct VS_Input
{
float4 Position : POSITION;
};
struct PS_Input
{
float4 Position : SV_Position;
};
PS_Input VS(VS_Input input)
{
PS_Input output;
output.Position = mul(ViewProjection, input.Position);
return output;
}
float4 PS(PS_Input input) : SV_Target0
{
return Color;
}
#pragma Effect[VS=VS; PS=PS]
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 10636491756936205086
}
@@ -0,0 +1,61 @@
#define EDITOR
cbuffer Constants : register(b0)
{
float4x4 ViewProjection;
};
struct VS_Input
{
float4 Position : POSITION;
float4 Color : COLOR;
#ifdef EDITOR
uint EntityId : ENTITYID;
#endif
};
typedef struct PS_Input
{
float4 Position : SV_Position;
float4 Color : COLOR;
#ifdef EDITOR
nointerpolation uint EntityId : ENTITYID;
#endif
} VS_Output;
VS_Output VS(VS_Input input)
{
VS_Output output;
output.Position = mul(ViewProjection, input.Position);
output.Color = input.Color;
#ifdef EDITOR
output.EntityId = input.EntityId;
#endif
return output;
}
struct PS_Output
{
float4 Color : SV_TARGET0;
#ifdef EDITOR
uint EntityId : SV_TARGET1;
#endif
};
PS_Output PS(PS_Input input)
{
PS_Output output;
output.Color = input.Color;
#ifdef EDITOR
output.EntityId = input.EntityId;
#endif
return output;
}
#pragma Effect[VS=VS; PS=PS]
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 5888610203248969416
}
@@ -0,0 +1,68 @@
#define EDITOR
#include "GlitchyEngine2D.hlsl"
#include "ShaderHelpers.hlsl"
Texture2D<float3> Texture : register(t0);
SamplerState Sampler : register(s0);
cbuffer Material
{
float2 UnitRange;
}
VS_Output VS(VS_Input input)
{
VS_Output output;
output.Position = mul(ViewProjection, mul(input.Transform, float4(input.Position, 0.0f, 1.0f)));
output.Texcoord = TransformTexcoords(input.Texcoord, input.UVTransform);
output.Color = input.Color;
#ifdef EDITOR
output.EntityId = input.EntityId;
#endif
return output;
}
float median(float r, float g, float b)
{
return max(min(r, g), min(max(r, g), b));
}
float ScreenPxRange(float2 texcoord)
{
float2 screenTexSize = 1.0f / fwidth(texcoord);
return max(0.5f * dot(UnitRange, screenTexSize), 1.0f);
}
struct PS_Output
{
float4 Color : SV_Target0;
#ifdef EDITOR
uint EntityId : SV_TARGET1;
#endif
};
PS_Output PS(PS_Input input)
{
PS_Output output;
float3 msd = Texture.Sample(Sampler, input.Texcoord);
float sd = median(msd.r, msd.g, msd.b);
float screenPxDistance = ScreenPxRange(input.Texcoord) * (sd - 0.5);
float opacity = clamp(screenPxDistance + 0.5, 0.0, 1.0);
clip(opacity - 0.001f);
output.Color = float4(input.Color.rgb, input.Color.a * opacity);
#ifdef EDITOR
output.EntityId = input.EntityId;
#endif
return output;
}
#pragma Effect[VS=VS; PS=PS]
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 9062891433306436746
}
+152
View File
@@ -0,0 +1,152 @@
#define OutputEntityId
#include "ShaderHelpers.hlsl"
#include "GlitchyEngine.hlsl"
Texture2D AlbedoTexture : register(t0);
SamplerState AlbedoSampler : register(s0);
Texture2D<float3> NormalTexture : register(t1);
SamplerState NormalSampler : register(s1);
Texture2D<float> MetallicTexture : register(t2);
SamplerState MetallicSampler : register(s2);
Texture2D<float> RoughnessTexture : register(t3);
SamplerState RoughnessSampler : register(s3);
Texture2D<float3> EmissiveTexture : register(t4);
SamplerState EmissiveSampler : register(s4);
// Texture2D<float> AmbientTexture : register(t5);
// SamplerState AmbientSampler : register(s5);
cbuffer MaterialConstants : register(b2)
{
#pragma EditorVariable[ Name = "AlbedoColor"; Preview = "Albedo Color"; Type="Color" ]
float4 AlbedoColor = float4(1.0, 1.0, 1.0, 1.0);
#pragma EditorVariable[ Name = "NormalScaling"; Preview = "Normal Scaling" ]
float2 NormalScaling = float2(1.0, 1.0);
#pragma EditorVariable[ Name = "MetallicFactor"; Preview = "Metallic Factor"; Min = 0.0f; Max = 1.0f ]
float MetallicFactor = 0.0;
#pragma EditorVariable[ Name = "RoughnessFactor"; Preview = "Rougness Factor"; Min = 0.0f; Max = 1.0f ]
float RoughnessFactor = 0.6;
#pragma EditorVariable[ Name = "EmissiveColor"; Preview = "Emissive Factor"; Type="ColorHDR" ]
float3 EmissiveColor = float3(0.0, 0.0, 0.0);
// # pra gma Editor Variable[ Name = "AmbientFactor"; Preview = "Ambient Factor" ]
// float AmbientFactor = 1.0;
}
struct VS_IN
{
float3 Position : POSITION;
float3 Normal : NORMAL;
// Todo: Tangent.w... handedness
float3 Tangent : TANGENT;
float2 TexCoord : TEXCOORD;
};
typedef struct PS_IN
{
float4 Position : SV_POSITION;
float3 WorldPosition : WORLDPOSITION;
float3 Normal : NORMAL;
float3 Tangent : TANGENT;
float2 TexCoord : TEXCOORD;
//nointerpolation float Handedness : HANDEDNESS;
#ifdef OutputEntityId
nointerpolation uint EntityId : ENTITYID;
#endif
} VS_OUT;
VS_OUT VS(VS_IN input)
{
VS_OUT output;
float4 worldPosition = mul(Transform, float4(input.Position, 1));
output.Position = mul(ViewProjection, worldPosition);
output.WorldPosition = worldPosition.xyz / worldPosition.w;
output.Normal = mul(Transform_InvT, input.Normal);
output.Tangent = mul((float3x3)Transform, input.Tangent);
// TODO: output.Handedness = input.Tangent.w
output.TexCoord = input.TexCoord;
output.EntityId = EntityId;
return output;
}
//struct PS_OUT
//{
// float4 Albedo : SV_TARGET0;
// // RG: TextureNormal.XY BA: GeoNrm.XY
// float4 Normal : SV_TARGET1;
// // R: GeoNrm.Z GBA: GeoTan.XYZ
// float4 Tangent : SV_TARGET2;
// float4 Position : SV_TARGET3;
// // R: Metallicity G: Roughness B: Ambient
// float4 Material : SV_TARGET4;
//#ifdef OutputEntityId
// uint EntityId : SV_TARGET5;
//#endif
//};
PS_OUT_Lit PS(PS_IN input)
{
// Build tangent space
float3 normal = normalize(input.Normal);
float3 tangent = normalize(input.Tangent - dot(input.Tangent, normal) * input.Normal);
// TODO: float3 bitangent = input.Handedness * cross(normal, tangent);
float3 bitangent = -cross(normal, tangent);
//float3x3 tangentTransform = float3x3(tangent, bitangent, normal);
//tangentTransform = transpose(tangentTransform);
float4 texAlbedo = AlbedoTexture.Sample(AlbedoSampler, input.TexCoord);
float3 texNormal = NormalTexture.Sample(NormalSampler, input.TexCoord);
texNormal.xy = texNormal.xy * 2.0 - 1.0;
float texMetallic = MetallicTexture.Sample(MetallicSampler, input.TexCoord);
float texRoughness = RoughnessTexture.Sample(RoughnessSampler, input.TexCoord);
float3 texEmissive = EmissiveTexture.Sample(EmissiveSampler, input.TexCoord);
//float3 objectNormal = mul(tangentTransform, texNormal);
//float3 worldNormal = mul(objectNormal, (float3x3)Transform);
float4 finalAlbedo = texAlbedo * AlbedoColor;
float3 finalNormal = ScaleNormal(texNormal, NormalScaling);
float finalMetallic = texMetallic * MetallicFactor;
float finalRoughness = texRoughness * RoughnessFactor;
float3 finalEmissive = texEmissive * EmissiveColor;
/////////////TODO: REMOVEME
//worldNormal = max(worldNormal - 10000000, normal);
//texAlbedo = max(texAlbedo - 10000000, 1.0);
//texMetallic = max(texMetallic - 10000000, 0.0);
//texRoughness = max(texRoughness - 10000000, 0.1);
/////////////TODO: END_REMOVEME
PS_OUT_Lit output;
output.Albedo = finalAlbedo;
//output.Normal = float4(objectNormal, 1.0);
output.Normal = float4(finalNormal.xy, normal.xy);
output.Tangent = float4(normal.z, tangent.xyz);
output.Position = float4(input.WorldPosition, 1.0);
output.Emissive = float4(finalEmissive, 0.0);
output.Material = float4(finalMetallic, finalRoughness, 1.0, 0);
#ifdef OutputEntityId
output.EntityId = input.EntityId;
#endif
return output;
}
#pragma Effect[VS = VS; PS = PS]
@@ -0,0 +1,13 @@
{
AssetLoader = null,
Config = null,
Importer = "ShaderImporter",
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = {
_compression = .None
},
AssetHandle = 2172704887168568810
}

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