-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add blend equadion extension support Add blend advanced extension support
- Loading branch information
1 parent
9e29c42
commit 87c4677
Showing
10 changed files
with
789 additions
and
491 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!-- | ||
- Copyright (c) 2023, Mobica Limited | ||
- | ||
- SPDX-License-Identifier: Apache-2.0 | ||
- | ||
- Licensed under the Apache License, Version 2.0 the "License"; | ||
- you may not use this file except in compliance with the License. | ||
- You may obtain a copy of the License at | ||
- | ||
- http://www.apache.org/licenses/LICENSE-2.0 | ||
- | ||
- Unless required by applicable law or agreed to in writing, software | ||
- distributed under the License is distributed on an "AS IS" BASIS, | ||
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
- See the License for the specific language governing permissions and | ||
- limitations under the License. | ||
- | ||
--> | ||
|
||
# Color write enable | ||
## Overview | ||
This sample demonstrates the functionality of VK_EXT_extended_dynamic_state3 related to blending. It includes the following features: | ||
- `vkCmdSetColorBlendEnableEXT`: toggles blending on and off. | ||
- `vkCmdSetColorBlendEquationEXT`: modifies blending operators and factors. | ||
- `vkCmdSetColorBlendAdvancedEXT`: utilizes more complex blending operators. | ||
- `vkCmdSetColorWriteMaskEXT`: toggles individual channels on and off. | ||
|
||
## How to use in Vulkan | ||
To utilize this feature, the device extensions `VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME` and `VK_EXT_BLEND_OPERATION_ADVANCED_EXTENSION_NAME` need to be enabled. | ||
All presented functions take an array of objects defining their action for subsequent color attachments. | ||
The `vkCmdSetColorBlendEnableEXT` function expects an array of booleans to toggle blending. | ||
The `vkCmdSetColorBlendEquationEXT` function expects and array of VkColorBlendEquationEXT objectswhich determine operators and factors for color and alpha blending. | ||
The `vkCmdSetColorBlendAdvancedEXT` function expects and array of VkColorBlendAdvancedEXT objects, which determine blending operators and premultiplication for color blending. | ||
The `vkCmdSetColorWriteMaskEXT` function expects and array of VkColorComponentFlags objects. These objects can be created by combining the desired color bit flags using bitwise addition. | ||
|
||
## The sample | ||
The sample demonstrates how to set up an application to work with this extension: | ||
- Enabling the extension. | ||
- Setting parameters for the presented methods. | ||
|
||
The sample demonstrates how the use of each operator affects color blending. | ||
|
||
## Documentation links | ||
[https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendEnableEXT.html](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendEnableEXT.html) | ||
|
||
[https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendEquationEXT.html](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendEquationEXT.html) | ||
|
||
[https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendAdvancedEXT.html](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorBlendAdvancedEXT.html) | ||
|
||
[https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorWriteMaskEXT.html](https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdSetColorWriteMaskEXT.html) | ||
|
Oops, something went wrong.