Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cryptomatte_lib.glsl « shaders « eevee « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0f8810ff7ac2a5894159346b20f35ee343b71006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* NOTE: this lib is included in the cryptomatte vertex shader to work around the issue that eevee
 * cannot use create infos for its static shaders. Keep in sync with draw_shader_shared.h */
#ifdef HAIR_SHADER
/* Define the maximum number of attribute we allow in a curves UBO.
 * This should be kept in sync with `GPU_ATTR_MAX` */
#  define DRW_ATTRIBUTE_PER_CURVES_MAX 15

struct CurvesInfos {
  /* Per attribute scope, follows loading order.
   * NOTE: uint as bool in GLSL is 4 bytes.
   * NOTE: GLSL pad arrays of scalar to 16 bytes (std140). */
  uvec4 is_point_attribute[DRW_ATTRIBUTE_PER_CURVES_MAX];
};
layout(std140) uniform drw_curves
{
  CurvesInfos _drw_curves;
};
#  define drw_curves (_drw_curves)
#endif