Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/gpencil/gpencil_antialiasing.c
| Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Lines | if (txl->smaa_search_tx == NULL) { | ||||
| /* Stage 1: Edge detection. */ | /* Stage 1: Edge detection. */ | ||||
| DRW_PASS_CREATE(psl->smaa_edge_ps, DRW_STATE_WRITE_COLOR); | DRW_PASS_CREATE(psl->smaa_edge_ps, DRW_STATE_WRITE_COLOR); | ||||
| GPUShader *sh = GPENCIL_shader_antialiasing(0); | GPUShader *sh = GPENCIL_shader_antialiasing(0); | ||||
| grp = DRW_shgroup_create(sh, psl->smaa_edge_ps); | grp = DRW_shgroup_create(sh, psl->smaa_edge_ps); | ||||
| DRW_shgroup_uniform_texture(grp, "colorTex", pd->color_tx); | DRW_shgroup_uniform_texture(grp, "colorTex", pd->color_tx); | ||||
| DRW_shgroup_uniform_texture(grp, "revealTex", pd->reveal_tx); | DRW_shgroup_uniform_texture(grp, "revealTex", pd->reveal_tx); | ||||
| DRW_shgroup_uniform_vec4_copy(grp, "viewportMetrics", metrics); | DRW_shgroup_uniform_vec4_copy(grp, "viewportMetrics", metrics); | ||||
| DRW_shgroup_uniform_float_copy( | |||||
| grp, "lumaWeight", pd->scene->grease_pencil_settings.smaa_threshold); | |||||
| DRW_shgroup_clear_framebuffer(grp, GPU_COLOR_BIT, 0, 0, 0, 0, 0.0f, 0x0); | DRW_shgroup_clear_framebuffer(grp, GPU_COLOR_BIT, 0, 0, 0, 0, 0.0f, 0x0); | ||||
| DRW_shgroup_call_procedural_triangles(grp, NULL, 1); | DRW_shgroup_call_procedural_triangles(grp, NULL, 1); | ||||
| } | } | ||||
| { | { | ||||
| /* Stage 2: Blend Weight/Coord. */ | /* Stage 2: Blend Weight/Coord. */ | ||||
| DRW_PASS_CREATE(psl->smaa_weight_ps, DRW_STATE_WRITE_COLOR); | DRW_PASS_CREATE(psl->smaa_weight_ps, DRW_STATE_WRITE_COLOR); | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||