summaryrefslogtreecommitdiff
path: root/src/new_render/skybox.h
diff options
context:
space:
mode:
authoromnisci3nce <omniscient.oce@gmail.com>2024-07-18 16:17:23 +1000
committeromnisci3nce <omniscient.oce@gmail.com>2024-07-18 16:17:23 +1000
commit7ec62c58e9560fc961ec3522490e40ad1d259c72 (patch)
treee7d6c9bb9efc9871fe2a4bc7e5f51a02f7d901ef /src/new_render/skybox.h
parentc43bee3ec89e0863b4195ca9298a007d3526a6d9 (diff)
wip skybox. make geometry owned and copied onto Mesh
Diffstat (limited to 'src/new_render/skybox.h')
-rw-r--r--src/new_render/skybox.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/new_render/skybox.h b/src/new_render/skybox.h
index 5540381..bf70976 100644
--- a/src/new_render/skybox.h
+++ b/src/new_render/skybox.h
@@ -19,7 +19,6 @@ PUB Skybox Skybox_Create(const char** face_paths, int n); // should always pass
PUB void Skybox_Draw(Skybox* skybox, Camera camera);
typedef struct SkyboxUniforms {
- Vec3 in_position;
TextureHandle cubemap;
} SkyboxUniforms;
@@ -28,24 +27,16 @@ static ShaderDataLayout Skybox_GetLayout(void* data) {
bool has_data = data != NULL;
ShaderBinding b1 = {
- .label = "In",
- .vis = VISIBILITY_VERTEX,
- .kind = BINDING_BYTES,
- .data = {.bytes = {.size = sizeof(Vec3)}}
- };
-
- ShaderBinding b2 = {
.label = "cubemap",
.vis = VISIBILITY_FRAGMENT,
- .kind = BINDING_SAMPLER,
+ .kind = BINDING_TEXTURE,
};
if (has_data) {
- b1.data.bytes.data = &d->in_position;
- b2.data.texture.handle = d->cubemap;
+ b1.data.texture.handle = d->cubemap;
}
return (ShaderDataLayout) {
- .bindings = { b1, b2},
- .binding_count = 2
+ .bindings = { b1},
+ .binding_count = 1
};
-} \ No newline at end of file
+}