Commit Graph

85 Commits

Author SHA1 Message Date
RoosterDragon
277699cbd5 Fix CA1822 2023-06-06 11:51:47 +03:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Vapre
7005da3592 SpriteRenderer, do not copy vertex array data each flush. 2022-11-14 23:33:24 +01:00
AspectInteractive2
a1a50d6c98 Added rotation logic to the renderer to enable the use of Interpolated Facings. 2022-07-17 17:03:53 +02:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
penev92
8ba6d13b2f Removed unused using directives 2021-10-15 13:12:33 +02:00
Paul Chote
512dee0ac0 Fix rendering glitches with EnableDepthBuffer disabled. 2021-08-25 17:42:44 +02:00
Paul Chote
ef1aee5e95 Fix and document the depth buffer calculations. 2021-08-20 20:17:55 +02:00
Paul Chote
962d6496bd Overhaul depth preview rendering:
* Replace Jet color map with grayscale
* Added Shift + \ hotkey to toggle preview
* Added Shift + [, Shift + ] hotkeys to change contrast
* Added Shift + ;, Shift + ' hotkeys to change offset
2021-08-20 20:17:55 +02:00
Paul Chote
24f64ae1a8 Fix an edge case where the wrong sheet may be mapped to a depth sprite. 2021-07-25 19:20:19 +02:00
Paul Chote
70892a6661 Change DrawSprite calls to provide scales instead of sizes.
This allows us to remove a hacky workaround for calculating
depth offsets when sprites have size.Z == 0.
2021-07-25 00:32:17 +02:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Paul Chote
c64cfea179 Allow mods to downscale framebuffer resolution for large world viewports. 2021-05-16 14:22:52 +02:00
Paul Chote
0735345674 Set world framebuffer size based on minimum zoom.
This avoids reallocating buffers each time the player changes zoom level.
2021-05-16 14:10:32 +02:00
Paul Chote
95f5d162ef Increase SheetCount back to 8.
This was previously decreased to support legacy GPUs
that only supported 8 texture image units and we need
to reserve one of these for the palette texture.

OpenGL 3.X mandates a minimum of 16 (and most most GL2
cards also supported it) so we can now safely increase
this limit.
2021-05-16 14:10:32 +02:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Castle
12b6bb9448 Allow BlendMode of RgbaColorRenderer to be changed 2021-03-23 17:07:20 +01:00
Paul Chote
142870d78a Support multiple sheets in TerrainSpriteLayer. 2021-01-16 22:09:08 +01:00
Paul Chote
67754e8693 Add alpha support to SpriteRenderer. 2021-01-06 00:06:51 +01:00
teinarss
2c9a36b9a3 Update float3 to readonly and use in modifier for parameters. 2020-12-02 20:37:50 +01:00
RoosterDragon
e11c8436bd Misc changes to reduce allocation:
- Avoid creating new strings in SpriteRenderer.Flush.
- ProductionQueue.CancelUnbuildableItems can exit early if the queue is empty. It can also use a set of names for quicker lookups.
- OpenGL.CheckGLError avoids a Enum.HasFlag call.
2020-10-17 23:48:48 +02:00
Paul Chote
ac7eda8ca2 Add support for rendering tinted artwork. 2020-07-13 14:02:02 +02:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
860117daf9 Implement optimized pixel-art antialiasing mode for non-integer world zoom. 2019-12-13 21:29:43 +01:00
Paul Chote
8c41e6a3f7 Remove redundant zoom parameter. 2019-12-08 04:36:31 +01:00
Paul Chote
c0ee346c1c Render via an intermediate frame buffer. 2019-09-04 20:20:04 +02:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
95c5c683e3 Limit samplers to 8 in combined.frag.
The additional palette sampler wasn't accounted
for in the original PR.
2018-11-01 14:38:57 +01:00
Paul Chote
8c0f4fde81 Fix newlines in C# files. 2018-07-01 11:08:32 +02:00
Paul Chote
9ff177359b Split IGraphicsContext from IPlatformWindow. 2018-06-13 18:45:21 +01:00
Paul Chote
ab14a86d39 Rename Renderer.Device to Renderer.Window. 2018-06-13 18:45:21 +01:00
Paul Chote
8461a82577 Remove requirement for depth sprites to share color sheet. 2018-06-04 23:33:57 +02:00
Paul Chote
bfcbe8c004 Improve batching by binding up to 8 simultaneous textures. 2018-06-04 23:33:57 +02:00
Paul Chote
131496ebf8 Merge RGBA sprite rendering into SpriteRenderer.
Renderer.RgbaSpriteRenderer is kept as a thin
wrapper to maintain compatibility with consumer
code.
2018-06-04 23:33:57 +02:00
RoosterDragon
8ec90525e3 Change Shader.Render to Shader.PrepareRender.
Instead of running the shader operation as an action, just run it after the shader is prepared.
2018-05-29 23:05:39 +01:00
Paul Chote
a329711011 Render lines using SpriteRenderer without breaking the batch. 2018-05-23 23:28:22 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
2915db67c4 Add depth buffer support to sprites and sequences. 2016-04-15 09:42:29 -04:00
Paul Chote
dabea59b7d Pass depth scale factors to vertex shaders. 2016-04-10 09:41:01 -04:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Paul Chote
a754a96b77 Convert SpriteRenderer to TriangleList. 2015-12-26 12:46:54 +00:00
Paul Chote
83949b250a Add a visualisation mode for depth sprites.
For now this displays the raw sprites.  It will
eventually be repurposed for rendering the proper
depth data.
2015-10-17 22:35:47 +01:00
RoosterDragon
92389916a6 Cache the simpler delegates used in IShader.Render calls. 2015-07-15 21:09:11 +01:00
RoosterDragon
1e60a0ca76 Create only one scratch vertex buffer for rendering.
Previously several buffers were created but only one was ever used.
2015-06-05 21:32:07 +01:00
Paul Chote
629f877032 Extract terrain vertex buffer into a reusable class. 2015-05-29 19:06:11 +01:00
Paul Chote
5532ed4fc9 Remove now-redundant blend code. 2015-05-23 08:50:28 +01:00
Matthias Mailänder
63e4d40770 add alpha channel to every possible blend mode 2015-04-26 09:22:19 +02:00