Commit Graph

65 Commits

Author SHA1 Message Date
Paul Chote
677d7e47a4 Work around Raspberry Pi GLSL bug.
(cherry picked from commit e8391de36a342fe3612031575193956d14160777)
2025-03-23 15:46:01 +02:00
Paul Chote
09063d23da Determine pixel-to-texel ratio for each sprite individually.
This fixes rendering artifacts when sprites are scaled > 1.
2024-11-03 16:38:32 +02:00
Gustas
64b2bd4735 Update to HTTPS 2024-06-03 10:25:06 +02:00
Paul Chote
44d7903a4b Add dynamic ChronoVortexRenderable. 2023-10-27 10:37:28 +03:00
Paul Chote
f1fba1ed14 Fix shader type conversion. 2023-10-24 22:03:43 +03:00
Paul Chote
3bb42522b8 Pack vertex attributes and palette into a single integer bitfield. 2023-10-23 22:42:33 +03:00
Paul Chote
4547f3c2b9 Change PaletteReference.TextureIndex to an integer. 2023-10-23 22:42:33 +03:00
Paul Chote
43ddee5d30 Simplify post-processing shaders. 2023-10-23 22:42:33 +03:00
Paul Chote
813a1984f9 Fix shader type conversion. 2023-10-22 22:20:23 +03:00
Paul Chote
9a5f5f9f8f Remove legacy OpenGL support. 2023-10-22 19:51:46 +03:00
Paul Chote
cb55039ec9 Replace GlobalLightingPaletteEffect with a post-processing shader. 2023-10-22 19:34:05 +03:00
Paul Chote
a51a9700cf Replace FlashPaletteEffect with a post-processing shader. 2023-10-22 19:34:05 +03:00
Paul Chote
59d40c8b4e Replace ChronoshiftPaletteEffect with a post-processing shader. 2023-10-22 19:34:05 +03:00
Paul Chote
fe6de396f2 Replace MenuPaletteEffect with a post-processing shader. 2023-10-22 19:34:05 +03:00
Paul Chote
47af7a9023 Add IPostProcessWorldShader for custom effect render passes. 2023-10-22 19:34:05 +03:00
Gustas
c009f58980 Clear up the projection definition 2023-09-23 16:46:45 +02:00
Gustas
79b10ba9a5 Remove unused 4th dimension 2023-09-23 16:46:45 +02:00
Gustas
d05e0f23ea Remove unused tint attribute from model shader 2023-09-23 16:46:45 +02:00
Gustas
dab3ca0025 Add support for dark player colors 2023-03-10 15:43:24 +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
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
Paul Chote
8edd9de278 Replace ITintableRenderable with IModifyableRenderable. 2021-01-06 00:06:51 +01:00
Paul Chote
67754e8693 Add alpha support to SpriteRenderer. 2021-01-06 00:06:51 +01:00
Paul Chote
ac7eda8ca2 Add support for rendering tinted artwork. 2020-07-13 14:02:02 +02:00
Ivaylo Draganov
3ab4a584ab Remove trailing white-space from various files 2020-05-23 11:38:44 +02:00
Paul Chote
dac1f270ce Restore legacy OpenGL 2.1 support. 2020-04-25 21:03:43 +02:00
Paul Chote
1f849e9f7d Add antialiasing support for paletted sprites. 2020-01-26 20:22:49 +01:00
Paul Chote
7d887f0332 Fix NV shader compile errors in combined.frag. 2019-12-27 20:20:42 +01: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
ce8112fb5a Migrate rendering to OpenGL 3.2 / OpenGL ES 3.0. 2019-09-12 18:58:37 +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
cc9da63323 Fix sampler index check
The index values are round numbers. Checking agaist
the half-values improves robustness against small
floating point delta errors that occur on some GPUs.
2018-10-06 15:10:43 +01:00
Paul Chote
2f2a7724d5 Rename shp.(frag|vert) to combined.(frag|vert). 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
Paul Chote
c307b3e291 Encode channel attributes in a more sensible way. 2018-06-04 23:33:57 +02:00
Paul Chote
a329711011 Render lines using SpriteRenderer without breaking the batch. 2018-05-23 23:28:22 +02:00
Paul Chote
dc4c3fd546 Rename VoxelRenderer to ModelRenderer. 2017-06-14 18:56:06 +02:00
Paul Chote
d1b7d0e0fb Use the MATLAB Jet colormap for displaying depth data. 2016-08-28 11:52:16 +01:00
Paul Chote
50da18cd22 Add depth buffer support to RgbaColorRenderer. 2016-08-27 15:43:20 +01:00
Paul Chote
f0306e7cc2 Render voxels with an approximately-correct z-offset. 2016-08-21 12:43:16 +01:00
Paul Chote
3a37551812 Remove SheetType.DualIndexed from terrain rendering. 2016-04-15 16:53:37 -04:00
Paul Chote
b68fee9521 Remove SheetType.DualIndexed from voxel rendering. 2016-04-15 16:46:47 -04:00
Paul Chote
7c67b10d28 Add a secondary texture coordinate to Vertex. 2016-04-15 16:46:47 -04:00
Paul Chote
2634643d91 Write z data to the depth buffer. 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
be29ec5342 Use explicit shader attributes. 2015-12-26 12:50:33 +00:00
Paul Chote
02dedf9acf Introduce RgbaColorRenderer class. 2015-12-10 23:22:07 +00:00