Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Italink committed Jan 4, 2024
2 parents 06439ad + 1813271 commit 48346c7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Docs/01-GraphicsAPI/0.概述.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void drawLine(std::vector<std::vector<char>>& frameBuffer, Line line) {
drawPoint(frameBuffer, line.points[0]);
}
float steps = abs(dx) > abs(dy) ? abs(dx) : abs(dy);
int steps = abs(dx) > abs(dy) ? abs(dx) : abs(dy);
float xInc = dx / (float)steps; //x增量
float yInc = dy / (float)steps; //y增量
Expand Down
2 changes: 1 addition & 1 deletion Docs/01-GraphicsAPI/6.图形渲染进阶.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ cmdBuffer->beginPass(renderTarget, clearColor, dsClearValue);

混合通常用于半透明渲染,它本质上是一种处理前后重叠片段的机制。

我们称前一(已绘制)片段为 **源(Src)片段** ,称 后一(待绘制)片段为 **目标(Dst)片段** ,混合主要是设定一些公式参数来定制这个过程(方括号`[]` 中的参数是可设置的):
我们称前一(已绘制在缓冲区上)片段为 **目标(Dst)片段** ,称 后一(待绘制)片段为 **源(Src)片段** ,混合主要是设定一些公式参数来定制这个过程(方括号`[]` 中的参数是可设置的):
$$
\begin{align*}
& ResultColor_{rgb} = [SrcFactor_{alpha}]*SrcColor_{rgb}\ \ [Op]\ \ [DstFactor_{rgb}] * DstColor_{rgb} \\
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Italink

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

0 comments on commit 48346c7

Please sign in to comment.