Page 1 of 1

PBS Datablock clone brdf 0

Posted: Fri May 03, 2019 4:32 pm
by Lax
Ogre Version:2.1 :?:
Operating System:Windows10 :?:
Render System:DX12 :?:

Hi,

I have noticed, that when I clone a PBS datablock, the brdf is always 0.
But when I read the json, I see, that brdf is set e.g. to 'BlinnPhong'.

Can this be fixed?

See function:

Code: Select all

this->datablock = dynamic_cast<Ogre::HlmsPbsDatablock*>(sourceDataBlock->clone(this->originalDataBlockName
				+ Ogre::StringConverter::toString(this->gameObjectPtr->getId())));
Thanks!

Best Regards
Lax

Re: PBS Datablock clone brdf 0

Posted: Fri May 03, 2019 7:42 pm
by dark_sylinc
That's weird.
HlmsPbsDatablock::cloneImpl in Components/Hlms/Pbs/src/OgreHlmsPbsDatablock.cpp.inc does copy the mBrdf. I guess I'll have to take a look at what is happening when I try it

Re: PBS Datablock clone brdf 0

Posted: Fri May 03, 2019 9:07 pm
by Lax
Oh, I'm sorry :oops: . I mixed up workflow with brdf. So everything works as expected. This post can be closed.

Best Regards
Lax