mirror of
https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git
synced 2025-08-23 04:35:28 +08:00
Merge branch 'new-theme' into new-theme
This commit is contained in:
@@ -295,7 +295,7 @@ void main()
|
|||||||
|
|
||||||
虽然反相是一种相对简单的后处理特效,但是已经很有趣了:
|
虽然反相是一种相对简单的后处理特效,但是已经很有趣了:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
整个场景现在的颜色都反转了,只需在着色器中写一行代码就能做到,酷吧?
|
整个场景现在的颜色都反转了,只需在着色器中写一行代码就能做到,酷吧?
|
||||||
|
|
||||||
@@ -391,7 +391,7 @@ void main()
|
|||||||
创建模糊(Blur)效果的kernel定义如下:
|
创建模糊(Blur)效果的kernel定义如下:
|
||||||
|
|
||||||
$$
|
$$
|
||||||
\(\begin{bmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 1 \end{bmatrix} / 16\)
|
\begin{bmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 1 \end{bmatrix} / 16
|
||||||
$$
|
$$
|
||||||
|
|
||||||
由于所有数值加起来的总和为16,简单返回结合起来的采样颜色是非常亮的,所以我们必须将kernel的每个值除以16.最终的kernel数组会是这样的:
|
由于所有数值加起来的总和为16,简单返回结合起来的采样颜色是非常亮的,所以我们必须将kernel的每个值除以16.最终的kernel数组会是这样的:
|
||||||
|
@@ -149,7 +149,7 @@ glBindVertexArray(0);
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
但我们不是已经学到了所有内容了吗?对,现在我们将通过为场景添加一个几何着色器来为这个小场景增加点活力。
|
但是这些不都是我们之前学过的内容吗?是的,但现在我们会给这个场景加入一个几何着色器,给它增加点活力。
|
||||||
|
|
||||||
出于学习的目的我们将创建一个叫pass-through的几何着色器,它用一个point基本图形作为它的输入,并把它无修改地传(pass)到下一个着色器。
|
出于学习的目的我们将创建一个叫pass-through的几何着色器,它用一个point基本图形作为它的输入,并把它无修改地传(pass)到下一个着色器。
|
||||||
|
|
||||||
|
7
docs/06 In Practice/2D-Game/04 Levels.md
Normal file
7
docs/06 In Practice/2D-Game/04 Levels.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 关卡
|
||||||
|
|
||||||
|
**暂无翻译**
|
||||||
|
|
||||||
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!In-Practice/2D-Game/Levels),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
|
<img src="../../../img/development.png" class="clean">
|
7
docs/06 In Practice/2D-Game/05 Collisions/01 Ball.md
Normal file
7
docs/06 In Practice/2D-Game/05 Collisions/01 Ball.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 球
|
||||||
|
|
||||||
|
**暂无翻译**
|
||||||
|
|
||||||
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!In-Practice/2D-Game/Collisions/Ball),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
|
<img src="../../../../img/development.png" class="clean">
|
@@ -0,0 +1,7 @@
|
|||||||
|
# 碰撞检测
|
||||||
|
|
||||||
|
**暂无翻译**
|
||||||
|
|
||||||
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!In-Practice/2D-Game/Collisions/Collision-resolution),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
|
<img src="../../../../img/development.png" class="clean">
|
@@ -0,0 +1,7 @@
|
|||||||
|
# 碰撞处理
|
||||||
|
|
||||||
|
**暂无翻译**
|
||||||
|
|
||||||
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!In-Practice/2D-Game/Collisions/Collision-resolution),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
|
<img src="../../../../img/development.png" class="clean">
|
7
docs/06 In Practice/2D-Game/07 Postprocessing.md
Normal file
7
docs/06 In Practice/2D-Game/07 Postprocessing.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 后期处理
|
||||||
|
|
||||||
|
**暂无翻译**
|
||||||
|
|
||||||
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!In-Practice/2D-Game/Postprocessing),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
|
<img src="../../../img/development.png" class="clean">
|
7
docs/06 In Practice/2D-Game/08 Powerups.md
Normal file
7
docs/06 In Practice/2D-Game/08 Powerups.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 道具
|
||||||
|
|
||||||
|
**暂无翻译**
|
||||||
|
|
||||||
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!In-Practice/2D-Game/Powerups),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
|
<img src="../../../img/development.png" class="clean">
|
7
docs/06 In Practice/2D-Game/09 Audio.md
Normal file
7
docs/06 In Practice/2D-Game/09 Audio.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 音效
|
||||||
|
|
||||||
|
**暂无翻译**
|
||||||
|
|
||||||
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!In-Practice/2D-Game/Audio),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
|
<img src="../../../img/development.png" class="clean">
|
7
docs/06 In Practice/2D-Game/10 Render Text.md
Normal file
7
docs/06 In Practice/2D-Game/10 Render Text.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 渲染文字
|
||||||
|
|
||||||
|
**暂无翻译**
|
||||||
|
|
||||||
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!In-Practice/2D-Game/Render-text),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
|
<img src="../../../img/development.png" class="clean">
|
7
docs/06 In Practice/2D-Game/11 Final thoughts.md
Normal file
7
docs/06 In Practice/2D-Game/11 Final thoughts.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 结语
|
||||||
|
|
||||||
|
**暂无翻译**
|
||||||
|
|
||||||
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!In-Practice/2D-Game/Final-thoughts),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
|
<img src="../../../img/development.png" class="clean">
|
@@ -1,7 +1,7 @@
|
|||||||
# 光照
|
# 光照
|
||||||
|
|
||||||
**未完成**
|
**暂无翻译**
|
||||||
|
|
||||||
这篇教程暂时还没有完成,您可以经常来刷新看看是否有更新的进展。
|
这篇教程暂时还没有进行翻译,您可以先阅读[原文](https://learnopengl.com/#!PBR/Lighting),或经常来刷新看看是否有更新的进展。当然,我们更欢迎您在[GitHub上](https://github.com/LearnOpenGL-CN/LearnOpenGL-CN)认领翻译这篇文章,帮助我们完善这个教程系列。
|
||||||
|
|
||||||
<img src="../../img/development.png" class="clean">
|
<img src="../../img/development.png" class="clean">
|
7
docs/07 PBR/03 IBL/01 Diffuse irradiance.md
Normal file
7
docs/07 PBR/03 IBL/01 Diffuse irradiance.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# 漫反射辐照
|
||||||
|
|
||||||
|
**未完成**
|
||||||
|
|
||||||
|
这篇教程暂时还没有完成,您可以经常来刷新看看是否有更新的进展。
|
||||||
|
|
||||||
|
<img src="../../../img/development.png" class="clean">
|
@@ -1,7 +1,7 @@
|
|||||||
# IBL
|
# 镜面IBL
|
||||||
|
|
||||||
**未完成**
|
**未完成**
|
||||||
|
|
||||||
这篇教程暂时还没有完成,您可以经常来刷新看看是否有更新的进展。
|
这篇教程暂时还没有完成,您可以经常来刷新看看是否有更新的进展。
|
||||||
|
|
||||||
<img src="../../img/development.png" class="clean">
|
<img src="../../../img/development.png" class="clean">
|
14
mkdocs.yml
14
mkdocs.yml
@@ -53,7 +53,9 @@ pages:
|
|||||||
- PBR:
|
- PBR:
|
||||||
- 理论: '07 PBR/01 Theory.md'
|
- 理论: '07 PBR/01 Theory.md'
|
||||||
- 光照: '07 PBR/02 Lighting.md'
|
- 光照: '07 PBR/02 Lighting.md'
|
||||||
- IBL: '07 PBR/03 IBL.md'
|
- IBL:
|
||||||
|
- 漫反射辐照: '07 PBR/03 IBL/01 Diffuse irradiance.md'
|
||||||
|
- 镜面IBL: '07 PBR/03 IBL/02 Specular IBL.md'
|
||||||
- 实战:
|
- 实战:
|
||||||
- 调试: '06 In Practice/01 Debugging.md'
|
- 调试: '06 In Practice/01 Debugging.md'
|
||||||
- 文本渲染: '06 In Practice/02 Text Rendering.md'
|
- 文本渲染: '06 In Practice/02 Text Rendering.md'
|
||||||
@@ -61,7 +63,17 @@ pages:
|
|||||||
- Breakout: '06 In Practice/2D-Game/01 Breakout.md'
|
- Breakout: '06 In Practice/2D-Game/01 Breakout.md'
|
||||||
- 准备工作: '06 In Practice/2D-Game/02 Setting up.md'
|
- 准备工作: '06 In Practice/2D-Game/02 Setting up.md'
|
||||||
- 渲染精灵: '06 In Practice/2D-Game/03 Rendering Sprites.md'
|
- 渲染精灵: '06 In Practice/2D-Game/03 Rendering Sprites.md'
|
||||||
|
- 关卡: '06 In Practice/2D-Game/04 Levels.md'
|
||||||
|
- 碰撞:
|
||||||
|
- 球: '06 In Practice/2D-Game/05 Collisions/01 Ball.md'
|
||||||
|
- 碰撞检测: '06 In Practice/2D-Game/05 Collisions/02 Collision detection.md'
|
||||||
|
- 碰撞处理: '06 In Practice/2D-Game/05 Collisions/03 Collision resolution.md'
|
||||||
- 粒子: '06 In Practice/2D-Game/06 Particles.md'
|
- 粒子: '06 In Practice/2D-Game/06 Particles.md'
|
||||||
|
- 后期处理: '06 In Practice/2D-Game/07 Postprocessing.md'
|
||||||
|
- 道具: '06 In Practice/2D-Game/08 Powerups.md'
|
||||||
|
- 音效: '06 In Practice/2D-Game/09 Audio.md'
|
||||||
|
- 渲染文字: '06 In Practice/2D-Game/10 Render Text.md'
|
||||||
|
- 结语: '06 In Practice/2D-Game/11 Final thoughts.md'
|
||||||
|
|
||||||
site_name: 'LearnOpenGL CN'
|
site_name: 'LearnOpenGL CN'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user