mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Cleanup.
This commit is contained in:
parent
c3afa94320
commit
d479af651c
1 changed files with 10 additions and 11 deletions
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __BGFX_SHADER_H__
|
#ifndef BGFX_SHADER_H_HEADER_GUARD
|
||||||
#define __BGFX_SHADER_H__
|
#define BGFX_SHADER_H_HEADER_GUARD
|
||||||
|
|
||||||
#if !defined(BGFX_CONFIG_MAX_BONES)
|
#if !defined(BGFX_CONFIG_MAX_BONES)
|
||||||
# define BGFX_CONFIG_MAX_BONES 32
|
# define BGFX_CONFIG_MAX_BONES 32
|
||||||
|
@ -17,6 +17,13 @@
|
||||||
# define dFdy(_y) ddy(-_y)
|
# define dFdy(_y) ddy(-_y)
|
||||||
# define inversesqrt(_x) rsqrt(_x)
|
# define inversesqrt(_x) rsqrt(_x)
|
||||||
# define fract(_x) frac(_x)
|
# define fract(_x) frac(_x)
|
||||||
|
# define vec2_splat(_x) float2(_x, _x)
|
||||||
|
# define vec3_splat(_x) float3(_x, _x, _x)
|
||||||
|
# define vec4_splat(_x) float4(_x, _x, _x, _x)
|
||||||
|
|
||||||
|
# define bvec2 bool2
|
||||||
|
# define bvec3 bool3
|
||||||
|
# define bvec4 bool4
|
||||||
|
|
||||||
# if BGFX_SHADER_LANGUAGE_HLSL > 3
|
# if BGFX_SHADER_LANGUAGE_HLSL > 3
|
||||||
struct BgfxSampler2D
|
struct BgfxSampler2D
|
||||||
|
@ -181,14 +188,6 @@ float bgfxShadow2DProj(sampler2DShadow _sampler, vec4 _coord)
|
||||||
# define textureCubeLod(_sampler, _coord, _level) texCUBElod(_sampler, vec4( (_coord).xyz, _level) )
|
# define textureCubeLod(_sampler, _coord, _level) texCUBElod(_sampler, vec4( (_coord).xyz, _level) )
|
||||||
# endif //
|
# endif //
|
||||||
|
|
||||||
# define vec2_splat(_x) float2(_x, _x)
|
|
||||||
# define vec3_splat(_x) float3(_x, _x, _x)
|
|
||||||
# define vec4_splat(_x) float4(_x, _x, _x, _x)
|
|
||||||
|
|
||||||
# define bvec2 bool2
|
|
||||||
# define bvec3 bool3
|
|
||||||
# define bvec4 bool4
|
|
||||||
|
|
||||||
vec3 instMul(vec3 _vec, mat3 _mtx) { return mul(_mtx, _vec); }
|
vec3 instMul(vec3 _vec, mat3 _mtx) { return mul(_mtx, _vec); }
|
||||||
vec3 instMul(mat3 _mtx, vec3 _vec) { return mul(_vec, _mtx); }
|
vec3 instMul(mat3 _mtx, vec3 _vec) { return mul(_vec, _mtx); }
|
||||||
vec4 instMul(vec4 _vec, mat4 _mtx) { return mul(_mtx, _vec); }
|
vec4 instMul(vec4 _vec, mat4 _mtx) { return mul(_mtx, _vec); }
|
||||||
|
@ -264,4 +263,4 @@ uniform float u_alphaRef;
|
||||||
|
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
|
||||||
#endif // __BGFX_SHADER_H__
|
#endif // BGFX_SHADER_H_HEADER_GUARD
|
||||||
|
|
Loading…
Reference in a new issue