10 .smooth(Type::VEC3,
"pos")
11 .smooth(Type::VEC4,
"frontPosition")
12 .smooth(Type::VEC4,
"backPosition");
15 .vertex_in(0, Type::VEC3,
"pos")
16 .vertex_out(workbench_shadow_iface)
18 .push_constant(Type::VEC3,
"lightDirection")
19 .vertex_source(
"workbench_shadow_vert.glsl")
20 .additional_info(
"draw_mesh");
29 .geometry_layout(PrimitiveIn::LINES_ADJACENCY, PrimitiveOut::TRIANGLE_STRIP, 4, 1)
30 .geometry_source(
"workbench_shadow_geom.glsl");
33 .geometry_layout(PrimitiveIn::LINES_ADJACENCY, PrimitiveOut::TRIANGLE_STRIP, 4, 2)
34 .geometry_source(
"workbench_shadow_geom.glsl");
43 .geometry_layout(PrimitiveIn::TRIANGLES, PrimitiveOut::TRIANGLE_STRIP, 3, 2)
44 .geometry_source(
"workbench_shadow_caps_geom.glsl");
53 .fragment_source(
"gpu_shader_depth_only_frag.glsl");
56 .fragment_out(0, Type::VEC4,
"materialData")
57 .fragment_out(1, Type::VEC4,
"normalData")
59 .fragment_source(
"workbench_shadow_debug_frag.glsl");
67 #define WORKBENCH_SHADOW_VARIATIONS(suffix, ...) \
68 GPU_SHADER_CREATE_INFO(workbench_shadow_pass_manifold_no_caps##suffix) \
69 .define("SHADOW_PASS") \
70 .additional_info("workbench_shadow_common", "workbench_shadow_manifold", __VA_ARGS__) \
71 .do_static_compilation(true); \
72 GPU_SHADER_CREATE_INFO(workbench_shadow_pass_no_manifold_no_caps##suffix) \
73 .define("SHADOW_PASS") \
74 .define("DOUBLE_MANIFOLD") \
75 .additional_info("workbench_shadow_common", "workbench_shadow_no_manifold", __VA_ARGS__) \
76 .do_static_compilation(true); \
77 GPU_SHADER_CREATE_INFO(workbench_shadow_fail_manifold_caps##suffix) \
78 .define("SHADOW_FAIL") \
79 .additional_info("workbench_shadow_common", "workbench_shadow_caps", __VA_ARGS__) \
80 .do_static_compilation(true); \
81 GPU_SHADER_CREATE_INFO(workbench_shadow_fail_manifold_no_caps##suffix) \
82 .define("SHADOW_FAIL") \
83 .additional_info("workbench_shadow_common", "workbench_shadow_manifold", __VA_ARGS__) \
84 .do_static_compilation(true); \
85 GPU_SHADER_CREATE_INFO(workbench_shadow_fail_no_manifold_caps##suffix) \
86 .define("SHADOW_FAIL") \
87 .define("DOUBLE_MANIFOLD") \
88 .additional_info("workbench_shadow_common", "workbench_shadow_caps", __VA_ARGS__) \
89 .do_static_compilation(true); \
90 GPU_SHADER_CREATE_INFO(workbench_shadow_fail_no_manifold_no_caps##suffix) \
91 .define("SHADOW_FAIL") \
92 .define("DOUBLE_MANIFOLD") \
93 .additional_info("workbench_shadow_common", "workbench_shadow_no_manifold", __VA_ARGS__) \
94 .do_static_compilation(true);
typedef UINT(API *GHOST_WIN32_GetDpiForWindow)(HWND)
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name)
#define GPU_SHADER_CREATE_INFO(_info)
#define WORKBENCH_SHADOW_VARIATIONS(suffix,...)