Comparison node puts out bool, I need 1 or 0

Comparison Node puts out a bool.
I am comparing a grayscale textures pixels to 0.5. If greater than, return true, less than, return false.
But I can’t hook up the output to anything in shadergraph. I thought I’d be able to hook it straight into the HDRP litMaster baseColor node, because I thought it put out 1 or 0, but nope, its putting out bools.

So how do I convert the true/false output of a comparison node to anything?
Is there a math comparison that outputs 1 or 0?

EDIT: I used subtract -0.5 and ceiling, and it works, but feels hack-ey to me.

Yeah. I’ve hit a similar problem. Surprised there’s no simple way to cast bools.

Step might be what you are looking for step - Win32 apps | Microsoft Learn

I guess that would work, except I also like less than sometimes, seems like a work around again for what should be a fairly straightforward node.

You can chain a comparison into a “Branch” node to convert a boolean into different shader paths inside of the graph. It will add an extra ternary operator, but that was intended design for comparison nodes for right now. c:

@alexandral_unity Would some sensible auto-casting rules be a terrible design choice? Given the constraints and weaknesses of visual node-based programming over text-based code it strikes me that the trade-offs point towards that being a better design choice.