For the GridMaterial, the places where grid lines intersect was too bright and it was really annoying me LOL, like below.
GridMaterial with default settings:
Currently the contribution of each axis is added together. If instead we use the max axis contribution then the issue of overlapping lines being too bright is resolved.
Below is from the same playground using the updated GridMaterial.
Here’s a PR to update GridMaterial’s fragment shader with this fix.
10:18PM - 29 Nov 21 UTC
Fixes the issue seen in the below playground where the points of intersection be
Also here’s the NME grid material updated with this fix as well.
I kinda liked the dots
joking aside I think this is a breaking change and I wonder if you could add it under a special
Okay I’ll model it after fogEnabled with a define and property then. Hmm what to call the flag thou, maxAxisEnabled?
I am super dumb with names…
could be as simple as
// Create the grid value from the max axis.
float grid = clamp(max(max(x, y), z), 0., 1.);
float grid = clamp(x + y + z, 0., 1.);
and MAXLINES would map to a property named as you see best fit
Yep that’s what I was thinking too, then model the property mapping after fogEnabled.
Maybe just maxLinesEnabled for the name then unless inspiration strikes.
Okay all done (I think). I went with calling the property useMaxLine and distinguished it from using the sum of the lines for the documentation.
Nailed it, thanks a lot !!!
Oops I realized that I forgot to add anything for this property, useMaxLine, to the documentation guide, so I just added a little section and
PG to the list of notes for the GridMaterial properties, to hopefully make it more clear when it might be useful.
01:54AM - 06 Apr 22 UTC
Adds a little info on when to use the new GridMaterial property useMaxLine, alon