摘要:
书中HillsDemo 关键是类的结构,GeometryGenerator的组成和应用;MeshData的构成,来存储Mesh的vertex和index数据;class GeometryGenerator{public: struct Vertex { Vertex(){}... 阅读全文
摘要:
先看BoxDemo的前几节,1.vertex input Layout2.vertexBuffer3.IndexBuffer4.vertexShader5.constant Buffer6.pixelShader7.renderState8.effect1.vertex input LayoutOn... 阅读全文
摘要:
4.1.3 纹理数据格式 2D纹理即一个数据矩阵,每个元素可以是color值,也可是float3向量值 格式例子:DXGI_FORMAT_R32G32B32_FLOAT(每个纹素为3个32位的float型,可存储3D vector) DXGI_FORMAT_R8G8B... 阅读全文
摘要:
如何计算设备的Adapter数?主要参考MSDN: EnumAdapters在d3dApp.cpp文件InitDirect3D()接口中: HR(dxgiFactory->CreateSwapChain(md3dDevice, &sd, &mSwapChain)); //begin 检测... 阅读全文
摘要:
看龙书DX11,首先是第四章,本文对GameTime类进行解释问:此类主要实现了什么功能?答:Returns the total time elapsed since Reset() was called, NOT counting anytime when the clock is stopped... 阅读全文
摘要:
实践了书上第七章的CrazyBall,1.Camera的尾随,本例中没有使用已有的CarmeraFollow脚本,而是直接根据Ball的pos来跟随,当然也使用了插值,并设置了阻尼弹簧方式: transform.position = Vector3.Lerp(transform.p... 阅读全文
摘要:
俄罗斯实现中使用Unity语法总结...1.InstantiateInstantiate中克隆一个Object以及他的子结点,也可包括位置信息。a.CreateBlock()函数内,随机选取七种block的gameObject里一种,进行动态block实例化: Instantiate(... 阅读全文
摘要:
Unity3d 俄罗斯方块的绘制,代码解释 阅读全文
摘要:
今天用cuda block内thread的形式来修改 两个for循环的 六面体一直不对。// for (int i= 0;i<boxPointNums-1;i++)// { unsigned int j= threadIdx.x; unsigned int... 阅读全文
摘要:
vertexBuffer绑定cuda资源时候,注意desc的申请模式 阅读全文