Commit Graph

3577 Commits

Author SHA1 Message Date
SirLynix 8efebef26c Graphics/UberShader: Replace missing UInt32 by the new OptionHash using 2023-12-17 21:07:58 +01:00
SirLynix 83366e93d4 Make changes for breaking NZSL update
Fix build

Fix compilation (again)

Fix global included

TextureAsset belongs to another branch

Add missing include

Fix include (should be good, finally)
2023-12-17 20:40:45 +01:00
SirLynix 87bf4563f2 Update auto-gen files 2023-12-17 16:00:44 +01:00
SirLynix b7bdc74f3f Graphics/SpotLight: Add UpdateAngles method 2023-12-17 15:59:53 +01:00
SirLynix 3514ac6340 Widgets/Canvas: Add mouse unhandled signals 2023-12-07 18:28:11 +01:00
SirLynix f5fefc7b86 Math: Add AngleBetween and RotateTowards for Vector3 and Quaternion 2023-12-07 16:50:22 +01:00
SirLynix 3fd696385d JoltPhysics3D/JoltPhysWorld3D: Add CollisionQuery for points and shapes 2023-12-07 16:49:48 +01:00
SirLynix 26dbdef50d JoltPhysics3D: Add elapsedTime parameter to PostSimulate 2023-12-07 16:45:46 +01:00
SirLynix 6cbfb01243 JoltPhysics3D: Allow raycast to return hit characters (and retrieve their entities) 2023-12-07 16:45:14 +01:00
SirLynix f2ab31cc4b Core/Error: Remove starting / from file log 2023-12-07 16:42:44 +01:00
SirLynix 62d5e611f1 Core/Error: Make error log only the filename where the error occurred 2023-12-04 18:22:40 +01:00
SirLynix 3fb1096d07 Audio: Implement support for ALC_EXT_thread_local_context 2023-12-04 17:38:05 +01:00
SirLynix b5576ccb9f Audio: Fix data race when a device is used from multiple threads
OpenAL devices can be used from multiple threads and the error handling code (inspired by OpenGLRenderer) did not take that into account. This is not a problem for the OpenGLRenderer since contexts are thread-local which is not the case for OpenAL devices.
2023-12-04 11:01:01 +01:00
SirLynix c06898fcde Audio: Fix compilation with emscripten 2023-12-04 09:45:09 +01:00
SirLynix f75a00efe2 Audio: Fix loading of OpenAL extensions (pointers are context-local) 2023-12-04 00:23:39 +01:00
SirLynix 0137bd1871 Graphics/RenderTextureBlit: Fix default MemoryAccess 2023-12-03 15:29:54 +01:00
Lynix 76404f5e0e Core/Modules: Fix env var override when no parameter is passed 2023-12-02 13:56:24 +01:00
Lynix 4ee4092bba Cleanup includes 2023-12-02 13:56:24 +01:00
Lynix 5472514f4b Core: Add EnvironmentVariables 2023-12-02 13:56:23 +01:00
Lynix 36dcc03c11 Audio/OpenALDevice: Improve error when buffer/source creation fails 2023-12-02 13:56:06 +01:00
Jérôme Leclercq 32d227628c
Integrate render target handling in frame graphs (#411)
* Graphics: Integrate RenderTarget in FrameGraph

- This handles the blit to texture/swapchain in the FrameGraph and fixes RenderTextureBlit
- Dummy attachments were added to the FrameGraph class to handle link without texture (used to setup a dependency between two passes with no texture)
- FramePass now supports custom access/layout/usage for inputs

* Graphics/RenderTarget: Allow to set any RenderTarget as output
2023-11-28 21:00:57 +01:00
Lynix f57fc3c1d5 Fix previous commit 2023-11-28 20:33:21 +01:00
Lynix 63ddf35a86 Renderer/RenderResources: Fix PushReleaseCallback forwarding ref
Using a concept here breaks perfect forwarding
2023-11-28 20:20:36 +01:00
Lynix 079f153640 Minor fixes 2023-11-28 20:05:09 +01:00
SirLynix 962a2e71c7 Renderer/Texture: Allow to keep the texture format in TextureViewInfo 2023-11-26 21:29:49 +01:00
SirLynix f09175228d JoltPhysics3D: Skip the rigid body update if no physics step took place
This improves the framerate if FPS > physics rate
2023-11-26 21:28:40 +01:00
SirLynix 72182327dd Core/PrimitiveList: Rework and inline the class 2023-11-26 21:27:24 +01:00
SirLynix e8eebc1dfc Core/ParameterList: Take advantage of movement 2023-11-26 14:01:23 +01:00
SirLynix 2622951144 Minor fixes 2023-11-26 11:25:52 +01:00
SirLynix 1ac992b5c7 Graphics: Add Billboard support 2023-11-25 15:52:58 +01:00
Lynix 4cc8b78f5f Renderer/RenderResource: Half the number of virtual calls required on cleanup
Since most of the time objects are directly pushed for release instead of callbacks, it makes sense to optimize this case by not storing the object in a callback and removing the call to the virtual Release method. The virtual destructor does the job here.
2023-11-21 23:58:59 +01:00
Lynix 1e81b38c0f Graphics: Replace RenderFrame by RenderResources
This changes makes the whole rendering independent from the RenderFrame acquired from the Swapchain.
This may allow to do offscreen rendering (= without swapchain), or multi-window rendering in the future
2023-11-21 23:33:18 +01:00
Lynix d7d5c09428 Graphics/FrameGraph: Remove SwapchainFactors attachment size and fully handle multiple viewer sizes 2023-11-21 23:02:07 +01:00
Lynix dca8555d34 Fix compilation 2023-11-21 22:18:20 +01:00
Lynix 80cab34088 Graphics: Add RenderTextureBlit 2023-11-21 22:06:44 +01:00
Lynix f3aacc0cd2 Graphics/FrameGraph: Rename AddBackbufferOutput to AddOutput 2023-11-21 22:06:24 +01:00
Lynix 6a19ab7ba2 Graphics/FrameGraph: Rename BindAttachmentToExternalTexture 2023-11-21 20:46:22 +01:00
Lynix a018701251 Graphics/ForwardFramePipeline: Fix render size mixup 2023-11-21 19:41:08 +01:00
Lynix c352e78e11 Compilation fixes 2023-11-21 07:44:44 +01:00
SirLynix eddd4e992b Fix previous commit 2023-11-20 23:19:41 +01:00
SirLynix 7991071e41 Graphics/RenderTexture: Remove no longer used config 2023-11-20 23:12:20 +01:00
SirLynix 448cf3b86e Math/Ray: Fix Intersect(Box) 2023-11-20 23:00:29 +01:00
SirLynix 938ba09d45 Graphics: Rework RenderTargets
- RenderTarget have been moved to the Graphics module and are now lightweight objects between the target of rendering (swapchain or texture)
- RenderTexture no longer require a blit between the framegraph texture and the target texture (the target texture is now directly rendered onto using a new feature of the framegraph)
- ForwardFramePipeline viewers are now properly ordered by render order
2023-11-20 23:00:06 +01:00
SirLynix d06f9bda89 Fix compilation again 2023-11-20 12:36:34 +01:00
SirLynix aaf3d97954 Graphics: Add RenderTexture class 2023-11-20 12:36:34 +01:00
Lynix 4f08d0b3c1 Fix compilation 2023-11-20 10:16:00 +01:00
SirLynix 97d5640967 Renderer: Blit texture to window instead of using a full renderpass
This may improve performance and allow for render targets to customize how they blit the final texture (allowing for render-to-texture)
2023-11-17 16:59:31 +01:00
SirLynix f2e77fb8a5 Rename Nz::Functor to Nz::AbstractFunctor 2023-11-17 13:19:21 +01:00
SirLynix 5a14808a57 Minor fixes 2023-11-17 11:58:03 +01:00
SirLynix ddc8cc6797 Core: Rework ParameterFile
Improve parsing and usage
2023-11-17 11:57:05 +01:00
SirLynix 5e643bca7b Fix MinGW compilation 2023-11-15 08:06:50 +01:00
Lynix e5789d1749 Switch Nazara to C++20 2023-11-14 14:24:28 +01:00
Lynix 592780562e Try to fix MinGW compilation error
It shouldn't make a difference since static constexpr already implies inline but we're talking about MinGW
2023-11-12 22:31:01 +01:00
SirLynix f0fd3b232c Core: Add generic ParameterConfig
This still needs to be improved
2023-11-12 12:54:34 +01:00
SirLynix 86e26008b3 Minor fixes 2023-11-12 12:51:56 +01:00
SirLynix db58921cc4 Graphics/PipelinePassList: Add support for attachment proxy 2023-11-06 21:30:49 +01:00
SirLynix 886991f86d Graphics: Add PipelinePassList loader (able to load from a file)
Fix compilation
2023-11-06 21:30:49 +01:00
SirLynix ef0a34b7b1 Graphics: Add FramePipelinePassFlag to fix shadows 2023-11-06 21:30:49 +01:00
SirLynix 8fb6ea728d Graphics: Add data-driven pipeline passes
Fix compilation
2023-11-06 21:30:49 +01:00
SirLynix 5382dd3ccd Graphics/UberShader: Hotreload shader when an imported module is modified 2023-11-04 17:55:04 +01:00
SirLynix c80e06226f Graphics/Graphics: Create default depth texture in preferred depth format 2023-11-04 17:52:27 +01:00
SirLynix 4749e6ec80 Core: Fix NazaraAssert in release mode 2023-11-02 15:49:51 +01:00
SirLynix 4b8a475bbd Split error macro into two versions (format vs non-formating) to allow format checking at compile-time 2023-11-02 15:18:03 +01:00
SirLynix 8fb53f467b Core/ResourceLoader: Fix format error 2023-11-02 08:27:37 +01:00
SirLynix 2c6b507e62 Graphics/AbstractViewer: Make Project/Unproject const 2023-10-30 18:36:41 +01:00
Lynix bb9f907691 Math/Ray: Fix return 0 to return false 2023-10-25 20:22:29 +02:00
SirLynix f7e9ee9f60 Graphics/Enums: Add GammaCorrection to FramePipelineAllExtraPasses 2023-10-14 16:43:30 +02:00
SirLynix c191cb227b Fix compilation 2023-10-14 14:46:49 +02:00
SirLynix c826b537ab Math/VectorI: Add Apply static method 2023-10-14 14:46:49 +02:00
SirLynix 413dd2ce71 Graphics/FrameGraph: Fix parameter type 2023-10-14 14:46:49 +02:00
SirLynix 96504a0a21 Graphics/FramePipeline: Fix UpdateViewerRenderMask name (=> RenderOrder) 2023-10-14 14:46:49 +02:00
SirLynix 9aebb4f745 Graphics: Rework shadowing (add cascaded shadow mapping)
- Add support for per-viewer shadows
- Add cascaded shadow mapping for directional lights (wip)
- Rework the way lights are sent to the shaders (they are now selected once per viewer)
- Fixes PointLight shadow mapping (using a dedicated pass)
- Lights out of frustum for every viewers are no longer processed (wip)
2023-10-14 14:46:49 +02:00
SirLynix a08850946a Graphics/FrameGraph: Fix texture 2D array reuse 2023-10-14 14:46:49 +02:00
SirLynix e10f15243d Graphics: Replace runtime structs offsets by compile-time struct offsets
now that nzsl::FieldOffsets is constexpr this is possible
2023-10-14 14:46:49 +02:00
SirLynix 929b599337 Graphics/ViewerData: Add near and far plane 2023-10-14 14:46:49 +02:00
SirLynix 2a3da7384d Graphics/RenderSystem: Add support for external swapchains 2023-10-13 20:17:31 +02:00
SirLynix 9066fe78bb Graphics/Camera: Allow to enable/disable passes without re-specifying 2023-10-13 19:56:07 +02:00
SirLynix d40b8af68d Graphics: Add gamma correction 2023-10-13 19:56:07 +02:00
SirLynix 041be74b9d Color: Add sRGB <=> Linear conversion methods 2023-10-13 19:56:07 +02:00
SirLynix b09b4d2419 Graphics: Add a way to set which passes are enabled in a frame pipeline
This will be replaced soon with a better system
2023-10-08 23:44:24 +02:00
SirLynix 50c90fd725 Renderer/DebugDrawer: Add DrawBoxCorners 2023-10-08 23:38:03 +02:00
SirLynix 98fe974fc8 Fix some Vulkan errors
Depth buffers were not tagged as output on passes writing on it
Handle holes in clear values
2023-10-08 13:47:15 +02:00
SirLynix 078542e44b VulkanRenderer: Improve performance of validation message filtering 2023-10-08 13:25:42 +02:00
SirLynix c02a20457a VulkanRenderer: Fix best usage warning 2023-10-08 13:24:35 +02:00
SirLynix 7ef9a3b93c Graphics/DebugDrawPipelinePass: Remove unused headers 2023-09-10 14:54:17 +02:00
SirLynix e1ccb3187d Core/Color: Add ApproxEqual and make equality exact 2023-09-10 14:43:57 +02:00
SirLynix 21680171a2 Replace GetPlatformEndianness() by PlatformEndianness constexpr
from nazarautils
2023-09-08 09:13:04 +02:00
SirLynix 1009b296a1 Update for latest nazarautils 2023-09-08 09:10:22 +02:00
SirLynix aef8b01f15 Math/Box: Rename FromExtends to FromExtents 2023-09-08 09:06:26 +02:00
SirLynix 5f8b7b361e Renderer/CommandBuffer: Add support for InsertDebugLabel 2023-09-06 13:24:31 +02:00
SirLynix 1b9c19fd78 Minor fixes 2023-08-31 18:01:59 +02:00
SirLynix b1487a04fd Graphics/FrameGraph: Add support for texture arrays 2023-08-31 18:00:58 +02:00
SirLynix 5b11e53d33 Remove useless includes 2023-08-31 17:59:05 +02:00
SirLynix 9ff1dcc42a Math/Frustum: Fix GetAABB dangling ref 2023-08-28 19:16:39 +02:00
SirLynix 4f4d0a3373 Math/Frustum: Fix Near and Far plane extraction (they were swapped) 2023-08-28 19:16:15 +02:00
Lynix a234f2e7bd Fix compilation 2023-08-25 20:27:10 +02:00
SirLynix 39d7832880 Utility/Mesh: Fix Mesh::Build link issues 2023-08-25 17:14:58 +02:00
SirLynix 627400f4f2 Minor fixes 2023-08-25 17:14:33 +02:00
SirLynix 5b9f79a554 Math/Frustum: Fix Far plane extraction 2023-08-25 17:14:23 +02:00
SirLynix 3c3f940ff3 Renderer/DebugDrawer: Add DrawPoint 2023-08-25 17:14:06 +02:00
SirLynix efe36ca6e8 Math/OrientedBox: Make GetCorners return an EnumArray ref 2023-08-25 17:13:39 +02:00
SirLynix 532b1b2c4d Math/Frustum: Add ComputeCorners and GetAABB 2023-08-25 17:13:07 +02:00
SirLynix 1c54c9a914 Update global headers 2023-08-24 17:48:15 +02:00
SirLynix 4d0565b559 Utility: Add RichTextBuilder 2023-08-24 17:48:00 +02:00
SirLynix 557da10dc6 Rework TextDrawer interface 2023-08-24 17:47:20 +02:00
SirLynix ad738a2803 Core/StringExt: Add IterateOnCodepoints to remove std::u32string allocations 2023-08-24 08:42:25 +02:00
SirLynix bd53245f42 Core/StringExt: Don't pass string_view by ref
https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/
2023-08-24 08:23:14 +02:00
SirLynix 1b7a89213d Widgets: Fix manually hidden entities being incorrectly shown when widget itself is shown 2023-08-24 07:54:33 +02:00
SirLynix e145501568 VulkanRenderer: Fix function ordering 2023-08-23 17:57:26 +02:00
SirLynix 809dc7e0a7 Widgets/Canvas: Fix OnFocusLost being called before removing focus 2023-08-23 17:56:53 +02:00
SirLynix 98c0a47dcc Widgets/TextAreaWidgets: Keep selections active (and visible) when losing focus 2023-08-23 17:56:36 +02:00
SirLynix 8f0890f719 Widgets: Fix new line selection not being bound to scissor box 2023-08-23 17:33:59 +02:00
SirLynix ae62e1f6c9 Network/WebService: Make Pool return a boolean indicating if a request finished 2023-08-17 18:04:12 +02:00
SirLynix f2fc02cbd4 Core/ErrorFlags: Turn this class into an inline class 2023-08-16 18:11:18 +02:00
SirLynix ab8bac2575 Use fmt store instead of ToString fallback
Thanks to @jonathanpoelen for the idea
2023-08-15 01:10:01 +02:00
SirLynix a741672a51 Allow error message to be formatted 2023-08-15 01:10:01 +02:00
Jérôme Leclercq 501e779be4
Fix mistake 2023-08-13 18:40:02 +02:00
SirLynix e8620894f7 Renderer: Expose present mode and allow to query/set it 2023-08-13 18:16:03 +02:00
SirLynix 28d69ab552 Math/Box,Rect: Add GetCorners method 2023-08-13 18:14:22 +02:00
SirLynix 887bd875f7 Remove unused headers 2023-08-12 12:22:27 +02:00
SirLynix 689ea06fe1 ChipmunkPhysics2D/Constraint2D: Fix leak and implement single body constraints
Also move anchors to world space
2023-08-12 12:12:20 +02:00
SirLynix 65a1c195ac ChipmunkPhysics2D/RigidBody2D: Add ToLocal/ToWorld methods 2023-08-12 12:11:24 +02:00
SirLynix 1ef61cc5ad Math/VectorI: Add modulo overloads 2023-08-12 12:02:12 +02:00
SirLynix 4642ea778c ChipmunkPhysics2D/PhysicsSystem: Add query functions wrappers 2023-08-10 12:05:31 +02:00
SirLynix ab95bec41b Fix compilation 2023-08-10 12:03:56 +02:00
SirLynix 5484967498 ChipmunkPhysics2D/RigidBody2D: Add unique body index and remove userdata 2023-08-10 08:40:21 +02:00
SirLynix 1bbfd9fdd2 Widgets/TextAreaWidget: [SetText] Pass std::string by value 2023-08-09 19:37:51 +02:00
SirLynix e5318e49fe JoltPhysics3D/JoltRigidBody3D: Add constructors for settings 2023-08-09 18:01:23 +02:00
SirLynix de002adbb1 Graphics/GraphicsComponent: Fix clear clearing other entries 2023-08-09 18:01:01 +02:00
SirLynix cf6fdf258f Graphics: Add new functions to get default material types/presets 2023-08-08 18:17:58 +02:00
SirLynix 32f8141bd8 ChipmunkPhysics2D: Rework RigidBody2D 2023-08-07 18:17:00 +02:00
SirLynix fd73d62adf Graphics/RenderSystem: Fix skeleton not being used when added after graphics component 2023-08-06 10:14:01 +02:00
SirLynix ee361fc48c Graphics/GraphicsComponent: Fix GetAABB() with no renderable 2023-08-06 10:12:35 +02:00
SirLynix 98e9c89a54 ChipmunkPhysics2D/PhysWorld2D: Set default colors for debug draw options 2023-08-06 10:12:17 +02:00
SirLynix e2808192aa Minor fixes 2023-07-30 19:46:01 +02:00
SirLynix 816d9d1174 Allow to setup/override module configuration from commandline 2023-07-30 12:44:43 +02:00
SirLynix 218b75558a Core: Add CommandLineParameters 2023-07-30 11:46:55 +02:00
SirLynix 651261d28a Minor fixes 2023-07-30 10:56:28 +02:00
SirLynix 3d18052e45 Core/StateMachine: Add Disable and Enable methods 2023-07-27 19:34:59 +02:00
SirLynix d7cc1a8151 Core/EnttWorld: Add GetAliveEntityCount method 2023-07-27 15:09:51 +02:00
SirLynix a101f7c71f Core/EnttWorld: Add RemoveSystem method 2023-07-27 15:09:15 +02:00
SirLynix 99471e8e65 Remove useless includes 2023-07-23 13:06:09 +02:00
SirLynix c081811760 JoltPhysics3D: Allow to construct components without using the system 2023-07-23 13:05:33 +02:00
SirLynix 20f000c8dc Fix missing include 2023-07-23 11:12:05 +02:00
Jérôme Leclercq 313be2d0f4 Fix merge error 2023-07-21 12:12:10 +02:00
SirLynix dee47c6f15 Renderer: Fix BuildMipmaps 2023-07-21 12:12:10 +02:00
SirLynix 4db5b59ec9 Renderer: Refactor transient resources (allow access at any time) 2023-07-21 12:12:10 +02:00
SirLynix e34ba8c05d Add ComputeParticlesTest
Renderer: Add a way to execute commands on the device
2023-07-21 12:12:10 +02:00
SirLynix c25113fea9 xmake check-files -f 2023-07-21 09:01:52 +02:00
SirLynix fbf4da3c4f VulkanRenderer: Improve transient command buffer usage
Allocate and reuse them between frames, by resetting the command pool
2023-07-21 09:00:34 +02:00