### Method

# Cogl Pipeline set_alpha_test_function

#### Declaration [src]

    void
    cogl_pipeline_set_alpha_test_function (
      CoglPipeline* pipeline,
      CoglPipelineAlphaFunc alpha_func,
      float alpha_reference
    )

#### Description [src]

Before a primitive is blended with the framebuffer, it goes through an alpha test stage which lets you discard fragments based on the current alpha value. This function lets you change the function used to evaluate the alpha channel, and thus determine which fragments are discarded and which continue on to the blending stage.

The default is `COGL_PIPELINE_ALPHA_FUNC_ALWAYS`.

#### Parameters

`alpha_func`

  Type: `CoglPipelineAlphaFunc`

  A `CoglPipelineAlphaFunc` constant.

`alpha_reference`

  Type: `float`

  A reference point that the chosen alpha function uses to compare incoming fragments to.