I’m using a shader Material to color code an extrude geometry according to some Data values (https://jsfiddle.net/nemines/8rLuv1hy/18/). This works fine and I get the results I am looking for. However, it’s not the most sexy looking mesh as it needs lighting. I tried including lights and conserving the color coding but without success.
here is the desired effect with lighting but without the color coding (JSFiddle).
Any idea how to apply the lighting to my custom shader and preserve the color coding ?
Material.onBeforeCompile() would make it easier to make use of lighting and other existing material features. Considering the amount of your custom code, it should be the preferred approach.
So I tried what you recommended and I got the lighting effect I was looking for. However, it seems to me that I only have the color corresponding to the first attribute (RMR) value of the geometry_data. Maybe something is wrong with the definition of norm_z.