GPU: Shader Create Info GLSL-C++ stubs #3

Closed
Clément Foucault wants to merge 90 commits from create-info-cpp-macros into glsl-include

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
39 changed files with 121 additions and 118 deletions
Showing only changes of commit 10dabf236a - Show all commits

View File

@ -192,7 +192,7 @@ GPU_SHADER_CREATE_INFO(eevee_depth_of_field_filter)
/** \name Scatter
* \{ */
GPU_SHADER_INTERFACE_INFO(eevee_depth_of_field_scatter_flat_iface, "interp_flat")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_depth_of_field_scatter_flat_iface, interp_flat)
/** Colors, weights, and Circle of confusion radii for the 4 pixels to scatter. */
.flat(Type::VEC4, "color_and_coc1")
.flat(Type::VEC4, "color_and_coc2")
@ -200,7 +200,8 @@ GPU_SHADER_INTERFACE_INFO(eevee_depth_of_field_scatter_flat_iface, "interp_flat"
.flat(Type::VEC4, "color_and_coc4")
/** Scaling factor for the bokeh distance. */
.flat(Type::FLOAT, "distance_scale");
GPU_SHADER_INTERFACE_INFO(eevee_depth_of_field_scatter_noperspective_iface, "interp_noperspective")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_depth_of_field_scatter_noperspective_iface,
interp_noperspective)
/** Sprite pixel position with origin at sprite center. In pixels. */
.no_perspective(Type::VEC2, "rect_uv1")
.no_perspective(Type::VEC2, "rect_uv2")

View File

@ -78,7 +78,7 @@ GPU_SHADER_CREATE_INFO(eevee_lightprobe_sphere_convolve)
.compute_source("eevee_lightprobe_sphere_convolve_comp.glsl")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(eevee_display_lightprobe_sphere_iface, "")
GPU_SHADER_INTERFACE_INFO(eevee_display_lightprobe_sphere_iface)
.smooth(Type::VEC3, "P")
.smooth(Type::VEC2, "lP")
.flat(Type::INT, "probe_index");
@ -92,7 +92,7 @@ GPU_SHADER_CREATE_INFO(eevee_display_lightprobe_sphere)
.fragment_out(0, Type::VEC4, "out_color")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(eevee_display_lightprobe_planar_iface, "")
GPU_SHADER_INTERFACE_INFO(eevee_display_lightprobe_planar_iface)
.flat(Type::VEC3, "probe_normal")
.flat(Type::INT, "probe_index");

View File

@ -9,7 +9,7 @@
/** \name Display
* \{ */
GPU_SHADER_INTERFACE_INFO(eevee_debug_surfel_iface, "")
GPU_SHADER_INTERFACE_INFO(eevee_debug_surfel_iface)
.smooth(Type::VEC3, "P")
.flat(Type::INT, "surfel_index");
@ -24,8 +24,7 @@ GPU_SHADER_CREATE_INFO(eevee_debug_surfels)
.push_constant(Type::INT, "debug_mode")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(eevee_debug_irradiance_grid_iface, "")
.smooth(Type::VEC4, "interp_color");
GPU_SHADER_INTERFACE_INFO(eevee_debug_irradiance_grid_iface).smooth(Type::VEC4, "interp_color");
GPU_SHADER_CREATE_INFO(eevee_debug_irradiance_grid)
.additional_info("eevee_shared", "draw_view")
@ -39,7 +38,7 @@ GPU_SHADER_CREATE_INFO(eevee_debug_irradiance_grid)
.fragment_source("eevee_debug_irradiance_grid_frag.glsl")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(eevee_display_lightprobe_volume_iface, "")
GPU_SHADER_INTERFACE_INFO(eevee_display_lightprobe_volume_iface)
.smooth(Type::VEC2, "lP")
.flat(Type::IVEC3, "cell");

View File

@ -5,7 +5,7 @@
#include "eevee_defines.hh"
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(eevee_lookdev_display_iface, "")
GPU_SHADER_INTERFACE_INFO(eevee_lookdev_display_iface)
.smooth(Type::VEC2, "uv_coord")
.flat(Type::UINT, "sphere_id");

View File

@ -26,7 +26,7 @@ GPU_SHADER_CREATE_INFO(eevee_utility_texture)
.define("EEVEE_UTILITY_TX")
.sampler(RBUFS_UTILITY_TEX_SLOT, ImageType::FLOAT_2D_ARRAY, "utility_tx");
GPU_SHADER_INTERFACE_INFO(eevee_clip_plane_iface, "clip_interp")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_clip_plane_iface, clip_interp)
.smooth(Type::FLOAT, "clip_distance");
GPU_SHADER_CREATE_INFO(eevee_clip_plane)
@ -41,7 +41,7 @@ GPU_SHADER_CREATE_INFO(eevee_clip_plane)
* \{ */
/* Common interface */
GPU_SHADER_INTERFACE_INFO(eevee_surf_iface, "interp")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_surf_iface, interp)
/* World Position. */
.smooth(Type::VEC3, "P")
/* World Normal. */
@ -59,10 +59,10 @@ GPU_SHADER_CREATE_INFO(eevee_geom_mesh)
"draw_resource_id_varying",
"draw_view");
GPU_SHADER_INTERFACE_INFO(eevee_surf_point_cloud_iface, "point_cloud_interp")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_surf_point_cloud_iface, point_cloud_interp)
.smooth(Type::FLOAT, "radius")
.smooth(Type::VEC3, "position");
GPU_SHADER_INTERFACE_INFO(eevee_surf_point_cloud_flat_iface, "point_cloud_interp_flat")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_surf_point_cloud_flat_iface, point_cloud_interp_flat)
.flat(Type::INT, "id");
GPU_SHADER_CREATE_INFO(eevee_geom_point_cloud)
@ -101,14 +101,14 @@ GPU_SHADER_CREATE_INFO(eevee_geom_gpencil)
"draw_resource_id_varying",
"draw_resource_id_new");
GPU_SHADER_INTERFACE_INFO(eevee_surf_curve_iface, "curve_interp")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_surf_curve_iface, curve_interp)
.smooth(Type::VEC2, "barycentric_coords")
.smooth(Type::VEC3, "tangent")
.smooth(Type::VEC3, "binormal")
.smooth(Type::FLOAT, "time")
.smooth(Type::FLOAT, "time_width")
.smooth(Type::FLOAT, "thickness");
GPU_SHADER_INTERFACE_INFO(eevee_surf_curve_flat_iface, "curve_interp_flat")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_surf_curve_flat_iface, curve_interp_flat)
.flat(Type::INT, "strand_id");
GPU_SHADER_CREATE_INFO(eevee_geom_curves)
@ -251,10 +251,10 @@ GPU_SHADER_CREATE_INFO(eevee_renderpass_clear)
"eevee_shared")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(eevee_surf_shadow_atomic_iface, "shadow_iface")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_surf_shadow_atomic_iface, shadow_iface)
.flat(Type::INT, "shadow_view_id");
GPU_SHADER_INTERFACE_INFO(eevee_surf_shadow_clipping_iface, "shadow_clip")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_surf_shadow_clipping_iface, shadow_clip)
.smooth(Type::VEC3, "position")
.smooth(Type::VEC3, "vector");

View File

@ -82,10 +82,10 @@ GPU_SHADER_CREATE_INFO(eevee_shadow_tag_usage_surfels)
"eevee_surfel_common")
.compute_source("eevee_shadow_tag_usage_surfels_comp.glsl");
GPU_SHADER_INTERFACE_INFO(eevee_shadow_tag_transparent_iface, "interp")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_shadow_tag_transparent_iface, interp)
.smooth(Type::VEC3, "P")
.smooth(Type::VEC3, "vP");
GPU_SHADER_INTERFACE_INFO(eevee_shadow_tag_transparent_flat_iface, "interp_flat")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_shadow_tag_transparent_flat_iface, interp_flat)
.flat(Type::VEC3, "ls_aabb_min")
.flat(Type::VEC3, "ls_aabb_max");
@ -244,9 +244,10 @@ GPU_SHADER_CREATE_INFO(eevee_shadow_page_tile_clear)
#endif
/* Interface for passing precalculated values in accumulation vertex to frag. */
GPU_SHADER_INTERFACE_INFO(eevee_shadow_page_tile_store_noperspective_iface, "interp_noperspective")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_shadow_page_tile_store_noperspective_iface,
interp_noperspective)
.no_perspective(Type::VEC2, "out_texel_xy");
GPU_SHADER_INTERFACE_INFO(eevee_shadow_page_tile_store_flat_iface, "interp_flat")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_shadow_page_tile_store_flat_iface, interp_flat)
.flat(PAGE_Z_TYPE, "out_page_z");
#undef PAGE_Z_TYPE

View File

@ -14,7 +14,7 @@
/* Pass world space deltas to the fragment shader.
* This is to make sure that the resulting motion vectors are valid even with displacement. */
GPU_SHADER_INTERFACE_INFO(eevee_velocity_surface_iface, "motion")
GPU_SHADER_NAMED_INTERFACE_INFO(eevee_velocity_surface_iface, motion)
.smooth(Type::VEC3, "prev")
.smooth(Type::VEC3, "next");

View File

@ -10,17 +10,17 @@
/** \name GPencil Object rendering
* \{ */
GPU_SHADER_INTERFACE_INFO(gpencil_geometry_iface, "gp_interp")
GPU_SHADER_NAMED_INTERFACE_INFO(gpencil_geometry_iface, gp_interp)
.smooth(Type::VEC4, "color_mul")
.smooth(Type::VEC4, "color_add")
.smooth(Type::VEC3, "pos")
.smooth(Type::VEC2, "uv");
GPU_SHADER_INTERFACE_INFO(gpencil_geometry_flat_iface, "gp_interp_flat")
GPU_SHADER_NAMED_INTERFACE_INFO(gpencil_geometry_flat_iface, gp_interp_flat)
.flat(Type::VEC2, "aspect")
.flat(Type::VEC4, "sspos")
.flat(Type::UINT, "mat_flag")
.flat(Type::FLOAT, "depth");
GPU_SHADER_INTERFACE_INFO(gpencil_geometry_noperspective_iface, "gp_interp_noperspective")
GPU_SHADER_NAMED_INTERFACE_INFO(gpencil_geometry_noperspective_iface, gp_interp_noperspective)
.no_perspective(Type::VEC2, "thickness")
.no_perspective(Type::FLOAT, "hardness");
@ -97,7 +97,7 @@ GPU_SHADER_CREATE_INFO(gpencil_depth_merge)
/** \name Anti-Aliasing
* \{ */
GPU_SHADER_INTERFACE_INFO(gpencil_antialiasing_iface, "")
GPU_SHADER_INTERFACE_INFO(gpencil_antialiasing_iface)
.smooth(Type::VEC2, "uvs")
.smooth(Type::VEC2, "pixcoord")
.smooth(Type::VEC4, "offset[3]");

View File

@ -4,7 +4,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(image_engine_color_iface, "").smooth(Type::VEC2, "uv_screen");
GPU_SHADER_INTERFACE_INFO(image_engine_color_iface).smooth(Type::VEC2, "uv_screen");
GPU_SHADER_CREATE_INFO(image_engine_color_shader)
.vertex_in(0, Type::IVEC2, "pos")
@ -22,7 +22,7 @@ GPU_SHADER_CREATE_INFO(image_engine_color_shader)
.additional_info("draw_modelmat")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(image_engine_depth_iface, "").smooth(Type::VEC2, "uv_image");
GPU_SHADER_INTERFACE_INFO(image_engine_depth_iface).smooth(Type::VEC2, "uv_image");
GPU_SHADER_CREATE_INFO(image_engine_depth_shader)
.vertex_in(0, Type::IVEC2, "pos")

View File

@ -8,7 +8,7 @@ GPU_SHADER_CREATE_INFO(overlay_frag_output)
.fragment_out(0, Type::VEC4, "fragColor")
.fragment_out(1, Type::VEC4, "lineOutput");
GPU_SHADER_INTERFACE_INFO(overlay_armature_wire_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_armature_wire_iface)
.flat(Type::VEC4, "finalColor")
.flat(Type::VEC2, "edgeStart")
.no_perspective(Type::VEC2, "edgePos");
@ -35,7 +35,7 @@ GPU_SHADER_CREATE_INFO(overlay_armature_sphere_outline_clipped)
.do_static_compilation(true)
.additional_info("overlay_armature_sphere_outline", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_armature_sphere_solid_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_armature_sphere_solid_iface)
.flat(Type::VEC3, "finalStateColor")
.flat(Type::VEC3, "finalBoneColor")
.flat(Type::MAT4, "sphereMatrix")
@ -64,15 +64,15 @@ GPU_SHADER_CREATE_INFO(overlay_armature_sphere_solid_clipped)
/** \name Armature Shapes
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_outline_iface, "geom_in")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_armature_shape_outline_iface, geom_in)
.smooth(Type::VEC4, "pPos")
.smooth(Type::VEC3, "vPos")
.smooth(Type::VEC2, "ssPos")
.smooth(Type::VEC4, "vColSize");
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_outline_flat_iface, "geom_flat_in")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_armature_shape_outline_flat_iface, geom_flat_in)
.flat(Type::INT, "inverted");
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_outline_no_geom_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_outline_no_geom_iface)
.flat(Type::VEC4, "finalColor")
.flat(Type::VEC2, "edgeStart")
.no_perspective(Type::VEC2, "edgePos");
@ -124,7 +124,7 @@ GPU_SHADER_CREATE_INFO(overlay_armature_shape_outline_clipped_no_geom)
.do_static_compilation(true)
.additional_info("overlay_armature_shape_outline_no_geom", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_solid_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_solid_iface)
.smooth(Type::VEC4, "finalColor")
.flat(Type::INT, "inverted");
@ -144,21 +144,21 @@ GPU_SHADER_CREATE_INFO(overlay_armature_shape_solid_clipped)
.do_static_compilation(true)
.additional_info("overlay_armature_shape_solid", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_wire_next_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_wire_next_iface)
.flat(Type::VEC4, "finalColor")
.flat(Type::FLOAT, "wire_width")
.no_perspective(Type::FLOAT, "edgeCoord");
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_wire_iface, "geometry_in")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_armature_shape_wire_iface, geometry_in)
.flat(Type::VEC4, "finalColor")
.flat(Type::FLOAT, "wire_width");
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_wire_geom_iface, "geometry_out")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_armature_shape_wire_geom_iface, geometry_out)
.flat(Type::VEC4, "finalColor")
.flat(Type::FLOAT, "wire_width");
GPU_SHADER_INTERFACE_INFO(overlay_armature_shape_wire_geom_noperspective_iface,
"geometry_noperspective_out")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_armature_shape_wire_geom_noperspective_iface,
geometry_noperspective_out)
.no_perspective(Type::FLOAT, "edgeCoord");
GPU_SHADER_CREATE_INFO(overlay_armature_shape_wire)
@ -238,7 +238,7 @@ GPU_SHADER_CREATE_INFO(overlay_armature_envelope_outline_clipped)
.do_static_compilation(true)
.additional_info("overlay_armature_envelope_outline", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_armature_envelope_solid_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_armature_envelope_solid_iface)
.flat(Type::VEC3, "finalStateColor")
.flat(Type::VEC3, "finalBoneColor")
.smooth(Type::VEC3, "normalView");
@ -269,7 +269,7 @@ GPU_SHADER_CREATE_INFO(overlay_armature_envelope_solid_clipped)
/** \name Armature Stick
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_armature_stick_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_armature_stick_iface)
.no_perspective(Type::FLOAT, "colorFac")
.flat(Type::VEC4, "finalWireColor")
.flat(Type::VEC4, "finalInnerColor");

View File

@ -4,9 +4,9 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(overlay_edit_flat_color_iface, "").flat(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_edit_smooth_color_iface, "").smooth(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_edit_nopersp_color_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_edit_flat_color_iface).flat(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_edit_smooth_color_iface).smooth(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_edit_nopersp_color_iface)
.no_perspective(Type::VEC4, "finalColor");
/* -------------------------------------------------------------------- */
@ -53,7 +53,7 @@ GPU_SHADER_CREATE_INFO(overlay_edit_mesh_depth_clipped)
.do_static_compilation(true)
.additional_info("overlay_edit_mesh_depth", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_vert_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_vert_iface)
.smooth(Type::VEC4, "finalColor")
.smooth(Type::FLOAT, "vertexCrease");
@ -84,17 +84,17 @@ GPU_SHADER_CREATE_INFO(overlay_edit_mesh_vert_next)
"draw_resource_handle_new",
"overlay_edit_mesh_common");
GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_edge_iface, "geometry_in")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_mesh_edge_iface, geometry_in)
.smooth(Type::VEC4, "finalColor_")
.smooth(Type::VEC4, "finalColorOuter_")
.smooth(Type::UINT, "selectOverride_");
GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_edge_geom_iface, "geometry_out")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_mesh_edge_geom_iface, geometry_out)
.smooth(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_edge_geom_flat_iface, "geometry_flat_out")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_mesh_edge_geom_flat_iface, geometry_flat_out)
.flat(Type::VEC4, "finalColorOuter");
GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_edge_geom_noperspective_iface,
"geometry_noperspective_out")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_mesh_edge_geom_noperspective_iface,
geometry_noperspective_out)
.no_perspective(Type::FLOAT, "edgeCoord");
GPU_SHADER_CREATE_INFO(overlay_edit_mesh_edge)
@ -239,7 +239,7 @@ GPU_SHADER_CREATE_INFO(overlay_edit_mesh_normal)
.fragment_source("overlay_varying_color.glsl")
.additional_info("draw_modelmat_instanced_attr", "draw_globals");
GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_analysis_iface, "").smooth(Type::VEC4, "weightColor");
GPU_SHADER_INTERFACE_INFO(overlay_edit_mesh_analysis_iface).smooth(Type::VEC4, "weightColor");
GPU_SHADER_CREATE_INFO(overlay_edit_mesh_analysis)
.do_static_compilation(true)
@ -315,17 +315,18 @@ GPU_SHADER_CREATE_INFO(overlay_edit_mesh_skin_root_clipped)
/** \name Edit UV
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_iface, "geom_in").smooth(Type::FLOAT, "selectionFac");
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_flat_iface, "geom_flat_in")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_uv_iface, geom_in)
.smooth(Type::FLOAT, "selectionFac");
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_uv_flat_iface, geom_flat_in)
.flat(Type::VEC2, "stippleStart");
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_noperspective_iface, "geom_noperspective_in")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_uv_noperspective_iface, geom_noperspective_in)
.no_perspective(Type::VEC2, "stipplePos");
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_geom_iface, "geom_out")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_uv_geom_iface, geom_out)
.smooth(Type::FLOAT, "selectionFac");
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_geom_flat_iface, "geom_flat_out")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_uv_geom_flat_iface, geom_flat_out)
.flat(Type::VEC2, "stippleStart");
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_geom_noperspective_iface, "geom_noperspective_out")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_uv_geom_noperspective_iface, geom_noperspective_out)
.no_perspective(Type::FLOAT, "edgeCoord")
.no_perspective(Type::VEC2, "stipplePos");
@ -369,7 +370,7 @@ GPU_SHADER_CREATE_INFO(overlay_edit_uv_edges_select)
.define("USE_EDGE_SELECT")
.additional_info("overlay_edit_uv_edges");
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_next_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_next_iface)
.smooth(Type::FLOAT, "selectionFac")
.flat(Type::VEC2, "stippleStart")
.no_perspective(Type::FLOAT, "edgeCoord")
@ -418,7 +419,7 @@ GPU_SHADER_CREATE_INFO(overlay_edit_uv_face_dots)
.fragment_source("overlay_varying_color.glsl")
.additional_info("draw_mesh", "draw_globals");
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_vert_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_edit_uv_vert_iface)
.smooth(Type::VEC4, "fillColor")
.smooth(Type::VEC4, "outlineColor")
.smooth(Type::VEC4, "radii");
@ -445,7 +446,7 @@ GPU_SHADER_CREATE_INFO(overlay_edit_uv_tiled_image_borders)
.fragment_source("overlay_uniform_color_frag.glsl")
.additional_info("draw_mesh");
GPU_SHADER_INTERFACE_INFO(edit_uv_image_iface, "").smooth(Type::VEC2, "uvs");
GPU_SHADER_INTERFACE_INFO(edit_uv_image_iface).smooth(Type::VEC2, "uvs");
GPU_SHADER_CREATE_INFO(overlay_edit_uv_stencil_image)
.do_static_compilation(true)
@ -507,7 +508,7 @@ GPU_SHADER_CREATE_INFO(overlay_edit_uv_stretching_angle)
/** \name Edit Curve
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_edit_curve_handle_iface, "vert").flat(Type::UINT, "flag");
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_edit_curve_handle_iface, vert).flat(Type::UINT, "flag");
GPU_SHADER_CREATE_INFO(overlay_edit_curve_handle)
.do_static_compilation(true)
@ -635,7 +636,7 @@ GPU_SHADER_CREATE_INFO(overlay_edit_curve_normals)
/** \name Edit Curves
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_edit_curves_handle_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_edit_curves_handle_iface)
.smooth(Type::VEC4, "finalColor")
.smooth(Type::VEC4, "leftColor");
@ -832,11 +833,11 @@ GPU_SHADER_CREATE_INFO(overlay_depth_mesh_conservative)
"gpu_index_load",
"draw_resource_handle_new");
GPU_SHADER_INTERFACE_INFO(overlay_depth_only_gpencil_flat_iface, "gp_interp_flat")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_depth_only_gpencil_flat_iface, gp_interp_flat)
.flat(Type::VEC2, "aspect")
.flat(Type::VEC4, "sspos");
GPU_SHADER_INTERFACE_INFO(overlay_depth_only_gpencil_noperspective_iface,
"gp_interp_noperspective")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_depth_only_gpencil_noperspective_iface,
gp_interp_noperspective)
.no_perspective(Type::VEC2, "thickness")
.no_perspective(Type::FLOAT, "hardness");

View File

@ -8,7 +8,7 @@
/** \name Extra shapes
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_extra_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_extra_iface)
.no_perspective(Type::VEC2, "edgePos")
.flat(Type::VEC2, "edgeStart")
.flat(Type::VEC4, "finalColor");
@ -47,7 +47,7 @@ GPU_SHADER_CREATE_INFO(overlay_extra_select_clipped)
/** \name Irradiance Grid
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_extra_grid_iface, "").flat(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_extra_grid_iface).flat(Type::VEC4, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_extra_grid)
.do_static_compilation(true)
@ -92,7 +92,7 @@ GPU_SHADER_CREATE_INFO(overlay_extra_groundline_clipped)
/** \name Extra wires
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_extra_wire_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_extra_wire_iface)
.no_perspective(Type::VEC2, "stipple_coord")
.flat(Type::VEC2, "stipple_start")
.flat(Type::VEC4, "finalColor");
@ -138,7 +138,7 @@ GPU_SHADER_CREATE_INFO(overlay_extra_wire_clipped)
/** \name Extra points
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_extra_point_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_extra_point_iface)
.flat(Type::VEC4, "radii")
.flat(Type::VEC4, "fillColor")
.flat(Type::VEC4, "outlineColor");
@ -159,7 +159,7 @@ GPU_SHADER_CREATE_INFO(overlay_extra_point_clipped)
.do_static_compilation(true)
.additional_info("overlay_extra_point", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_extra_loose_point_iface, "").smooth(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_extra_loose_point_iface).smooth(Type::VEC4, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_extra_loose_point)
.do_static_compilation(true)
@ -182,8 +182,9 @@ GPU_SHADER_CREATE_INFO(overlay_extra_loose_point_clipped)
/** \name Motion Path
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_motion_path_line_iface, "interp").smooth(Type::VEC4, "color");
GPU_SHADER_INTERFACE_INFO(overlay_motion_path_line_flat_iface, "interp_flat")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_motion_path_line_iface, interp)
.smooth(Type::VEC4, "color");
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_motion_path_line_flat_iface, interp_flat)
.flat(Type::VEC2, "ss_pos");
GPU_SHADER_CREATE_INFO(overlay_motion_path_line)
@ -245,7 +246,7 @@ GPU_SHADER_CREATE_INFO(overlay_motion_path_line_clipped_no_geom)
.do_static_compilation(true)
.additional_info("overlay_motion_path_line_no_geom", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_motion_path_point_iface, "").flat(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_motion_path_point_iface).flat(Type::VEC4, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_motion_path_point)
.do_static_compilation(true)
@ -273,7 +274,7 @@ GPU_SHADER_CREATE_INFO(overlay_motion_path_point_clipped)
/** \name Image Empty
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_image_iface, "").smooth(Type::VEC2, "uvs");
GPU_SHADER_INTERFACE_INFO(overlay_image_iface).smooth(Type::VEC2, "uvs");
GPU_SHADER_CREATE_INFO(overlay_image)
.do_static_compilation(true)
@ -324,7 +325,7 @@ GPU_SHADER_CREATE_INFO(overlay_gpencil_canvas_clipped)
/** \name Particle
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_particle_iface, "").flat(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_particle_iface).flat(Type::VEC4, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_particle)
.sampler(0, ImageType::FLOAT_1D, "weightTex")

View File

@ -5,7 +5,7 @@
#include "gpu_shader_create_info.hh"
/* We use the normalized local position to avoid precision loss during interpolation. */
GPU_SHADER_INTERFACE_INFO(overlay_grid_iface, "").smooth(Type::VEC3, "local_pos");
GPU_SHADER_INTERFACE_INFO(overlay_grid_iface).smooth(Type::VEC3, "local_pos");
GPU_SHADER_CREATE_INFO(overlay_grid)
.do_static_compilation(true)

View File

@ -8,7 +8,7 @@
/** \name Outline Pre-pass
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_outline_prepass_iface, "interp").flat(Type::UINT, "ob_id");
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_outline_prepass_iface, interp).flat(Type::UINT, "ob_id");
GPU_SHADER_CREATE_INFO(overlay_outline_prepass)
.push_constant(Type::BOOL, "isTransform")
@ -29,7 +29,7 @@ GPU_SHADER_CREATE_INFO(overlay_outline_prepass_mesh_clipped)
.do_static_compilation(true)
.additional_info("overlay_outline_prepass_mesh", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_outline_prepass_wire_iface, "vert").flat(Type::VEC3, "pos");
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_outline_prepass_wire_iface, vert).flat(Type::VEC3, "pos");
GPU_SHADER_CREATE_INFO(overlay_outline_prepass_curves)
.do_static_compilation(true)
@ -81,11 +81,11 @@ GPU_SHADER_CREATE_INFO(overlay_outline_prepass_wire_clipped)
.do_static_compilation(true)
.additional_info("overlay_outline_prepass_wire", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_outline_prepass_gpencil_flat_iface, "gp_interp_flat")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_outline_prepass_gpencil_flat_iface, gp_interp_flat)
.flat(Type::VEC2, "aspect")
.flat(Type::VEC4, "sspos");
GPU_SHADER_INTERFACE_INFO(overlay_outline_prepass_gpencil_noperspective_iface,
"gp_interp_noperspective")
GPU_SHADER_NAMED_INTERFACE_INFO(overlay_outline_prepass_gpencil_noperspective_iface,
gp_interp_noperspective)
.no_perspective(Type::VEC2, "thickness")
.no_perspective(Type::FLOAT, "hardness");

View File

@ -33,7 +33,7 @@ GPU_SHADER_CREATE_INFO(overlay_paint_face_clipped)
* Used for vertex selection mode in Weight and Vertex Paint.
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_overlay_paint_point_iface, "").smooth(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_overlay_paint_point_iface).smooth(Type::VEC4, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_paint_point)
.do_static_compilation(true)
@ -58,7 +58,7 @@ GPU_SHADER_CREATE_INFO(overlay_paint_point_clipped)
* Used in Texture Paint mode for the Stencil Image Masking.
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_paint_texture_iface, "").smooth(Type::VEC2, "uv_interp");
GPU_SHADER_INTERFACE_INFO(overlay_paint_texture_iface).smooth(Type::VEC2, "uv_interp");
GPU_SHADER_CREATE_INFO(overlay_paint_texture)
.do_static_compilation(true)
@ -88,7 +88,7 @@ GPU_SHADER_CREATE_INFO(overlay_paint_texture_clipped)
* It should be used to draw a Vertex Paint overlay. But it is currently unreachable.
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_paint_vertcol_iface, "").smooth(Type::VEC3, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_paint_vertcol_iface).smooth(Type::VEC3, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_paint_vertcol)
.do_static_compilation(true)
@ -116,7 +116,7 @@ GPU_SHADER_CREATE_INFO(overlay_paint_vertcol_clipped)
* `overlay paint weight` is for wireframe display mode.
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_paint_weight_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_paint_weight_iface)
.smooth(Type::VEC2, "weight_interp") /* (weight, alert) */
.smooth(Type::FLOAT, "color_fac");
@ -159,7 +159,7 @@ GPU_SHADER_CREATE_INFO(overlay_paint_weight_fake_shading_clipped)
* paint modes.
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_paint_wire_iface, "").flat(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_paint_wire_iface).flat(Type::VEC4, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_paint_wire)
.do_static_compilation(true)

View File

@ -4,7 +4,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(overlay_sculpt_curves_selection_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_sculpt_curves_selection_iface)
.smooth(Type::FLOAT, "mask_weight");
GPU_SHADER_CREATE_INFO(overlay_sculpt_curves_selection)
@ -22,7 +22,7 @@ GPU_SHADER_CREATE_INFO(overlay_sculpt_curves_selection_clipped)
.do_static_compilation(true)
.additional_info("overlay_sculpt_curves_selection", "drw_clipped");
GPU_SHADER_INTERFACE_INFO(overlay_sculpt_curves_cage_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_sculpt_curves_cage_iface)
.no_perspective(Type::VEC2, "edgePos")
.flat(Type::VEC2, "edgeStart")
.smooth(Type::VEC4, "finalColor");

View File

@ -4,7 +4,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(overlay_sculpt_mask_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_sculpt_mask_iface)
.flat(Type::VEC3, "faceset_color")
.smooth(Type::FLOAT, "mask_color")
.smooth(Type::VEC4, "finalColor");

View File

@ -4,7 +4,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(overlay_viewer_attribute_iface, "").smooth(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_viewer_attribute_iface).smooth(Type::VEC4, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_viewer_attribute_common).push_constant(Type::FLOAT, "opacity");

View File

@ -8,7 +8,7 @@
/** \name Volume Velocity
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_volume_velocity_iface, "").smooth(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_volume_velocity_iface).smooth(Type::VEC4, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_volume_velocity)
.sampler(0, ImageType::FLOAT_3D, "velocityX")
@ -54,7 +54,7 @@ GPU_SHADER_CREATE_INFO(overlay_volume_velocity_needle)
/** \name Volume Grid-Lines
* \{ */
GPU_SHADER_INTERFACE_INFO(overlay_volume_gridlines_iface, "").flat(Type::VEC4, "finalColor");
GPU_SHADER_INTERFACE_INFO(overlay_volume_gridlines_iface).flat(Type::VEC4, "finalColor");
GPU_SHADER_CREATE_INFO(overlay_volume_gridlines)
.push_constant(Type::FLOAT, "slicePosition")

View File

@ -4,7 +4,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(overlay_wireframe_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_wireframe_iface)
.smooth(Type::VEC4, "finalColor")
.flat(Type::VEC2, "edgeStart")
.no_perspective(Type::VEC2, "edgePos");
@ -50,7 +50,7 @@ GPU_SHADER_CREATE_INFO(overlay_wireframe_curve)
"draw_object_infos_new",
"draw_globals");
GPU_SHADER_INTERFACE_INFO(overlay_wireframe_points_iface, "")
GPU_SHADER_INTERFACE_INFO(overlay_wireframe_points_iface)
.flat(Type::VEC4, "finalColor")
.flat(Type::VEC4, "finalColorInner");

View File

@ -9,7 +9,7 @@
/** \name Select ID for Edit Mesh Selection
* \{ */
GPU_SHADER_INTERFACE_INFO(select_id_iface, "").flat(Type::INT, "select_id");
GPU_SHADER_INTERFACE_INFO(select_id_iface).flat(Type::INT, "select_id");
GPU_SHADER_CREATE_INFO(select_id_flat)
.push_constant(Type::FLOAT, "sizeVertex")

View File

@ -22,7 +22,7 @@ GPU_SHADER_CREATE_INFO(workbench_taa)
/** \name SMAA
* \{ */
GPU_SHADER_INTERFACE_INFO(workbench_smaa_iface, "")
GPU_SHADER_INTERFACE_INFO(workbench_smaa_iface)
.smooth(Type::VEC2, "uvs")
.smooth(Type::VEC2, "pixcoord")
.smooth(Type::VEC4, "offset[3]");

View File

@ -50,7 +50,7 @@ GPU_SHADER_CREATE_INFO(workbench_lighting_matcap)
/** \name Material Interface
* \{ */
GPU_SHADER_INTERFACE_INFO(workbench_material_iface, "")
GPU_SHADER_INTERFACE_INFO(workbench_material_iface)
.smooth(Type::VEC3, "normal_interp")
.smooth(Type::VEC3, "color_interp")
.smooth(Type::FLOAT, "alpha_interp")

View File

@ -85,7 +85,7 @@ GPU_SHADER_CREATE_INFO(workbench_volume_closest).define("USE_CLOSEST");
/** \name Slice variation
* \{ */
GPU_SHADER_INTERFACE_INFO(workbench_volume_iface, "").smooth(Type::VEC3, "localPos");
GPU_SHADER_INTERFACE_INFO(workbench_volume_iface).smooth(Type::VEC3, "localPos");
GPU_SHADER_CREATE_INFO(workbench_volume_slice)
.define("VOLUME_SLICE")

View File

@ -16,7 +16,7 @@ GPU_SHADER_CREATE_INFO(draw_debug_print)
.typedef_source("draw_shader_shared.hh")
.storage_buf(DRW_DEBUG_PRINT_SLOT, Qualifier::READ_WRITE, "uint", "drw_debug_print_buf[]");
GPU_SHADER_INTERFACE_INFO(draw_debug_print_display_iface, "").flat(Type::UINT, "char_index");
GPU_SHADER_INTERFACE_INFO(draw_debug_print_display_iface).flat(Type::UINT, "char_index");
GPU_SHADER_CREATE_INFO(draw_debug_print_display)
.do_static_compilation(true)
@ -44,7 +44,7 @@ GPU_SHADER_CREATE_INFO(draw_debug_draw)
"DRWDebugVert",
"drw_debug_verts_buf[]");
GPU_SHADER_INTERFACE_INFO(draw_debug_draw_display_iface, "interp").flat(Type::VEC4, "color");
GPU_SHADER_NAMED_INTERFACE_INFO(draw_debug_draw_display_iface, interp).flat(Type::VEC4, "color");
GPU_SHADER_CREATE_INFO(draw_debug_draw_display)
.do_static_compilation(true)

View File

@ -4,7 +4,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(fullscreen_iface, "").smooth(Type::VEC4, "uvcoordsvar");
GPU_SHADER_INTERFACE_INFO(fullscreen_iface).smooth(Type::VEC4, "uvcoordsvar");
GPU_SHADER_CREATE_INFO(draw_fullscreen)
.vertex_out(fullscreen_iface)

View File

@ -20,7 +20,7 @@ GPU_SHADER_CREATE_INFO(draw_resource_id).define("DYNAMIC_RESOURCE_ID");
* 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().
*/
GPU_SHADER_INTERFACE_INFO(draw_resource_id_iface, "drw_ResourceID_iface")
GPU_SHADER_NAMED_INTERFACE_INFO(draw_resource_id_iface, drw_ResourceID_iface)
.flat(Type::INT, "resource_index");
GPU_SHADER_CREATE_INFO(draw_resource_id_varying)

View File

@ -8,7 +8,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(depth_2d_update_iface, "").smooth(Type::VEC2, "texCoord_interp");
GPU_SHADER_INTERFACE_INFO(depth_2d_update_iface).smooth(Type::VEC2, "texCoord_interp");
GPU_SHADER_CREATE_INFO(depth_2d_update_info_base)
.vertex_in(0, Type::VEC2, "pos")

View File

@ -8,7 +8,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(fullscreen_blit_iface, "").smooth(Type::VEC4, "uvcoordsvar");
GPU_SHADER_INTERFACE_INFO(fullscreen_blit_iface).smooth(Type::VEC4, "uvcoordsvar");
GPU_SHADER_CREATE_INFO(fullscreen_blit)
.vertex_in(0, Type::VEC2, "pos")

View File

@ -8,7 +8,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(smooth_uv_iface, "").smooth(Type::VEC2, "uv");
GPU_SHADER_INTERFACE_INFO(smooth_uv_iface).smooth(Type::VEC2, "uv");
GPU_SHADER_CREATE_INFO(gpu_shader_2D_area_borders)
.vertex_in(0, Type::VEC2, "pos")

View File

@ -8,7 +8,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(nodelink_iface, "")
GPU_SHADER_INTERFACE_INFO(nodelink_iface)
.smooth(Type::VEC4, "finalColor")
.smooth(Type::VEC2, "lineUV")
.flat(Type::FLOAT, "lineLength")

View File

@ -9,7 +9,7 @@
#include "gpu_interface_info.hh"
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(gpu_widget_iface, "")
GPU_SHADER_INTERFACE_INFO(gpu_widget_iface)
.flat(Type::FLOAT, "discardFac")
.flat(Type::FLOAT, "lineWidth")
.flat(Type::VEC2, "outRectSize")
@ -49,7 +49,7 @@ GPU_SHADER_CREATE_INFO(gpu_shader_2D_widget_base_inst)
.push_constant(Type::VEC4, "parameters", (MAX_PARAM * MAX_INSTANCE))
.additional_info("gpu_shader_2D_widget_shared");
GPU_SHADER_INTERFACE_INFO(gpu_widget_shadow_iface, "")
GPU_SHADER_INTERFACE_INFO(gpu_widget_shadow_iface)
.smooth(Type::FLOAT, "shadowFalloff")
.smooth(Type::FLOAT, "innerMask");

View File

@ -9,11 +9,11 @@
#include "gpu_interface_info.hh"
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(gpu_shader_3D_polyline_iface, "interp")
GPU_SHADER_NAMED_INTERFACE_INFO(gpu_shader_3D_polyline_iface, interp)
.smooth(Type::VEC4, "final_color")
.smooth(Type::FLOAT, "clip");
GPU_SHADER_INTERFACE_INFO(gpu_shader_3D_polyline_noperspective_iface, "interp_noperspective")
GPU_SHADER_NAMED_INTERFACE_INFO(gpu_shader_3D_polyline_noperspective_iface, interp_noperspective)
.no_perspective(Type::FLOAT, "smoothline");
GPU_SHADER_CREATE_INFO(gpu_shader_3D_polyline)

View File

@ -8,10 +8,10 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(gpencil_stroke_vert_iface, "geometry_in")
GPU_SHADER_NAMED_INTERFACE_INFO(gpencil_stroke_vert_iface, geometry_in)
.smooth(Type::VEC4, "finalColor")
.smooth(Type::FLOAT, "finalThickness");
GPU_SHADER_INTERFACE_INFO(gpencil_stroke_geom_iface, "geometry_out")
GPU_SHADER_NAMED_INTERFACE_INFO(gpencil_stroke_geom_iface, geometry_out)
.smooth(Type::VEC4, "mColor")
.smooth(Type::VEC2, "mTexCoord");

View File

@ -8,7 +8,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(keyframe_shape_iface, "")
GPU_SHADER_INTERFACE_INFO(keyframe_shape_iface)
.flat(Type::VEC4, "finalColor")
.flat(Type::VEC4, "finalOutlineColor")
.flat(Type::VEC4, "radii")

View File

@ -10,7 +10,7 @@
#include "gpu_shader_create_info.hh"
/* We leverage hardware interpolation to compute distance along the line. */
GPU_SHADER_INTERFACE_INFO(gpu_shader_line_dashed_interface, "")
GPU_SHADER_INTERFACE_INFO(gpu_shader_line_dashed_interface)
.no_perspective(Type::VEC2, "stipple_start") /* In screen space */
.flat(Type::VEC2, "stipple_pos"); /* In screen space */

View File

@ -9,7 +9,7 @@
#include "gpu_interface_info.hh"
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(gpu_seq_strip_iface, "")
GPU_SHADER_INTERFACE_INFO(gpu_seq_strip_iface)
.no_perspective(Type::VEC2, "co_interp")
.flat(Type::UINT, "strip_id");
@ -24,7 +24,7 @@ GPU_SHADER_CREATE_INFO(gpu_shader_sequencer_strips)
.fragment_source("gpu_shader_sequencer_strips_frag.glsl")
.do_static_compilation(true);
GPU_SHADER_INTERFACE_INFO(gpu_seq_thumb_iface, "")
GPU_SHADER_INTERFACE_INFO(gpu_seq_thumb_iface)
.no_perspective(Type::VEC2, "pos_interp")
.no_perspective(Type::VEC2, "texCoord_interp")
.flat(Type::UINT, "thumb_id");

View File

@ -8,7 +8,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(smooth_normal_iface, "").smooth(Type::VEC3, "normal");
GPU_SHADER_INTERFACE_INFO(smooth_normal_iface).smooth(Type::VEC3, "normal");
GPU_SHADER_CREATE_INFO(gpu_shader_simple_lighting)
.vertex_in(0, Type::VEC3, "pos")

View File

@ -8,7 +8,7 @@
#include "gpu_shader_create_info.hh"
GPU_SHADER_INTERFACE_INFO(text_iface, "")
GPU_SHADER_INTERFACE_INFO(text_iface)
.flat(Type::VEC4, "color_flat")
.no_perspective(Type::VEC2, "texCoord_interp")
.flat(Type::INT, "glyph_offset")