GLOW_UV_OFFSET determines the number of pixels that the glow effect will be offset from the text by (for using glow as a drop shadow). This is in normalized texture coordinates --- so if your texture is 512x512, then 1 pixel = float2(1/512.0, 1/512.0).

OUTER_GLOW_MIN_DVALUE / OUTER_GLOW_MIN_DVALUE determine how far outside the shape the glow begins appearing, and when it reaches full opacity. The numbers to use here depend on how you generated your distance field....0.5 means "right on the edge". 1.0 means "x units inside the shape". 0.0 means "x units outside the shape". Depending on how you generated the distance field, "x" is going to be a different number of pixels.

I would guess that baseColor.a is the right value to use in place of mskUsed, but before you do that part, you're missing either

GLOW_UV_OFFSET determines the number of pixels that the glow effect will be offset from the text by (for using glow as a drop shadow). This is in normalized texture coordinates --- so if your texture is 512x512, then 1 pixel = float2(1/512.0, 1/512.0).

OUTER_GLOW_MIN_DVALUE / OUTER_GLOW_MIN_DVALUE determine how far outside the shape the glow begins appearing, and when it reaches full opacity. The numbers to use here depend on how you generated your distance field....0.5 means "right on the edge". 1.0 means "x units inside the shape". 0.0 means "x units outside the shape". Depending on how you generated the distance field, "x" is going to be a different number of pixels.

I would guess that baseColor.a is the right value to use in place of mskUsed, but before you do that part, you're missing either

Thank you for the help, I have been experiementing with this for a little bit now and have a few questions.

Currently my text is getting a poor inner shadow look, rather then an outer shadow. If the code I posted above is correct (which is nearly identical to the Valve example), it seems like it is do to the MIN/MAX glow value. I calculate my text fields using the type of algorithm that OrangeTangy posted in his blog, do you have an algorithm you can suggest. This uses 0.5 as the mask type value, I am not sure at all though what the MIN/MAX values should like though, I have tried numerous pairs but "nothing fit".

Where did you happen to find out some of this information, such as the normalized texture coordinates? I don't recall reading any of that.

Also, since it seems you may have implemented this before, what is your commendation for the smoothstep values when no effects are applied? I am currently doing "smoothstep(0.48, 0.52, alpha)"

When you calculate your distance field, each pixel ends up with a distance value to the edge of the shape. You then perform some kind of operation that converts these distances into bytes, where 0=far outside, 255=far inside and 127/128=on the edge.Depending on how this conversion is performed, the meaning or your MIN/MAX parameters will be different!

For example, let's say that after converting distances to bytes, a difference of 1 means a distance of "1 pixel".That would mean that 126 is 1px from the edge, 125 is 2px from the edge, etc, etc, and 0 is 127px from the edge.

Looking at your "smoothstep(0.48, 0.52, alpha)" example, that's a distance of "0.02" either side of the centre, or in our byte representation, it's "5.1" either side of the centre.Now, "0.02" and "5.1" have no meaningful units at this point without knowing how your tool converts distances into the byte representation.If we assume it's doing it the same as my example above (1 unit = 1 pixel distance in the original map), then you edge blur should be 10.2 pixels wide relative to the original texture.

txDiffuse.Sample() takes normalised texture coordinates as inputs. Seeing you add GLOW_UV_OFFSET to the parameter passed into this function, then it follows that GLOW_UV_OFFSET should also be specified in normalised texture coordinates. This isn't specified in the Valve paper, it's just background shader programming knowledge.

Thanks for the help, it looks like that about clears it up for me. By any chance do you happen to remember where you figured out your method for generating distance maps? Mine was just put together from random places that I read.