Commit Graph

168 Commits (8229e5dd33e1d14e6b03714d31f09882ae19178a)

Author SHA1 Message Date
cosmonaut 8229e5dd33 CreateTextureFromDDS + respect buffer alignment 2024-02-23 11:59:56 -08:00
cosmonaut 1eae01c95c add DDS parser to ImageUtils 2024-02-23 11:59:33 -08:00
cosmonaut b80527d793 rename CpuBuffer.cs to TransferBuffer.cs 2024-02-23 10:57:34 -08:00
cosmonaut ecfcb666a8 remove byte pointer interface from TransferBuffer 2024-02-23 10:56:03 -08:00
cosmonaut ad97aed60f compute pass + additional validation 2024-02-23 10:43:39 -08:00
cosmonaut 0a5ec9e82d rename cpuBuffer to transferBuffer in Font 2024-02-23 10:43:22 -08:00
cosmonaut 8648eef5d1 rename CpuBuffer to TransferBuffer 2024-02-23 09:56:00 -08:00
cosmonaut 39496c37ea Refresh 2 changes 2024-02-23 00:06:04 -08:00
cosmonaut d986b3013f fix TextBatch index buffers being created as vertex buffers 2024-01-27 17:34:26 -08:00
cosmonaut 42e3ac91af Vertex instance input shortcut (#53)
Reviewed-on: #53
2024-01-27 03:44:19 +00:00
cosmonaut 0df2944ccf CommandBuffer is now a pooled class + more state validation 2024-01-18 12:27:34 -08:00
cosmonaut e50fb472b1 Debug mode sample count and depth assertions 2024-01-15 23:16:29 -08:00
cosmonaut df3f38a67b Debug mode bounds checks for buffer and texture upload 2024-01-15 22:19:59 -08:00
cosmonaut 4dbd5a2cbe MSDF font rendering + improved resource tracking (#52)
This is a major rewrite of the Font system. MoonWorks now uses MSDF font rendering, which allows high quality rendering of fonts at arbitrary sizes.

We now ship default embedded shader binaries for Video and Font. If you replace them with shader binaries of the same name located in your base directory, those will be used instead.

Many improvements have been made to resource tracking to prevent memory corruption, particularly on shutdown.

You must be careful not to leak AudioResource classes in particular, as there isn't much we can automatically do to recover from this without potentially crashing your game.

Reviewed-on: #52
2023-12-15 18:46:43 +00:00
cosmonaut 450b08cbd8 Atomically call graphics resource destroy function 2023-12-08 16:07:38 -08:00
cosmonaut a736ed031d clean up graphics resource code 2023-11-20 17:09:22 -08:00
cosmonaut b2a0ca3515 replace WeakReference with weak GCHandle 2023-11-20 15:18:06 -08:00
cosmonaut e616b0fa62 resource management and logging improvements 2023-10-04 14:45:17 -07:00
cosmonaut daae1a34b9 fix a few more compile errors 2023-09-19 17:14:48 -07:00
cosmonaut 2e5657789c fix a Conversions issue 2023-09-19 17:11:14 -07:00
cosmonaut d8064862bf move PackedVector classes to MoonWorks.Graphics.PackedVector 2023-09-19 16:50:08 -07:00
cosmonaut 402c26131d fix erroneous GetData length warning 2023-09-19 13:40:48 -07:00
cosmonaut b026b9e81f add lots more doc comments 2023-09-19 13:19:41 -07:00
cosmonaut e0f05881b0 new MoonWorks.Graphics.Fence API 2023-09-18 23:18:21 -07:00
cosmonaut 088e7c4b6f add debug check for zero length buffer copy 2023-08-07 10:12:46 -07:00
cosmonaut 496eb670ab AV1 Video instead of Theora (#49)
VideoPlayer now takes AV1 video instead of Ogg Theora. This brings a significant decode speed improvement. The decoder now also operates in a threaded manner, which should prevent runtime stalls when fetching video frames.

Reviewed-on: #49
2023-06-07 21:18:44 +00:00
cosmonaut 300ef9f88e fix unnecessary copy in PackFontRanges 2023-05-22 11:41:19 -07:00
cosmonaut 5df08727c1 Sound instancing rework 2023-05-11 17:56:40 -07:00
cosmonaut 2d7bb24b5c rename Texture load methods for clarity 2023-04-19 00:50:59 -07:00
cosmonaut 0ea60a376b new image loader API 2023-04-19 00:41:18 -07:00
cosmonaut 3584e670ee add array overloads to avoid explicit generic parameter 2023-04-05 12:40:34 -07:00
cosmonaut 5a2f7eadb8 change array param to span in Buffer.GetData 2023-04-05 11:32:12 -07:00
cosmonaut 1e3f04235e remove array parameters from API functions 2023-04-05 11:07:16 -07:00
cosmonaut 1cf04a7279 assets stream data directly into unmanaged memory 2023-04-05 00:47:02 -07:00
cosmonaut 8134761e44 load images from memory + QOI support 2023-04-03 17:28:00 -07:00
cosmonaut 12e7e6b9c1 add Color.FromHSV 2023-03-09 15:14:16 -08:00
cosmonaut 1f0e3b5040 Audio Improvements (#47)
- Audio is now processed on a background thread instead of the main thread
- Audio tick rate is now ~200Hz
- MoonWorks.Math.Easings class completely rewritten to be easier to understand and use
- SoundInstance properties no longer call into FAudio unless the value actually changed
- SoundInstance property values can now be interpolated over time (tweens)
- SoundInstance tweens can be delayed
- SoundInstance sets a sane filter frequency default when switching filter type
- StreamingSound classes can be designated to update automatically on the audio thread or manually
- StreamingSound buffer consumption should now set Stopped state in a more sane way
- Added ReverbEffect, which creates a submix voice for a reverb effect
- SoundInstance can apply a ReverbEffect, which enables the Reverb property
- Audio resource tracking improvements
- Some tweaks to VideoPlayer to make its behavior more consistent

Reviewed-on: #47
2023-03-07 23:28:57 +00:00
cosmonaut bd825b6c91 allow pushing raw uniform data 2023-02-23 16:59:34 -08:00
cosmonaut 5baa1d7b40 Fix video shader base path lookup 2023-02-08 12:44:36 -08:00
cosmonaut 36ce74b58a tweak video shader filenames 2023-02-03 15:07:32 -08:00
TheSpydog b39526ca90 Textures now have a sample count, not render passes (#45)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: #45
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-31 20:27:26 +00:00
TheSpydog 88d9119830 Remove warning from DrawInstancedPrimitives doc comment (#44)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: #44
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-24 00:14:46 +00:00
TheSpydog 05de9a4066 Make video shaders optional and search for them in the root output directory (#42)
Whenever the video shaders change, they can be rebuilt with refreshc and distributed alongside the moonlibs.

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: #42
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-21 23:37:01 +00:00
TheSpydog b1d30a9e6c Remove isFixed param from AcquireCommandBuffer call (#41)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: #41
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-14 18:04:53 +00:00
TheSpydog 030745361b Fix BC7 loading for textures without DDSD_CAPS/FMT (#40)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: #40
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-07 01:46:59 +00:00
cosmonaut c43df10c2a vertex binding API improvements 2023-01-05 13:41:48 -08:00
cosmonaut 95981f0f03 rework vertex input state creation to avoid reflection 2023-01-04 17:34:01 -08:00
TheSpydog 230c1b41b4 Add IndirectDrawCommand struct (#39)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: #39
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-04 18:44:56 +00:00
TheSpydog 6f8858c8b7 RasterizerState / BlendFactor ABI break (#38)
Updates the APIs to match [this Refresh PR](MoonsideGames/Refresh#27).

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: #38
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-12-29 03:22:47 +00:00
TheSpydog f96298f991 Add validation checks for AcquireSwapchainTexture and BindVertexBuffers (#37)
This replaces the Refresh-side check for window claim status in AcquireSwapchainTexture, and adds validation to ensure that BindVertexBuffers is not called before BindGraphicsPipeline.

Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: #37
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-12-29 03:18:36 +00:00