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
-
- Goblin
- Posts: 272
- Joined: Thu Jun 10, 2004 4:19 am
- x 26
using mCustomParameter
Last edited by Nickak2003 on Sat Aug 01, 2020 2:22 pm, edited 1 time in total.
-
- Goblin
- Posts: 272
- Joined: Thu Jun 10, 2004 4:19 am
- x 26
using mCustomParameter
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
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
Last edited by Nickak2003 on Sat Aug 01, 2020 2:23 pm, edited 2 times in total.
-
- Goblin
- Posts: 272
- Joined: Thu Jun 10, 2004 4:19 am
- x 26
using mCustomParameter
never mind, i got it working
Last edited by Nickak2003 on Sat Aug 01, 2020 2:22 pm, edited 1 time in total.
-
- Goblin
- Posts: 272
- Joined: Thu Jun 10, 2004 4:19 am
- x 26
using mCustomParameter
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.
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.