xash3d-fwgs/ref/vk/shaders/peters2021-sampling/math_constants.glsl

29 lines
1.0 KiB
GLSL

// Copyright (C) 2021, Christoph Peters, Karlsruhe Institute of Technology
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#ifndef M_PI
#define M_PI 3.1415926535897932384626433832795f
#endif
#ifndef M_INV_PI
#define M_INV_PI 0.31830988618379067153776752674503f
#endif
#ifndef M_HALF_PI
#define M_HALF_PI 1.5707963267948966192313216916398f
#endif
#ifndef M_INFINITY
#define M_INFINITY (1.0f / 0.0f)
#endif