summaryrefslogtreecommitdiff
path: root/src/new_render/shader_layouts.h
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-19 14:33:34 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-19 14:33:34 +1000
commit82515f9d90ac149984013f0d64c1cab37b349b29 (patch)
tree6da445874d055e3e66ab1825d4aa3bb784955fc9 /src/new_render/shader_layouts.h
parent5359c011a08ef2e06ed54104cc16c32868ca88ff (diff)
chore clang format + tidy
Diffstat (limited to 'src/new_render/shader_layouts.h')
-rw-r--r--src/new_render/shader_layouts.h37
1 files changed, 15 insertions, 22 deletions
diff --git a/src/new_render/shader_layouts.h b/src/new_render/shader_layouts.h
index c98f3c5..09cf129 100644
--- a/src/new_render/shader_layouts.h
+++ b/src/new_render/shader_layouts.h
@@ -15,7 +15,6 @@ typedef struct Binding_Model {
/** @brief data that is handy to have in any shader */
typedef struct Binding_Globals {
-
} Binding_Globals;
typedef struct pbr_point_light {
@@ -33,45 +32,39 @@ static ShaderDataLayout Binding_Camera_GetLayout(void* data) {
Binding_Camera* d = data;
bool has_data = data != NULL;
- ShaderBinding b1 = {
- .label = "Camera",
- .kind = BINDING_BYTES,
- .data.bytes = { .size = sizeof(Binding_Camera) }
- };
+ ShaderBinding b1 = { .label = "Camera",
+ .kind = BINDING_BYTES,
+ .data.bytes = { .size = sizeof(Binding_Camera) } };
if (has_data) {
b1.data.bytes.data = d;
}
- return (ShaderDataLayout) {.bindings = {b1 }, .binding_count = 1};
+ return (ShaderDataLayout){ .bindings = { b1 }, .binding_count = 1 };
}
static ShaderDataLayout Binding_Model_GetLayout(void* data) {
Binding_Model* d = data;
bool has_data = data != NULL;
- ShaderBinding b1 = {
- .label = "Model",
- .kind = BINDING_BYTES,
- .vis = VISIBILITY_VERTEX,
- .data.bytes = { .size = sizeof(Binding_Model) }
- };
+ ShaderBinding b1 = { .label = "Model",
+ .kind = BINDING_BYTES,
+ .vis = VISIBILITY_VERTEX,
+ .data.bytes = { .size = sizeof(Binding_Model) } };
if (has_data) {
b1.data.bytes.data = d;
}
- return (ShaderDataLayout) {.bindings = {b1 }, .binding_count = 1};
+ return (ShaderDataLayout){ .bindings = { b1 }, .binding_count = 1 };
}
static ShaderDataLayout Binding_Lights_GetLayout(void* data) {
-Binding_Lights* d = data;
+ Binding_Lights* d = data;
bool has_data = data != NULL;
- ShaderBinding b1 = {
- .label = "Lights",
- .kind = BINDING_BYTES,
- .vis = VISIBILITY_FRAGMENT,
- .data.bytes = { .size = sizeof(Binding_Lights) }
- };
+ ShaderBinding b1 = { .label = "Lights",
+ .kind = BINDING_BYTES,
+ .vis = VISIBILITY_FRAGMENT,
+ .data.bytes = { .size = sizeof(Binding_Lights) } };
if (has_data) {
b1.data.bytes.data = d;
}
- return (ShaderDataLayout) {.bindings = {b1 }, .binding_count = 1};
+ return (ShaderDataLayout){ .bindings = { b1 }, .binding_count = 1 };
} \ No newline at end of file