Hey, I’m enjoying ALINE and am exploring using it to supplement an in-game HUD. I’d like to put these into HDR color range, and I’ve already adjusted the injection point to accommodate this in HDRP.
What’s a bit greek to me is what all needs to be modified to move to HDR color. My naive first guess was changing out from Color32 to Color in CommandBuilder.cs, but that didn’t change the output (and did appear to result in some subsequent rendering issues). It looks like there’s some direct memory allocation I also need to account for here as well.
Any hints at what needs to be modified to get this working?
I kept fishing around on this and resolved it, so here’s a follow-up for anyone interested. Here’s a (wildly overblown) example:
All of the changes made were in CommandBuilder.cs. These were:
Replace all instances of Color32 with Color
In VertexAttributeDescriptor[] MeshLayout and MeshLayoutText change the color format from UNorm8 to Float32
In PopColor() change Reserve(4) to Reserve(16) [I haven’t verified this was necessary]
In public void Line (Vector3 a, Vector3 b, Color color) change lineData ptr+8 to lineData ptr+20, and change the buffer->SetLength(bufferSize + 4… to buffersize + 16… [Also haven’t verified this was necessary]
I’m not entirely sure if I’ve done additional steps than needed, or if I’m missing anything that would be smart to add, so feedback is totally appreciated.
If you’re in HDRP, you also need to change these settings:
In DrawingManager.cs find volume.injectionPoint = and change it to BeforePostProcess (or before transparent, if you need). This allows you to render with postprocessing if you want it
Make sure Custom Passes is enabled in your HDRP Render Pipeline Asset for each of your quality settings
This is a few years old and I’m trying to follow your steps but it appears the functions have changed slightly. It seems the ConvertColor clamps the potential HDR color into an uint. If I try to follow the directions in your comment, I easily get lost with a bug that says “System.Exception: Too few pop commands and too many push commands. Are your push and pop commands properly matched?”
Are there any tips for resolving this or do you have an updated version of CommandBuilder.cs that would allow a slightly slower output of the full Color() instead of converted uint ?