FastUIDraw
doxy
glsl
src
fastuidraw
glsl
shaders
fastuidraw_anisotropic.frag.glsl.hpp
Go to the documentation of this file.
1
/*!
2
* \file fastuidraw_anisotropic.frag.glsl.hpp
3
* \brief file fastuidraw_anisotropic.frag.glsl.hpp
4
*
5
* Copyright 2018 by Intel.
6
*
7
* Contact: kevin.rogovin@gmail.com
8
*
9
* This Source Code Form is subject to the
10
* terms of the Mozilla Public License, v. 2.0.
11
* If a copy of the MPL was not distributed with
12
* this file, You can obtain one at
13
* http://mozilla.org/MPL/2.0/.
14
*
15
* \author Kevin Rogovin <kevin.rogovin@gmail.com>
16
*
17
*/
18
19
20
21
/*!\addtogroup GLSLVertFragCode
22
* @{
23
*/
24
25
/*!
26
* \brief computes anisotropic coverage from a coverage value and its screen-space derivatives
27
* \param d coverage value
28
* \param dx derivative in x-direction of coverage value
29
* \param dy derivative in y-direction of coverage value
30
*/
31
float
32
fastuidraw_anisotropic_coverage
(
float
d,
float
dx,
float
dy)
33
{
34
float
mag_sq;
35
mag_sq = (dx * dx + dy * dy);
36
return
clamp(0.5 + d * inversesqrt(mag_sq), 0.0, 1.0);
37
}
38
/*! @} */
fastuidraw_anisotropic_coverage
float fastuidraw_anisotropic_coverage(float d, float dx, float dy)
computes anisotropic coverage from a coverage value and its screen-space derivatives ...
Definition:
fastuidraw_anisotropic.frag.glsl.hpp:32
Generated by
1.8.13