Commit Graph
115 Commits
Author SHA1 Message Date
Wunkolo 4864c51125 Migrate OpenGL specific headers to renderer_gl 2023-07-11 11:28:06 -07:00
Wunkolo c53080b444 Fix HTTPServer gpu-renderer interfacing
Fixing some compilation issues that occur when enabling the HTTP server
2023-07-11 11:28:06 -07:00
Wunkolo 2a1683ba62 Introduce "Renderer" abstraction layer
Adds a `renderer` class for which a rendering backend must implement and
will conditionally use OpenGL in the case that `ENABLE_GL` is enabled.
2023-07-11 11:27:35 -07:00
Wunkolo d96289cc05 Address remaining C4244 warnings
Remaining warnings regarding an implicit cast from `double` to `float`.
2023-07-10 12:33:37 -07:00
Wunkolo 119c908aa7 Add explicit return-type overload for getBits
Allows the return-type to be specified, allowing a concise final cast
after extracting the bit-type.  Addresses the remaining `C4244` warnings
regarding `getBits`.
2023-07-10 12:33:37 -07:00
Wunkolo 37b75f0928 Fix C4267/C4244 warnings
Address warnings involving lossy conversions from larger integer-types into smaller integer-types
2023-07-10 12:33:37 -07:00
wheremyfoodat ba1c3a8ec5 Moar HTTP 2023-07-10 11:30:09 +03:00
wheremyfoodat e67b98f990 doormat 2023-07-07 12:19:04 +03:00
Sky 255947b2fc [GPU] Add texture surface cache eviction
Implemented as a simple ring buffer evicting the oldest entry for now.
2023-07-06 08:48:37 -07:00
wheremyfoodat 883e1d4bd0 Madness trying to optimize assembly by reordering statements 2023-07-05 22:16:15 +03:00
wheremyfoodat 52c7783ae1 [OpenGL] Same for depth func 2023-07-05 19:08:13 +03:00
wheremyfoodat 7307bd270b [OpenGL] Same for depth mask 2023-07-05 18:54:09 +03:00
wheremyfoodat d80785cbb5 [OpenGL] More efficient colour mask handling 2023-07-05 18:23:14 +03:00
wheremyfoodat feacb9359d Formatting 2023-07-05 02:59:54 +03:00
wheremyfoodat dd3e1ea72b Ditch more uniforms 2023-07-05 01:37:18 +03:00
wheremyfoodat c282a44c27 [OpenGL renderer] Fewer uniform uploads 2023-07-05 01:12:13 +03:00
wheremyfoodat 3e18281a99 Remove outdated comments 2023-07-05 00:46:34 +03:00
wheremyfoodat 139c8759c9 More OpenGL state management stuff 2023-07-05 00:43:49 +03:00
wheremyfoodat a3d8f777b4 PicaVertex -> PICA::Vertex 2023-07-04 23:40:47 +03:00
wheremyfoodat aa27389473 [GL renderer] Implement clipping planes 2023-07-04 20:33:14 +03:00
wheremyfoodat 0cc8d0d8a4 Some GLSL formatting 2023-07-04 18:47:56 +03:00
wheremyfoodat e854d4ba63 Formatting 2023-07-04 18:15:27 +03:00
SkyandGitHub 0f66527cbe Merge pull request #1 from wheremyfoodat/master
Not Ignoring this PR I fucked up something on my Github GUI
2023-07-03 13:05:46 -07:00
Sky 157254e8a9 [GL] Set disabled light LUTs to 0
Fixes Kirby and Mario Kart
2023-07-02 22:01:42 -07:00
Sky df555372ad [GL] Move quaternion to normal, et. al into vs 2023-07-02 21:04:29 -07:00
Sky 12dbaeaeb0 [GL] Initial Implementation of Lighting LUTs 2023-07-02 16:14:11 -07:00
wheremyfoodat 0b2ff6c5c8 Separate user and dev builds 2023-07-02 22:36:45 +03:00
Sky 769e90a45f [GL] Implement most fragment lighting 2023-07-01 22:14:57 -07:00
Sky 6fababb93a [GL] Pipe Pica registers and implement ambient lighting 2023-07-01 16:43:57 -07:00
Sky de3c4020d8 [GL] Add lighting attributes 2023-07-01 15:16:35 -07:00
wheremyfoodat 1ac3a474da Fix formatting & cmake 2023-07-01 22:35:07 +03:00
Sky ca89909c00 Refactored Vertex Pipeline to always use Pica Formatted Vertex 2023-07-01 11:39:25 -07:00
wheremyfoodat 84fd0affa8 [GL renderer] Fix up float * vec4 mul 2023-06-29 21:37:31 +03:00
fleroviux 7ebbfbf1ef [GPU] Remove magic constants in TEV and texture binding code as much as possible 2023-06-20 23:43:43 +02:00
fleroviux 7128ae5565 [GPU] Fix incorrect &-operator with unsigned and signed operand in the GLSL code 2023-06-20 23:00:54 +02:00
fleroviux 6b610a82d6 [GPU] Move texture binding into its own method 2023-06-20 22:58:52 +02:00
fleroviux 4cb7e3625b Merge branch 'master' of github.com:fleroviux/Panda3DS into pica-tev-emulation 2023-06-20 22:47:47 +02:00
fleroviux 901e3308a0 [GPU] Rename abgr8888_to_vec4() to abgr8888ToVec4() 2023-06-20 22:33:12 +02:00
fleroviux 2f19310c42 [GPU] Upgrade TEV functions and variables to Pesca style 2023-06-20 22:28:58 +02:00
fleroviux 7ad8a5041e [GPO] Use a_ and v_ prefixes for vertex shader inputs and outputs 2023-06-20 22:21:59 +02:00
fleroviux 2fc22bed24 [GPU] Decode GPUREG_TEXENVi_COLOR in the vertex shader as well 2023-06-20 22:18:23 +02:00
fleroviux ef7d01d1b1 [GPU] Decode GPUREG_TEXENV_BUFFER_COLOR in the vertex shader 2023-06-20 22:09:14 +02:00
fleroviux b7616cc9ec [GPU] Cleanup the TEV GLSL code a bit" 2023-06-20 21:44:55 +02:00
fleroviux 9b5a24329f [GPU] Simplify TEV source fetching by using an array to store the current source values 2023-06-20 21:31:52 +02:00
fleroviux 9386ce319b [GPU] Make the fragment shader GLSL a bit more readable. 2023-06-20 21:06:34 +02:00
fleroviux 13a53a9e9d [GPU] Disable the alpha combiner when the color combiner is in "Dot3 RGBA" configuration 2023-06-20 20:46:01 +02:00
fleroviux a30f9ccd33 [GPU] Treat color and alpha sources as two separate RGBA values
Previously we fetched the RGB channels of the color source and the alpha channel of the alpha source
and combined these into a single RGBA source value that the source operands are applied to.
This is incorrect. The correct behavior is to fetch the full RGBA color for both the color and alpha
sources and to apply the color operand to the color source and the alpha operand to the alpha source,
i.e. using the *alpha* source R-channel when the alpha operand is "One minus source red".
Only after that we combine both sources into a single RGBA color.
2023-06-20 20:20:33 +02:00
fleroviux 9b1ed2084f [GPU] Implement initial support for multi-texturing 2023-06-20 00:01:12 +02:00
Wunkolo 6ee3f73335 Bisect TextureFmt and ColorFmt
Makes framebuffer-formats unrepresentable from texture formats while
allowing them to alias each other. Add utility functions as well that
just re-use the `TextureFmt` ones.
2023-06-18 08:22:14 -07:00
Wunkolo 134e16d8ea Replace Texture::Formats with PICA::ColorFmt
This enum was a duplicate of the PICA one. Now the PICA one is more
complete. Migrate `textureFormatToString` to be next to the enums
definition.
2023-06-18 00:10:04 -07:00