Commit Graph
51 Commits
Author SHA1 Message Date
metalgearslothandGitHub 03ef503285 Add batch drawing methods (#6655)
* Add batched drawing API

Internally Clyde batches drawing, however when drawing hundreds / thousands of the same quad the batch checks add up. This just omits those checks and directly draws instead. Same with skipping color modulation.

Long-term could probably figure out a way to SIMD the transforms better.

* RN
2026-06-26 21:45:32 +10:00
AmyandGitHub b7e0a9bc03 Make font drawing more generic (#5533)
* make richtextentry more generic

* font

* oops
2024-11-29 11:28:27 +01:00
eoineoineoinandGitHub 56c30edf04 Replace Matrix3 with System.Numerics.Matrix3x2 (#5078)
* Delete Matrix3. Replace with System.Numerics.Matrix3x2

* Feedback

* release notes
2024-06-02 14:08:47 +10:00
Pieter-Jan BriersandGitHub 4033d96327 Engine changes for displacement maps. (#5023)
* Add load parameter support to RSIs.

Currently only supports turning sRGB off. RSIs with custom load parameters are not thrown into the meta-atlas.

As part of this, TextureLoadParameters and TextureSampleParameters has been made to support equality.

* Add UV2 channel to vertices.

This is a bad hack to make displacement maps work in Robust. The UV2 channel goes from 0 -> 1 across the draw and can therefore be used by displacement maps to map a separate displacement map layer on top of the regular meta-atlas RSI texture.

This creates float inaccuracy issues but they weren't bad enough to completely void the feature. I'm thinking I learn from this experience and completely re-do how UVs work with the renderer rewrite, so that hopefully won't happen anymore.

This required dumping the optimized PadVerticesV2 because the changed struct size made it impractical. RIP.

I don't like this approach at all but the renderer is slated for a rewrite anyways, and all shaders will need to be rewritten regardless.

* Add CopyToShaderParameters for sprite layers.

This effectively allows copying the parameters of a sprite layer into another layer's shader parameters. The use case is to copy texture coordinates for displacement maps, as the exact map used changes depending on orientation. It also enables animations to be used though I didn't use that personally.
2024-04-27 16:03:35 +10:00
metalgearslothandGitHub d6803f5294 Add DrawPrimitives overload for List<Vector2> (#4900)
* Add DrawPrimitives overload for List<Vector2>

Storing ValueList in a field seems sussy so this is the next best thing.

* weh
2024-03-02 21:34:42 +01:00
Pieter-Jan Briers f985d10ed9 In which I spend too much time SIMDizing PadVerticesV2 2024-02-20 12:27:20 +01:00
metalgearslothandGitHub f73d7f7285 Add dotted line drawing to screen handle (#4874)
Probably needs anti-aliasing but idk an easy way to do it.
2024-01-29 11:07:15 +01:00
Leon FriedrichandGitHub 0b712ae86c Add colour gradients to sliders (#4688) 2023-12-10 20:35:43 +11:00
metalgearslothandGitHub 3ccbdeac6a Fix GetDimensions for screenhandle (#4677) 2023-12-09 15:04:45 +11:00
2733435218 Audio rework unrevert + audio packaging (#4555)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-11-27 22:12:26 +11:00
metalgearslothandGitHub 170d192791 Revert audio rework (#4554) 2023-11-07 09:34:09 +11:00
metalgearslothandGitHub d75dbc901f Audio rework (#4421) 2023-10-29 14:58:19 +11:00
metalgearslothandGitHub 25007a743f Remove lights component reference (#4316) 2023-09-11 19:17:28 +10:00
Leon FriedrichandGitHub 623aa6a0ae More StyleBox UiScale fixes. (#4175) 2023-07-09 12:19:42 +10:00
eoineoineoinandGitHub bbf8827efd Make StyleBoxTexture respect UI zoom level (#4165) 2023-07-09 04:49:25 +10:00
metalgearslothandGitHub 7d1ad527d9 Replace Robust Vector2 with System.Numerics (#4092) 2023-07-08 14:08:26 +10:00
Leon FriedrichandGitHub dea195be4a Change prof tree style & add basic stylesheet support (#4021) 2023-05-13 00:04:35 +10:00
Leon FriedrichandGitHub 6846b71e43 Remove texture IoC resolves (#3999) 2023-05-02 15:02:57 +10:00
Leon FriedrichandGitHub 69cdf6f727 Generalize sprite view (#3978) 2023-04-29 16:06:30 +10:00
eoineoineoinandGitHub 987d76b53d Style box texture scaling (#3632) 2023-01-08 16:42:46 +11:00
metalgearslothandGitHub ca9ce7c7ed Allow render targets to not clear (#3457) 2022-11-10 23:33:18 +01:00
metalgearslothandGitHub 498ce86176 Add API to get text dimensions (#3290) 2022-09-29 12:50:06 +02:00
0ee87bc771 Colour batch reduction (#2809)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2022-05-16 17:28:37 +02:00
41e9d9b08b Client profiling system (#2783)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-05-14 15:08:46 +10:00
de4d255841 Analyzer to enforce classes to be either [Virtual], abstract, or sealed. (#2469)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-02-05 19:31:58 +01:00
DrSmugleaf 7f89aabbb0 Merge branch 'master' of https://github.com/space-wizards/RobustToolbox into 2021-12-03-remove-IEntity-komm-süsser-todd 2021-12-06 12:41:36 +01:00
Vera Aguilera Puerto c39f6d09eb Lots of manual fixing. More to come. 2021-12-03 17:01:46 +01:00
metalgearslothandGitHub 04782b83ab Add overload to draw rotated position (#2304) 2021-12-03 12:41:58 +01:00
VisneandGitHub a5be8e723e Remove some unused obsolete stuff (#2049) 2021-09-20 10:59:50 +02:00
Pieter-Jan Briers 9117f8c776 These IRenderHandle APIs are going public, deal with it. 2021-09-19 23:37:47 +02:00
Pieter-Jan Briers 4e7039e09b StyleBoxFlat can now draw simple rectangular borders 2021-08-30 23:01:51 +02:00
Pieter-Jan Briers b8903af52f Make public DrawingHandleScreen.DrawString helper method.
This method was copy pasted into 4 separate overlays already.
2021-06-23 01:42:47 +02:00
Pieter-Jan BriersandGitHub 8efffc471d Multi-window support (#1713) 2021-05-02 14:05:50 +02:00
AcruidandGitHub de0bd1887f Sprite Rendering Bugfixes (#1551)
* Added documentation to Clyde on the sprite rendering calls.

* Added a rotation debug entity.

* Non-directional RSIs and raw textures are now rotated properly.

* Directional RSIs and Sprite Smoothing work.

* Remove the Directional flag usages.

* Supports layers with different numbers of directions.

* Fixes window rendering.
2021-02-20 11:06:08 -08:00
AcruidandGitHub 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00
ad8b0b3c83 Add bytes or sbytes to enum where available (#1430)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-12-08 12:46:30 +01:00
b8e5b47e7a Use 'new' expression in places where the type is evident for the engine (#1415)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-26 00:16:55 +01:00
Pieter-Jan BriersandGitHub 6674be3adc Client NRTs (#1121) 2020-06-12 12:57:39 +02:00
20kdcandGitHub 171a19487b Allow drawing unfilled circles, remove extra (0, 0) point (#1084) 2020-05-28 14:13:45 +02:00
Pieter-Jan Briers 1e196dfd67 Implement DrawCircle in DrawingHandleScreen 2020-05-26 16:20:47 +02:00
Pieter-Jan Briers 1551ff1ae4 Adds ability to draw arbitrary primitives in Clyde. 2020-05-18 02:29:32 +02:00
AcruidandGitHub a947a38f3c View Rotation (#1016)
* Adds a derived class from Nunit's Is test constraint class.
The game camera can now be rotated.

* Added the new `bind` command to the console, used to bind a key to a keybind.
Added two new keybinds for rotating the View camera left and right.
Added more info to the ""Component does not exist for state" exception.
Added Reduced() and FlipPositive() public functions to Angle.

* Fix a copy/paste bug.

* Adds missing code to bind/unbind CameraRotateLeft.
Camera snapping now actually uses the CameraSnapTolerance constant.
2020-03-25 02:22:18 +01:00
Pieter-Jan Briers 631ff903b4 Implement tiling textures in StyleBoxTexture. 2019-10-18 01:05:36 +02:00
Pieter-Jan Briers cd7a4f0b15 Clean up styleboxes and add support for padding. 2019-10-15 13:11:33 +02:00
Pieter-Jan BriersandGitHub cb5f2ffae1 Refactor UI system. (#843)
* Refactor UI system.

Deferred updating is used for styling & layout. This fixes the awful time complexity of containers.
Removed SetDefaults and Initialize. They were a bad idea alright.

* Fix build on .NET Framework.
2019-08-14 22:03:51 +02:00
Pieter-Jan Briers 8ec83a7654 Allow Clyde to draw rotated boxes. 2019-07-19 22:12:33 +02:00
Pieter-Jan BriersandGitHub 09c36b57cd Shift half of Clyde around to implement better outline rendering. (#830)
* Attempted Clyde cleanup, didn't get far.

* Add negation operator to Vector2i.

* Add RenderOrder to ISpriteComponent.

* Post process shaders.

Adds "post process" shaders to sprite component.
These are executed on the WHOLE sprite component (every layer)
in one draw.

This is necessary to implement functional outlines.
2019-07-06 19:17:33 +02:00
Pieter-Jan Briers 7323e454e4 Fix StyleBox.GetContentOffset(). 2019-05-14 11:18:26 +02:00
Pieter-Jan Briers dec103ac1b Remove GameController.Mode
The difference between headless and Clyde is now handled by IoC.
2019-05-08 22:24:50 +02:00
Pieter-Jan BriersandGitHub cf2995437f Remove Godot support. (#805)
Let's be real, it's pretty damn broken already and will never be fixed.
2019-05-05 01:58:24 +02:00