Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blend operation enum documentation. #23

Merged
merged 5 commits into from
Sep 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,29 @@ enum:
for setting of the constant value.)<br>
`(1 - R_const, 1 - G_const, 1 - B_const, 1 - A_const)`
blend operation:
description: >
The algorithm used to blend source and destination colors.
ref:
name: GPUBlendOperation
anchor: "#enumdef-gpublendoperation"
values:
add: >
Adds the scaled source and scaled destination together.<br>
`(RGBA_src` &times; `RGBA_src_factor) + (RGBA_dst` &times; `RGBA_dst_factor)`
subtract: >
Subtracts the scaled destination from the scaled source.<br>
`(RGBA_src` &times; `RGBA_src_factor) - (RGBA_dst` &times; `RGBA_dst_factor)`
reverse subtract: >
Subtracts the scaled source from the scaled destination.<br>
`(RGBA_dst` &times; `RGBA_dst_factor) - (RGBA_src` &times; `RGBA_src_factor)`
min: >
Takes the minimum of the source and destination.<br>
`min(RGBA_src, RGBA_dst)`
max: >
Takes the maximum of the source and destination.<br>
`max(RGBA_src, RGBA_dst)`
bitmask:
texture usage:
description: Determine how a GPUTexture maybe be used after creation.
Expand Down