nicegraf
ngf_blend_info Struct Reference

Data Fields

ngf_blend_op blend_op_color
 
ngf_blend_op blend_op_alpha
 
ngf_blend_factor src_color_blend_factor
 
ngf_blend_factor dst_color_blend_factor
 
ngf_blend_factor src_alpha_blend_factor
 
ngf_blend_factor dst_alpha_blend_factor
 
uint32_t color_write_mask
 
bool enable
 

Detailed Description

Describes how blending should be handled by the pipeline. If blending is disabled, the resulting color and alpha values are directly assigned the color and alpha values computed at the fragment stage.

When blending is enabled, the resulting color and alpha values are computed using the corresponding blend operations and factors (specified separately for color and alpha). Note that if the render target attachment from which the destination values are read uses an sRGB format, the destination color values are linearized prior to being used in a blend operation.

If the render target attachment uses an sRGB format, the resulting color value is converted to an sRGB representation prior to being finally written to the attachment.

Field Documentation

◆ blend_op_alpha

ngf_blend_op ngf_blend_info::blend_op_alpha

The blend operation to perform for alpha.

◆ blend_op_color

ngf_blend_op ngf_blend_info::blend_op_color

The blend operation to perform for color.

◆ color_write_mask

uint32_t ngf_blend_info::color_write_mask

A combination of ngf_color_write_mask_bit flags that specifies which color channels actually get written out for the attachment corresponding to this blend state.

◆ dst_alpha_blend_factor

ngf_blend_factor ngf_blend_info::dst_alpha_blend_factor

The destination blend factor for alpha.

◆ dst_color_blend_factor

ngf_blend_factor ngf_blend_info::dst_color_blend_factor

The destination blend factor for color.

◆ enable

bool ngf_blend_info::enable

Specifies whether blending is enabled.

◆ src_alpha_blend_factor

ngf_blend_factor ngf_blend_info::src_alpha_blend_factor

The source blend factor for alpha.

◆ src_color_blend_factor

ngf_blend_factor ngf_blend_info::src_color_blend_factor

The source blend factor for color.