Commit graph

33 commits

Author SHA1 Message Date
Sally Coolatta
d50cdd92dc SRB2 -> DRRR copyright in rhi folder 2024-04-05 10:29:38 -04:00
AJ Martinez
0072170b2e Add SalCRT Sharp 2024-03-17 17:50:29 -07:00
Eidolon
123477dac9 Add Sharp Bilinear mode, make default 2024-03-07 22:03:36 -06:00
Eidolon
0156db0dc1 Add optional CRT screen effect 2024-03-06 22:39:21 -06:00
Eidolon
187f30cc64 rhi: use GL 2 instead of GL Core
Widens the hardware compat range without losing features (besides
debugging)
2023-11-04 20:15:51 -05:00
Eidolon
ea7563df88 rhi gl: Remove the garbage disposal 2023-09-02 12:53:45 -05:00
Eidolon
6f580606cd hwr2: Remove pass infrastructure
It's not worth trying to force the engine to conform to deferred
drawing.
2023-09-01 15:30:04 -05:00
Eidolon
9112ac8bdc rhi/gl: Clear stencil buffer in default renderpass 2023-07-09 13:54:07 -05:00
Eidolon
187e4a9442 rhi/gl: Loosen constraints on resource creation
It will be safe to call many of these functions in Vulkan even if a
context is active, but the contents of buffers and textures will be
considered undefined until updated.
2023-07-09 13:54:07 -05:00
Eidolon
3ec7163a34 rhi: remove TransferContexts 2023-07-09 13:54:07 -05:00
Eidolon
be869aefc6 rhi gl: Allow create_pipeline in gfx ctx
This function impl does not change any GL drawing state, and neither
should Vulkan, so the constraint that this function not be called while
a graphics context is active is not necessary.
2023-05-19 18:54:19 -05:00
Eidolon
7e4d61730e rhi: Fix handle std::hash specialization
This prevented hashing of non-const qualified types. The contract for
std::hash already implies that it is a callable for an lvalue reference
of the template type.
2023-05-19 18:54:19 -05:00
Eidolon
20002f83c4 rhi: Make some stencil state dynamic
The reference, compare mask and write mask for each face direction in
the stencil test is now dynamic pipeline state and are implicitly set to
default values when a pipeline is bound. This is implementable using
Vulkan dynamic pipeline state bits and so there is no reason not to
provide it.

In the OpenGL implementation of RHI, this requires tracking some stencil
state internally in the graphics context because the stencil state
functions require multiple inputs that do not cleanly map to the Vulkan
equivalents.
2023-05-19 18:54:19 -05:00
Eidolon
5f78620bd9 rhi: Add rhi::recreate_buffer_to_size
Simple utility to retain or recreate a buffer to a desired size.
2023-04-15 16:32:56 -05:00
Eidolon
ae1d0e680a rhi: Add Rhi::get_buffer_size 2023-04-15 16:32:56 -05:00
Eidolon
356e3317df hwr2: Do postimg in hardware
Depends on updated shaders
2023-04-02 19:46:21 -05:00
Eidolon
a9fcff852d rhi: Rewrite shader loading
Multiple shader sources, simpler macro definition, and slightly more
data driven.
2023-04-01 17:32:34 -05:00
Eidolon
171a285caa rhi: Add get_texture_details, get_renderbuffer_size 2023-04-01 15:19:08 -05:00
Eidolon
c193930b4e rhi: Add more sampler-related uniform names 2023-04-01 15:07:31 -05:00
Eidolon
8cc6e9a4f0 rhi: Add texture wrap modes
They cannot be changed after creation, for simplicity.
2023-03-24 16:43:41 -05:00
Eidolon
70c375f9db rhi: Remove color attachment pixel formats
Color attachment must always be an RGBA texture
2023-03-24 16:11:11 -05:00
Eidolon
c31df8a0bb rhi: Repurpose Renderbuffer for depth-stencil 2023-03-24 16:06:30 -05:00
Eidolon
28f5afac40 rhi: Remove depth textures 2023-03-24 14:23:16 -05:00
Eidolon
ba5ee56b8e Rename RHI update_buffer_contents to update_buffer
Consistency with update_texture
2023-03-23 13:30:17 -05:00
Eidolon
e088577924 Use GLM in RHI for uniforms and color parameters 2023-03-23 13:19:48 -05:00
Eidolon
31ce947659 hwr2: overhaul wipe rendering 2023-02-26 18:47:42 -06:00
Eidolon
e875c8e20d hw2: add screenshot pass 2023-02-26 18:47:42 -06:00
Eidolon
d855d96a10 hwr2: Add hardware 2D rendering 2023-02-26 18:47:42 -06:00
Eidolon
7db8b7d20c hwr2 gl3core: Fix FBO depth attachment 2023-01-14 20:30:52 -06:00
Eidolon
095aa635b0 hwr: Store T in Slab directly 2023-01-14 20:27:56 -06:00
Eidolon
ccc10eadd0 hwr2: Reformat C++ code 2023-01-14 19:59:41 -06:00
Eidolon
286c96173a hwr2 gl3core: Implement render pass FBOs 2023-01-14 19:29:19 -06:00
Eidolon
01ddbf6dcf (WIP) hardware: add render hardware interface 2023-01-14 18:40:26 -06:00