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

wireframe_info.hh « infos « shaders « overlay « engines « draw « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 16b59f6bb7d5a622b6a33d846d44f4d53977e074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* SPDX-License-Identifier: GPL-2.0-or-later */

#include "gpu_shader_create_info.hh"

GPU_SHADER_INTERFACE_INFO(overlay_wireframe_iface, "")
    .flat(Type::VEC2, "edgeStart")
    .smooth(Type::VEC4, "finalColor")
    .no_perspective(Type::VEC2, "edgePos");

GPU_SHADER_CREATE_INFO(overlay_wireframe)
    .do_static_compilation(true)
    .push_constant(Type::FLOAT, "wireStepParam")
    .push_constant(Type::FLOAT, "wireOpacity")
    .push_constant(Type::BOOL, "useColoring")
    .push_constant(Type::BOOL, "isTransform")
    .push_constant(Type::BOOL, "isObjectColor")
    .push_constant(Type::BOOL, "isRandomColor")
    .push_constant(Type::BOOL, "isHair")
    .push_constant(Type::MAT4, "hairDupliMatrix")
    /* Scene Depth texture copy for manual depth test. */
    .sampler(0, ImageType::DEPTH_2D, "depthTex")
    .vertex_in(0, Type::VEC3, "pos")
    .vertex_in(1, Type::VEC3, "nor")
    .vertex_in(2, Type::FLOAT, "wd") /* wire-data. */
    .vertex_out(overlay_wireframe_iface)
    .vertex_source("wireframe_vert.glsl")
    .fragment_source("wireframe_frag.glsl")
    .fragment_out(0, Type::VEC4, "fragColor")
    .fragment_out(1, Type::VEC4, "lineOutput")
    .additional_info("draw_mesh", "draw_object_infos", "draw_globals");

GPU_SHADER_CREATE_INFO(overlay_wireframe_clipped)
    .do_static_compilation(true)
    .additional_info("overlay_wireframe", "drw_clipped");

GPU_SHADER_CREATE_INFO(overlay_wireframe_custom_depth)
    .do_static_compilation(true)
    .define("CUSTOM_DEPTH_BIAS")
    .additional_info("overlay_wireframe");

GPU_SHADER_CREATE_INFO(overlay_wireframe_custom_depth_clipped)
    .do_static_compilation(true)
    .additional_info("overlay_wireframe_custom_depth", "drw_clipped");

GPU_SHADER_CREATE_INFO(overlay_wireframe_select)
    .do_static_compilation(true)
    .define("SELECT_EDGES")
    .additional_info("overlay_wireframe");

GPU_SHADER_CREATE_INFO(overlay_wireframe_select_clipped)
    .do_static_compilation(true)
    .additional_info("overlay_wireframe_select", "drw_clipped");