shithub: 3dee

Download patch

ref: 6af5bb94f6feedb6c929eb6cafc57da4a1be64bc
parent: b8dacd35abcede65c0cd415e5fd41b3f8f75d4f3
author: rodri <rgl@antares-labs.eu>
date: Tue Oct 8 09:16:22 EDT 2024

obj: add support for specular maps.

--- a/obj.c
+++ b/obj.c
@@ -172,6 +172,11 @@
 				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);