diff options
author | rodri <rgl@antares-labs.eu> | 2024-10-08 13:16:22 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-10-08 13:16:22 +0000 |
commit | 6af5bb94f6feedb6c929eb6cafc57da4a1be64bc (patch) | |
tree | 9826dbc9f23a003c63f927707712b0fd048dd6e2 | |
parent | b8dacd35abcede65c0cd415e5fd41b3f8f75d4f3 (diff) | |
download | 3dee-6af5bb94f6feedb6c929eb6cafc57da4a1be64bc.tar.gz 3dee-6af5bb94f6feedb6c929eb6cafc57da4a1be64bc.tar.bz2 3dee-6af5bb94f6feedb6c929eb6cafc57da4a1be64bc.zip |
obj: add support for specular maps.
-rw-r--r-- | obj.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |