Cleanup: EEVEE-Next: Replace unused Gbuffer struct

This commit is contained in:
Clément Foucault 2024-01-15 12:58:14 +13:00
parent 8f6ee910ba
commit 95b523f268
4 changed files with 6 additions and 22 deletions

View File

@ -21,23 +21,7 @@
#define GBUFFER_NORMAL_MAX GBUFFER_LAYER_MAX
#define GBUFFER_DATA_MAX (GBUFFER_LAYER_MAX * 2)
/* Structure used as input and output of the packing & read functions. */
struct GBufferData {
/* Only valid (or null) if `has_diffuse`, `has_reflection` or `has_refraction` is true. */
/* TODO(fclem): This should eventually become ClosureUndetermined. */
ClosureDiffuse diffuse;
ClosureTranslucent translucent;
ClosureReflection reflection;
ClosureRefraction refraction;
/* Additional object information if any closure needs it. */
float thickness;
uint object_id;
/* First world normal stored in the gbuffer. Only valid if `has_any_surface` is true. */
vec3 surface_N;
};
/* TODO(fclem): This should replace GBufferData. */
struct GBufferDataUndetermined {
ClosureUndetermined diffuse;
ClosureUndetermined translucent;
ClosureUndetermined reflection;
@ -648,7 +632,7 @@ void gbuffer_closure_metal_clear_coat_load(inout GBufferReader gbuf,
*
* \{ */
GBufferWriter gbuffer_pack(GBufferDataUndetermined data_in)
GBufferWriter gbuffer_pack(GBufferData data_in)
{
GBufferWriter gbuf;
gbuf.header = 0u;

View File

@ -12,9 +12,9 @@
#define TEST(a, b) if (true)
GBufferDataUndetermined gbuffer_new()
GBufferData gbuffer_new()
{
GBufferDataUndetermined data;
GBufferData data;
data.diffuse.weight = 0.0;
data.translucent.weight = 0.0;
data.reflection.weight = 0.0;
@ -27,7 +27,7 @@ GBufferDataUndetermined gbuffer_new()
void main()
{
GBufferDataUndetermined data_in;
GBufferData data_in;
GBufferReader data_out;
samplerGBufferHeader header_tx = 0;
samplerGBufferClosure closure_tx = 0;

View File

@ -83,7 +83,7 @@ void main()
/* ----- GBuffer output ----- */
GBufferDataUndetermined gbuf_data;
GBufferData gbuf_data;
gbuf_data.diffuse = g_diffuse_data;
gbuf_data.translucent = g_translucent_data;
gbuf_data.reflection = g_reflection_data;

View File

@ -85,7 +85,7 @@ void main()
/* ----- GBuffer output ----- */
GBufferDataUndetermined gbuf_data;
GBufferData gbuf_data;
gbuf_data.diffuse = g_diffuse_data;
gbuf_data.translucent = g_translucent_data;
gbuf_data.reflection = g_reflection_data;