A number of paths resulted in compilation errors after porting EEVEE to use Create-Info. Namely the fallback path for cubemap support. A number of other strict compilation failures regarding format comparison also required fixing when this mode is enabled. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261, T103313 Differential Revision: https://developer.blender.org/D16819
35 lines
816 B
GLSL
35 lines
816 B
GLSL
|
|
/* Cubemap support and fallback implementation declarations. */
|
|
#ifdef GPU_ARB_texture_cube_map_array
|
|
# define textureLod_cubemapArray(tex, co, lod) textureLod(tex, co, lod)
|
|
#else
|
|
# define samplerCubeArray sampler2DArray
|
|
#endif
|
|
|
|
/* Texture format tokens -- Type explicitness required by other Graphics APIs. */
|
|
#define depth2D sampler2D
|
|
#define depth2DArray sampler2DArray
|
|
#define depth2DMS sampler2DMS
|
|
#define depth2DMSArray sampler2DMSArray
|
|
#define depthCube samplerCube
|
|
#define depthCubeArray samplerCubeArray
|
|
#define depth2DArrayShadow sampler2DArrayShadow
|
|
|
|
/* Backend Functions. */
|
|
#define select(A, B, mask) mix(A, B, mask)
|
|
|
|
bool is_zero(vec2 A)
|
|
{
|
|
return all(equal(A, vec2(0.0)));
|
|
}
|
|
|
|
bool is_zero(vec3 A)
|
|
{
|
|
return all(equal(A, vec3(0.0)));
|
|
}
|
|
|
|
bool is_zero(vec4 A)
|
|
{
|
|
return all(equal(A, vec4(0.0)));
|
|
}
|