summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-10-08 13:16:22 +0000
committerrodri <rgl@antares-labs.eu>2024-10-08 13:16:22 +0000
commit6af5bb94f6feedb6c929eb6cafc57da4a1be64bc (patch)
tree9826dbc9f23a003c63f927707712b0fd048dd6e2
parentb8dacd35abcede65c0cd415e5fd41b3f8f75d4f3 (diff)
download3dee-6af5bb94f6feedb6c929eb6cafc57da4a1be64bc.tar.gz
3dee-6af5bb94f6feedb6c929eb6cafc57da4a1be64bc.tar.bz2
3dee-6af5bb94f6feedb6c929eb6cafc57da4a1be64bc.zip
obj: add support for specular maps.
-rw-r--r--obj.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/obj.c b/obj.c
index 403e547..7e1c4e8 100644
--- a/obj.c
+++ b/obj.c
@@ -172,6 +172,11 @@ loadobjmodel(Model *m, OBJ *obj)
mtl->diffusemap->image = dupmemimage(objmtl->map_Kd);
}
+ if(objmtl->map_Ks != nil){
+ mtl->specularmap = alloctexture(sRGBTexture, nil);
+ mtl->specularmap->image = dupmemimage(objmtl->map_Ks);
+ }
+
if(objmtl->norm != nil){
mtl->normalmap = alloctexture(RAWTexture, nil);
mtl->normalmap->image = dupmemimage(objmtl->norm);