2018-11-22 16:13:02 -08:00
|
|
|
LC_PIXEL_INPUT vec3 PixelNormal;
|
|
|
|
LC_PIXEL_OUTPUT
|
|
|
|
|
2021-01-12 13:48:04 -08:00
|
|
|
uniform mediump vec4 HighlightParams[4];
|
2018-11-22 16:13:02 -08:00
|
|
|
uniform samplerCube Texture;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
LC_SHADER_PRECISION float TexelAlpha = textureCube(Texture, PixelNormal).a;
|
2019-01-19 20:04:08 -08:00
|
|
|
LC_SHADER_PRECISION float Distance = length(vec3(HighlightParams[0]) - PixelNormal);
|
|
|
|
LC_SHADER_PRECISION float Highlight = step(Distance, HighlightParams[0].w);
|
2019-01-21 16:54:10 -08:00
|
|
|
|
2019-01-22 14:34:44 -08:00
|
|
|
gl_FragColor = mix(mix(HighlightParams[2], HighlightParams[3], Highlight), HighlightParams[1], TexelAlpha);
|
2018-11-22 16:13:02 -08:00
|
|
|
}
|