I am trying to achieve a glow effect in the UI, but I can't figure out how to do it. Even after setting the color parameters to a high value (like (30,0,0) as I do normally to achieve this effect in the world), it stays the same. The effect I'd like to achieve: https://ray3k.files.wordpress.com/2016/08/preview1.gif?w=840

- 1,339
- 2
- 16
- 29

- 59
- 2
- 11
2 Answers
The UI elements in your example image are most likely just texture files and the glow effect is already in the texture. The glow effect that you achieved with setting the emission value above 1 is caused by bloom, but that does not work in UI so you have to bake the glow into the texture itself in a image editing software.

- 16
float4 CurColor=0;
float2 NewUV = UV;
int i=0;
float StepSize = Distance / (int) DistanceSteps;
float CurDistance=0;
float2 CurOffset=0;
float SubOffset = 0;
float TwoPi = 6.283185;
float accumdist=0;
if (DistanceSteps < 1)
{
return Texture2DSample(Tex,TexSampler,UV);
}
else
{
while ( i < (int) DistanceSteps)
{
CurDistance += StepSize;
for (int j = 0; j < (int) RadialSteps; j++)
{
SubOffset +=1;
CurOffset.x = cos(TwoPi*(SubOffset / RadialSteps));
CurOffset.y = sin(TwoPi*(SubOffset / RadialSteps));
NewUV.x = UV.x + CurOffset.x * CurDistance;
NewUV.y = UV.y + CurOffset.y * CurDistance;
float distpow = pow(CurDistance, KernelPower);
CurColor += Texture2DSample(Tex,TexSampler,NewUV)*distpow;
accumdist += distpow;
}
SubOffset +=RadialOffset;
i++;
}
CurColor = CurColor;
CurColor /=accumdist;
return CurColor;
}
This is a code for a customized SpiralBlur node for materials. Takes a texture object param and outputs a 4 float with alpha intact. This way you can use it on a Retainer Box.
I know it's an old question but apparently this answer is rarely found to the point that some people (wink wink) outright deny that it's possible.
The end result needs tweaking or you can outright write a different blur code but probably a good start to anyone looking for this. Most other hits are so old (without any answer) that they've been archived on reddit and the like, making it impossible to post the actual correct answer any more.
Google doesn't care and will display those as first hits instead of the real ones. Yay.

- 1