@@ -2203,15 +2203,8 @@ void LoadMtl(std::map<std::string, int> *material_map,
22032203 }
22042204
22052205 // bump texture
2206- if ((0 == strncmp (token, " map_bump" , 8 )) && IS_SPACE (token[8 ])) {
2207- token += 9 ;
2208- ParseTextureNameAndOption (&(material.bump_texname ),
2209- &(material.bump_texopt ), token);
2210- continue ;
2211- }
2212-
2213- // bump texture
2214- if ((0 == strncmp (token, " map_Bump" , 8 )) && IS_SPACE (token[8 ])) {
2206+ if ((0 == strncmp (token, " map_bump" , 8 )) && IS_SPACE (token[8 ]) ||
2207+ (0 == strncmp (token, " map_Bump" , 8 )) && IS_SPACE (token[8 ])) {
22152208 token += 9 ;
22162209 ParseTextureNameAndOption (&(material.bump_texname ),
22172210 &(material.bump_texopt ), token);
@@ -2235,6 +2228,15 @@ void LoadMtl(std::map<std::string, int> *material_map,
22352228 continue ;
22362229 }
22372230
2231+ // displacement texture
2232+ if ((0 == strncmp (token, " map_disp" , 8 )) && IS_SPACE (token[8 ]) ||
2233+ (0 == strncmp (token, " map_Disp" , 8 )) && IS_SPACE (token[8 ])) {
2234+ token += 9 ;
2235+ ParseTextureNameAndOption (&(material.displacement_texname ),
2236+ &(material.displacement_texopt ), token);
2237+ continue ;
2238+ }
2239+
22382240 // displacement texture
22392241 if ((0 == strncmp (token, " disp" , 4 )) && IS_SPACE (token[4 ])) {
22402242 token += 5 ;
0 commit comments