Detail maps offset and scale

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
User avatar
OGRE Contributor
OGRE Contributor
Posts: 241
Joined: Wed Apr 23, 2014 3:49 pm
x 45

Detail maps offset and scale

Post by TaaTT4 »

What's the reason of parsing detail maps offset and scale both in diffuse and normal section? Since offset and scale values are shared between detail diffuse and detail normal, the following material snippet, although valid, is totally misleading:

Code: Select all

"detail_diffuse0" :
	"scale" : [0.125, 0.125]

"detail_normal0" :
	"scale" : [0.5, 0.5]
Infact, 0.5 prevails as a scale value for the detail0 just because normal section is parsed after diffuse section in OgreHlmsJsonPbs.cpp.

Wouldn't be better to NOT parse offset and scale in normal section? The only drawback in doing so would be just if someone wants to use a detail normal without the corresponding detail diffuse (but is this a realistic scenario?!).
Senior game programmer at Vae Victis
Working on Racecraft

Post Reply