Custom Shader In ofMaterial

Hi all,

Is it possible to add a custom shader to ofMaterial? I would like to have a mesh displacement but still use the fragment shading so I could use ofLight.


I know that since 0.10 there is this new feature ofMaterialSettings, I did not tried yet. But from what I read, you can just modify the color of a pixel after the rasterization, and what you want to do is some vertex displacement in the vertex shader, so probably it does not cover your case.

But, a workaround could be to print the shaders of the ofMaterial in the console (or, as you are on windows, inspecting it using renderDoc), copy them to vert.glsl and frag.glsl and then simply edit the vertex shader.
Then you can have your custom shaders that behaves like the default ones except for the displacement.