随笔分类 - Direct3D 11
摘要:Texture2D txMesh;SamplerState samLinear{ Filter = MIN_MAG_MIP_LINEAR; AddressU = Wrap; AddressV = Wrap;};float4 meshColor = txMesh.Sample( samLinear, ...
阅读全文
摘要: Device Context可以被用于任何线程中,但一次只能在一个线程中使用。 所有的ID3D11Device接口都是free-threaded(线程无关的)的,也就是说可以在多个线程中同时调用其接口函数。 ID3D11DeviceContext的方法(除了那些在ID3D11DeviceChi...
阅读全文
摘要:纹理映射:就是指将一张2D的图像投影到3D物体上。 /* **创建一个着色器纹理资源和纹理采样器 */ // D3D11中,纹理是一个ShaderResourceView ID3D11ShaderResourceView * ...
阅读全文
摘要:光源类型: directional lighting point lights, which radiate uniform light from their centers, spot lights, which are directional but not uniform across a...
阅读全文
摘要:D3D中,变换就是通过和一个变换矩阵相乘来执行的。 D3D中有3中基本的图元变换方式: 平移translation (where it lies in space relative to the origin): XMMatrixTranslation XMMatrixTranslationFr...
阅读全文
摘要:两种绘制方式: 1、 使用顶点缓存进行绘制 (1) 创建顶点缓存 a) 声明一个描述顶点数据的结构 b) 使用实际的顶点数据填充顶点结构数组 c) 创建一个D3D11_BUFFER_DESC对象(a buffer description),将其BindFlags成员赋值为D3D11_BIND...
阅读全文
摘要:Rasterization: The process of converting a triangle defined by three vertices to a bunch of pixels covered by the triangle is called rasterization. Th...
阅读全文
摘要:DX11 DX9命名变化: 不需要D3D object 需要用IDirect3D9 object创建Device ID3D11Device IDirect3DDevice9 ID3D11VertexShader IDirect3DVertexShader...
阅读全文
摘要:#include #include #include #include "resource.h"#pragma comment(lib, "dxguid.lib")#pragma comment(lib, "d3d11.lib")#pragma comment(lib, "d3dx11.lib...
阅读全文

浙公网安备 33010602011771号