Page 1 of 1

using mCustomParameter

Posted: Thu Jul 30, 2020 8:41 pm
by Nickak2003
I would like to use mCustomParameter on a per object basis. Each object is going to have a different blend value in the shader based on this parameter. From what I can figure, I need to upload to a const buffer, all objects' mCustomParameters and use drawId. I guess this is done in, hlms::fillBuffersFor ??

Help appreciated!

using mCustomParameter

Posted: Thu Jul 30, 2020 10:00 pm
by Nickak2003
OK this is what I want to do:
Create a custom HLMS which inherits from PBS.

override fillbuffers for and do all the PBS stuff, but then append some stuff to pass a buffer for my per-item custom parameter. need some help

using mCustomParameter

Posted: Fri Jul 31, 2020 12:13 am
by Nickak2003
never mind, i got it working

using mCustomParameter

Posted: Sat Aug 01, 2020 2:08 pm
by Nickak2003
So what I did was change mCustomParameter to a float and then access it in the pixel shader on a per-item basis. This involves editing ogre source a little.

Here's the info:
https://spotcpp.com/adding-custom-param ... for-items/

I did this so i could fade in or out individual pieces of grass rather than pop them.