21 .flat(Type::INT,
"resource_index");
24 .vertex_out(draw_resource_id_iface)
25 .geometry_out(draw_resource_id_iface);
29 .define(
"UNIFORM_RESOURCE_ID")
30 .push_constant(Type::INT,
"drw_ResourceID");
37 .define(
"resource_handle (drw_resourceChunk * DRW_RESOURCE_CHUNK_LEN + resource_id)")
38 .push_constant(Type::INT,
"drw_resourceChunk");
47 .uniform_buf(0,
"ViewInfos",
"drw_view", Frequency::PASS)
48 .typedef_source(
"draw_shader_shared.h");
51 .uniform_buf(8,
"ObjectMatrices",
"drw_matrices[DRW_RESOURCE_CHUNK_LEN]", Frequency::BATCH)
52 .define(
"ModelMatrix",
"(drw_matrices[resource_id].drw_modelMatrix)")
53 .define(
"ModelMatrixInverse",
"(drw_matrices[resource_id].drw_modelMatrixInverse)")
54 .additional_info(
"draw_view");
57 .define(
"DRW_LEGACY_MODEL_MATRIX")
58 .push_constant(Type::MAT4,
"ModelMatrix")
59 .push_constant(Type::MAT4,
"ModelMatrixInverse")
60 .additional_info(
"draw_view");
63 .push_constant(Type::MAT4,
"ModelMatrix")
64 .push_constant(Type::MAT4,
"ModelMatrixInverse")
65 .additional_info(
"draw_view");
82 .typedef_source(
"draw_common_shader_shared.h")
83 .uniform_buf(7,
"GlobalsUboStorage",
"globalsBlock", Frequency::PASS);
94 .sampler(15, ImageType::FLOAT_BUFFER,
"hairPointBuffer")
96 .push_constant(Type::INT,
"hairStrandsRes")
97 .push_constant(Type::INT,
"hairThicknessRes")
101 .push_constant(Type::BOOL,
"hairCloseTip")
102 .push_constant(Type::INT,
"hairStrandOffset")
103 .push_constant(Type::MAT4,
"hairDupliMatrix")
104 .additional_info(
"draw_modelmat",
"draw_resource_id");
107 .vertex_in(0, Type::VEC4,
"pos")
108 .vertex_in(1, Type::VEC3,
"pos_inst")
109 .vertex_in(2, Type::VEC3,
"nor")
110 .additional_info(
"draw_modelmat_instanced_attr",
"draw_resource_id_uniform");
115 .typedef_source(
"gpencil_shader_shared.h")
116 .define(
"DRW_GPENCIL_INFO")
117 .vertex_in(0, Type::IVEC4,
"ma")
118 .vertex_in(1, Type::IVEC4,
"ma1")
119 .vertex_in(2, Type::IVEC4,
"ma2")
120 .vertex_in(3, Type::IVEC4,
"ma3")
121 .vertex_in(4, Type::VEC4,
"pos")
122 .vertex_in(5, Type::VEC4,
"pos1")
123 .vertex_in(6, Type::VEC4,
"pos2")
124 .vertex_in(7, Type::VEC4,
"pos3")
125 .vertex_in(8, Type::VEC4,
"uv1")
126 .vertex_in(9, Type::VEC4,
"uv2")
127 .vertex_in(10, Type::VEC4,
"col1")
128 .vertex_in(11, Type::VEC4,
"col2")
129 .vertex_in(12, Type::VEC4,
"fcol1")
132 .push_constant(
Type::FLOAT,
"gpThicknessWorldScale")
133 .define(
"gpThicknessIsScreenSpace",
"(gpThicknessWorldScale < 0.0)")
136 .additional_info(
"draw_modelmat",
"draw_resource_id_uniform",
"draw_object_infos");
GPU_SHADER_CREATE_INFO(draw_resource_id).define("DYNAMIC_RESOURCE_ID")
sampler(15, ImageType::FLOAT_BUFFER, "hairPointBuffer") .push_constant(Type pos_inst draw_resource_id_uniform
pos draw_resource_id_varying
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
depthTex lineTex fragColor draw_globals