forked from blender/blender
GPU: Shader Create Info GLSL-C++ stubs #3
@ -8,7 +8,14 @@
|
||||
* language.
|
||||
*/
|
||||
|
||||
#ifndef USE_GPU_SHADER_CREATE_INFO
|
||||
/* __cplusplus is true when compiling with MSL, so ensure we are not inside a shader. */
|
||||
#if defined(GPU_SHADER) || defined(GLSL_CPP_STUBS)
|
||||
# define IS_CPP 0
|
||||
#else
|
||||
# define IS_CPP 1
|
||||
#endif
|
||||
|
||||
#if IS_CPP
|
||||
# pragma once
|
||||
|
||||
# include "BLI_math_bits.h"
|
||||
@ -34,13 +41,6 @@ constexpr GPUSamplerState no_filter = GPUSamplerState::default_sampler();
|
||||
constexpr GPUSamplerState with_filter = {GPU_SAMPLER_FILTERING_LINEAR};
|
||||
#endif
|
||||
|
||||
/* __cplusplus is true when compiling with MSL, so ensure we are not inside a shader. */
|
||||
#ifdef GPU_SHADER
|
||||
# define IS_CPP 0
|
||||
#else
|
||||
# define IS_CPP 1
|
||||
#endif
|
||||
|
||||
/** WORKAROUND(@fclem): This is because this file is included before common_math_lib.glsl. */
|
||||
#ifndef M_PI
|
||||
# define EEVEE_PI
|
||||
|
Loading…
Reference in New Issue
Block a user