Detail maps offset and scale

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 267
Joined: Wed Apr 23, 2014 3:49 pm
Location: Bologna, Italy
x 75
Contact:

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 programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft EsportRacecraft Coin-Op, Victory: The Age of Racing

Post Reply