Is there an easy way to expand upon the GridMaterial? I want to alter the shader code to add a feature but it seems like the shaders are full of custom includes.
The easy way is to start with the GridMaterial recreated in the NME and modify it:
@Evgeni_Popov this is insane !!! could you add this in the nme doc ?
It’s already in
mouahahahah how could I miss this one
Oh wow this is perfect! I can’t believe I missed this in the materials thread. Thanks!!!
Are there any reference documents for how the Grid Material was constructed? I’m trying to understand how the contribution per axis and normal impact sections of the shader work. I know it’s using derivative functions to help alias the lines.
Not that I know of, looking into the shader code comments is probably the easiest way: Babylon.js/grid.fragment.fx at master · BabylonJS/Babylon.js · GitHub