Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/gpencil/gpencil_shader.c
| Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | g_shaders.antialiasing_sh[stage] = GPU_shader_create_from_arrays({ | ||||
| "#define SMAA_INCLUDE_PS 1\n", | "#define SMAA_INCLUDE_PS 1\n", | ||||
| "uniform vec4 viewportMetrics;\n", | "uniform vec4 viewportMetrics;\n", | ||||
| datatoc_common_smaa_lib_glsl, | datatoc_common_smaa_lib_glsl, | ||||
| datatoc_gpencil_antialiasing_frag_glsl, | datatoc_gpencil_antialiasing_frag_glsl, | ||||
| NULL, | NULL, | ||||
| }, | }, | ||||
| .defs = | .defs = | ||||
| (const char *[]){ | (const char *[]){ | ||||
| "uniform float lumaWeight;\n", | |||||
| "#define SMAA_GLSL_3\n", | "#define SMAA_GLSL_3\n", | ||||
| "#define SMAA_RT_METRICS viewportMetrics\n", | "#define SMAA_RT_METRICS viewportMetrics\n", | ||||
| "#define SMAA_PRESET_HIGH\n", | "#define SMAA_PRESET_HIGH\n", | ||||
| "#define SMAA_LUMA_WEIGHT float4(1.0, 1.0, 1.0, 0.0)\n", | "#define SMAA_LUMA_WEIGHT float4(lumaWeight, lumaWeight, lumaWeight, 0.0)\n", | ||||
| "#define SMAA_NO_DISCARD\n", | "#define SMAA_NO_DISCARD\n", | ||||
| stage_define, | stage_define, | ||||
| NULL, | NULL, | ||||
| }, | }, | ||||
| }); | }); | ||||
| } | } | ||||
| return g_shaders.antialiasing_sh[stage]; | return g_shaders.antialiasing_sh[stage]; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines | |||||