Ask questionsIs there a way to change color in real time on the hair segmentation android?
I was wondering if there is a way to input RGB values dynamically in the RecolotCalculatorOptions in the graph
Answer
questions
mcclanahoochie
Hi,
Currently, the Recolor Calculator reads in a Color from the options , and reads those values into color_ during the calculator's Open() funtion, and sends the values to the GPU during InitGPU() .
To enable changing the color every frame, a couple things need to happen:
color_ during ProcessGPU (again similar to how it's done here and here )glUniform3f(glGetUniformLocation(program_, "recolor"), color_[0], color_[1], color_[2]);
right after the call to glUseProgram(program_); inside of GlRender() .After all that is done, you would need another calculator to send in the new color values, and that would be up to you on the logic.
These changes to Recolor Calculator are something we can consider adding in the future, but right now there is no timeline for it.
Hopefully that provides some insight for you.
Cheers, ~Chris
Related questions