Skip to content

Commit

Permalink
[docs] 去除多余描述
Browse files Browse the repository at this point in the history
  • Loading branch information
Italink committed Sep 24, 2023
1 parent d4c3757 commit 4b76b08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
26 changes: 3 additions & 23 deletions Docs/01-GraphicsAPI/6.图形渲染进阶.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,7 @@
comments: true
---

# 图形渲染进阶

在之前的章节中,大家应该都已经熟悉了如何在C++中搭建现代图形API的基本渲染流程:

``` C++
void renderTick(){
ensureResourcesInit(); //确保初始化渲染资源

updateResources(); //更新渲染资源

beginRenderPass(RenderTarget,ClearValues); //开启渲染通道
for(auto item : RenderItems){
setupPipeline(); //装载流水线
setDrawState(); //设置渲染状态
drawCommand(); //录制draw命令
}
endRenderPass(); //结束渲染通道
}
```

通过使用 [QRhiGraphicsPipeline](https://alpqr.github.io/qtrhi/qrhigraphicspipeline.html)[QRhiCommandBuffer](https://alpqr.github.io/qtrhi/qrhicommandbuffer.html) ,并编写 Vertex Shader 和 Fragment Shader,对图形渲染管线也有了一定认知:
在之前的章节中,大家应该都已经熟悉了如何在C++中搭建现代图形API的基本渲染流程,通过使用 [QRhiGraphicsPipeline](https://alpqr.github.io/qtrhi/qrhigraphicspipeline.html)[QRhiCommandBuffer](https://alpqr.github.io/qtrhi/qrhicommandbuffer.html) ,并编写 Vertex Shader 和 Fragment Shader,对图形渲染管线也有了一定认知:

![graphics-pipeline](Resources/graphics-pipeline.png)

Expand Down Expand Up @@ -113,7 +93,7 @@ mPipeline->setPolygonMode(QRhiGraphicsPipeline::Line);
> 需要注意的是:上面只是比较常见且对开发者作用较大的片段操作,这里有一个完整的描述文档:
>
> - (https://registry.khronos.org/vulkan/specs/1.3/html/chap26.html#fragops
> - https://registry.khronos.org/vulkan/specs/1.3/html/chap26.html#fragops
这里我们主要是要学会怎么去配置 **重叠片段的处理机制** 和 **片段的筛选手段** 。
Expand All @@ -123,7 +103,7 @@ mPipeline->setPolygonMode(QRhiGraphicsPipeline::Line);
![image-20230907194807029](Resources/image-20230907194807029-1694935064528-12.png)
在QRhi中,使用裁剪测试很容易,只需要在创建流水线时设置`QRhiGraphicsPipeline::Flag::UsesScissor`:
在QRhi中,使用裁剪测试只需要在创建流水线时设置`QRhiGraphicsPipeline::Flag::UsesScissor`:
``` c++
mPipeline->setFlags(QRhiGraphicsPipeline::Flag::UsesScissor);
Expand Down

0 comments on commit 4b76b08

Please sign in to comment.