|
Blender
V3.3
|
#include "gpu_shader_create_info.hh"Go to the source code of this file.
Functions | |
Resource ID | |
This is used to fetch per object data in drw_matrices and other object indexed buffers. There is multiple possibilities depending on how we are drawing the object. | |
| GPU_SHADER_CREATE_INFO (draw_resource_id).define("DYNAMIC_RESOURCE_ID") | |
| flat (Type::INT, "resource_index") | |
| vertex_out (draw_resource_id_iface) .geometry_out(draw_resource_id_iface) | |
Draw View | |
| uniform_buf (0, "ViewInfos", "drw_view", Frequency::PASS) .typedef_source("draw_shader_shared.h") | |
| uniform_buf (8, "ObjectMatrices", "drw_matrices[DRW_RESOURCE_CHUNK_LEN]", Frequency::BATCH) .define("ModelMatrix" | |
| drw_matrices[resource_id] drw_modelMatrix | define ("ModelMatrixInverse", "(drw_matrices[resource_id].drw_modelMatrixInverse)") .additional_info("draw_view") |
| GPU_SHADER_CREATE_INFO (drw_clipped).define("USE_WORLD_CLIP_PLANES") | |
Draw Globals | |
| GlobalsUboStorage | |
| globalsBlock | |
| typedef_source ("draw_common_shader_shared.h") .uniform_buf(7 | |
Geometry Type | |
| draw_resource_id | |
| sampler(15, ImageType::FLOAT_BUFFER, "hairPointBuffer") .push_constant(Type pos_inst | draw_resource_id_uniform |
| GPU_SHADER_CREATE_INFO (draw_mesh).additional_info("draw_modelmat" | |
| sampler(15, ImageType::FLOAT_BUFFER, "hairPointBuffer") .push_constant(Type | vertex_in (0, Type::VEC4, "pos") .vertex_in(1 |
| sampler(15, ImageType::FLOAT_BUFFER, "hairPointBuffer") .push_constant(Type pos_inst | vertex_in (2, Type::VEC3, "nor") .additional_info("draw_modelmat_instanced_attr" |
| GPU_SHADER_CREATE_INFO (draw_volume).additional_info("draw_modelmat" | |
| typedef_source ("gpencil_shader_shared.h") .define("DRW_GPENCIL_INFO") .vertex_in(0 | |
| ma | vertex_in (1, Type::IVEC4, "ma1") .vertex_in(2 |
| ma ma2 | vertex_in (3, Type::IVEC4, "ma3") .vertex_in(4 |
| ma ma2 pos | vertex_in (5, Type::VEC4, "pos1") .vertex_in(6 |
| ma ma2 pos pos2 | vertex_in (7, Type::VEC4, "pos3") .vertex_in(8 |
| ma ma2 pos pos2 uv1 | vertex_in (9, Type::VEC4, "uv2") .vertex_in(10 |
| ma ma2 pos pos2 uv1 col1 | vertex_in (11, Type::VEC4, "col2") .vertex_in(12 |
| drw_matrices [resource_id] drw_modelMatrix define | ( | "ModelMatrixInverse" | , |
| "(drw_matrices[resource_id].drw_modelMatrixInverse)" | |||
| ) |
| flat | ( | Type::INT | , |
| "resource_index" | |||
| ) |
Used if the resource index needs to be passed to the fragment shader. IMPORTANT: Vertex and Geometry shaders need to use PASS_RESOURCE_ID in main().
Referenced by do_kink(), and offset_child().
| GPU_SHADER_CREATE_INFO | ( | draw_mesh | ) |
| GPU_SHADER_CREATE_INFO | ( | draw_resource_id | ) |
| GPU_SHADER_CREATE_INFO | ( | draw_volume | ) |
| GPU_SHADER_CREATE_INFO | ( | drw_clipped | ) |
| typedef_source | ( | "draw_common_shader_shared.h" | ) |
| typedef_source | ( | "gpencil_shader_shared.h" | ) |
| uniform_buf | ( | 0 | , |
| "ViewInfos" | , | ||
| "drw_view" | , | ||
| Frequency::PASS | |||
| ) |
| uniform_buf | ( | 8 | , |
| "ObjectMatrices" | , | ||
| "drw_matrices" | [DRW_RESOURCE_CHUNK_LEN], | ||
| Frequency::BATCH | |||
| ) |
| sampler (15, ImageType::FLOAT_BUFFER, "hairPointBuffer") .push_constant(Type vertex_in | ( | 0 | , |
| Type::VEC4 | , | ||
| "pos" | |||
| ) |
| ma vertex_in | ( | 1 | , |
| Type::IVEC4 | , | ||
| "ma1" | |||
| ) |
| ma ma2 pos pos2 uv1 col1 vertex_in | ( | 11 | , |
| Type::VEC4 | , | ||
| "col2" | |||
| ) |
| sampler (15, ImageType::FLOAT_BUFFER, "hairPointBuffer") .push_constant(Type pos_inst vertex_in | ( | 2 | , |
| Type::VEC3 | , | ||
| "nor" | |||
| ) |
| ma ma2 vertex_in | ( | 3 | , |
| Type::IVEC4 | , | ||
| "ma3" | |||
| ) |
| ma ma2 pos vertex_in | ( | 5 | , |
| Type::VEC4 | , | ||
| "pos1" | |||
| ) |
| ma ma2 pos pos2 vertex_in | ( | 7 | , |
| Type::VEC4 | , | ||
| "pos3" | |||
| ) |
| ma ma2 pos pos2 uv1 vertex_in | ( | 9 | , |
| Type::VEC4 | , | ||
| "uv2" | |||
| ) |
| vertex_out | ( | draw_resource_id_iface | ) |
| draw_resource_id |
Definition at line 91 of file draw_view_info.hh.
| draw_resource_id_uniform |
Definition at line 110 of file draw_view_info.hh.
| globalsBlock |
Definition at line 83 of file draw_view_info.hh.
Definition at line 83 of file draw_view_info.hh.