summaryrefslogtreecommitdiff
path: root/engine/src/rendering/shader/cursor.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-08-06 20:15:23 +0200
committerHampusM <hampus@hampusmat.com>2026-08-06 20:33:47 +0200
commit88e04dab6a8cb1c63840242cabec3d90326a6552 (patch)
tree66db7180b3e2d71dc7f1bfff88c52bde250a5d39 /engine/src/rendering/shader/cursor.rs
parent2cc47806a9af4bceb9ef34a328cdf39d9f4ce1fc (diff)
feat(engine): add support for cube map textures
Diffstat (limited to 'engine/src/rendering/shader/cursor.rs')
-rw-r--r--engine/src/rendering/shader/cursor.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/engine/src/rendering/shader/cursor.rs b/engine/src/rendering/shader/cursor.rs
index 169ad0b..5cc742d 100644
--- a/engine/src/rendering/shader/cursor.rs
+++ b/engine/src/rendering/shader/cursor.rs
@@ -275,15 +275,23 @@ impl BindingValue
(
Self::Texture(_, BindingTextureKind::Texture2D),
TypeKind::Resource,
- _,
- _,
- _,
+ ..,
Some(res_shape),
) if (res_shape & ResourceShape::BASE)
.contains(ResourceShape::TEXTURE_2D) =>
{
Ok(())
}
+ (
+ Self::Texture(_, BindingTextureKind::Cube),
+ TypeKind::Resource,
+ ..,
+ Some(res_shape),
+ ) if (res_shape & ResourceShape::BASE)
+ .contains(ResourceShape::TEXTURE_CUBE) =>
+ {
+ Ok(())
+ }
_ => {
cold_path();
Err(BindingError::IncorrectValueType {
@@ -356,6 +364,7 @@ pub struct Binding
pub enum BindingTextureKind
{
Texture2D,
+ Cube,
}
#[derive(Debug, thiserror::Error)]