杨帆博客

你想开发游戏还是改变世界?


  • 首页

  • 标签

  • 归档

  • 搜索

【DirectX】27-雾效果

发表于 2018-04-10 | 更新于: 2018-08-22

参考教程

Tutorial 23: Fog

学习记录

  在这篇开始,我们首先需要纠正上一篇部分的错误之处,在上一篇我们渲染到纹理的时候,渲染了一张 200 x 200 的纹理,然后使用的还是我们之前渲染 1920 x 1080 后缓冲用的深度缓冲,所以会出现错误,错误信息如下:

  D3D11 ERROR: ID3D11DeviceContext::OMSetRenderTargets: The RenderTargetView at slot 0 is not compatible with the DepthStencilView. DepthStencilViews may only be used with RenderTargetViews if the effective dimensions of the Views are equal, as well as the Resource types, multisample count, and multisample quality. The RenderTargetView at slot 0 has (w:200,h:200,as:1), while the Resource is a Texture2D with (mc:1,mq:0). The DepthStencilView has (w:1920,h:1080,as:1), while the Resource is a Texture2D with (mc:1,mq:0). [ STATE_SETTING ERROR #388: OMSETRENDERTARGETS_INVALIDVIEW]

  如果我们确实需要渲染不同的视图,那么需要创建不同的深度模板使用,如上。

  这一篇中,我们主要学习在 D3D11 中实现雾效果。

阅读全文 »

Rotate-String

发表于 2018-04-10 | 更新于: 2018-08-22

题目地址

LeetCode#796 Rotate String

题目描述

  We are given two strings, A and B.

  A shift on A consists of taking string A and moving the leftmost character to the rightmost position. For example, if A = 'abcde', then it will be 'bcdea' after one shift on A. Return True if and only if A can become B after some number of shifts on A.

阅读全文 »

【DirectX】26-渲染到纹理

发表于 2018-04-09 | 更新于: 2018-08-22

参考教程

Tutorial 22: Render to Texture

学习记录

  在 OpenGL 中我们介绍过帧缓冲:【OpenGL】17-帧缓冲与离屏渲染 ,这篇文章中我们主要介绍在 DX11 中实现离屏渲染。

阅读全文 »

【DirectX】25-镜面贴图

发表于 2018-04-08 | 更新于: 2018-08-22

参考教程

Tutorial 21: Specular Mapping

学习记录

  这篇文章中,我们将基于上一篇的内容加一点扩展,为凹凸贴图实现的效果再加上镜面反射。关于镜面反射在 OpenGL 学习笔记中有介绍过:【OpenGL】11-光照 。这一篇文章则是简单的介绍在使用贴图的情况下实现。

阅读全文 »

【OpenCV_初识】环境配置

发表于 2018-04-08 | 更新于: 2018-08-22

  心里没有 AC 数的我,又要开始开新坑了。这一系列文章的坑是为了学习 OpenCV 而开。

  本篇文章介绍了在 Mac 环境下 OpenCV + CLion 的配置。

阅读全文 »
1…121314…46
KsGin

KsGin

游戏程序员/计算机图形学/Unity/西山居搬砖

226 日志
16 标签
GitHub E-Mail Google Twitter
© 2018 KsGin @ 2018
0%