summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2025-02-22 17:01:35 +1100
committerquou <quou@disroot.org>2025-02-22 17:01:53 +1100
commit04db6b0ccd81d988cfe3a1d09e4eb00eeea77273 (patch)
tree5163857dca5070ecea802452c1e4e22806e4fbab /sc
parent944ca7aede48f358329cc9e6cdac479648f30c17 (diff)
basic shadows
Diffstat (limited to 'sc')
-rw-r--r--sc/sc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/sc/sc.cpp b/sc/sc.cpp
index d7e9038..d801a68 100644
--- a/sc/sc.cpp
+++ b/sc/sc.cpp
@@ -289,6 +289,8 @@ struct Desc {
t.stage |= 1 << stage_from_string(sstage);
t.dimension =
sdem && string_equal(sdem, "cube")? -6:
+ sdem && string_equal(sdem, "array")? -20:
+ sdem && string_equal(sdem, "shadowArray")? -21:
find_int_default(desc, "dimension", 2);
}
cfg_Object* read_struct(cfg_Object* desc) {
@@ -495,6 +497,10 @@ struct Desc {
ss << "uniform sampler";
if (texture.dimension == -6)
ss << "Cube ";
+ else if (texture.dimension == -20)
+ ss << "2DArray ";
+ else if (texture.dimension == -21)
+ ss << "2DArrayShadow ";
else
ss << texture.dimension << "D ";
ss << it.first << ";\n";