随笔分类 -  图形学

四元数(Quaternion)详细讲解以及在图形图像编程中的使用
摘要:关于四元数介绍可以直接看wiki,写的很详细了。四元数的基本运算:http://www.linuxgraphics.cn/opengl/opengl_quaternion.html,代码有些问题。这里主要记录的是四元数在图像旋转上的应用,具体的使用方法及原理参考:http://3dgep.com/?... 阅读全文

posted @ 2014-06-14 22:20 不吃鱼的猫 阅读(1966) 评论(0) 推荐(0)

Effect-Compiler Tool(fxc.exe)
摘要:提前编译shader文件,提高运行时的效率。refer to http://msdn.microsoft.com/en-us/library/windows/desktop/bb509710%28v=vs.85%29.aspx编译后的使用,跟之前的代码 一样,直接调用compileFromFile或者compileFromResource使用。 阅读全文

posted @ 2013-08-01 12:48 不吃鱼的猫 阅读(747) 评论(0) 推荐(0)

linearizing the depth in vertex shader
摘要:please refer to http://www.mvps.org/directx/articles/linear_z/linearz.htmWhen using a programmable vertex shader, we have direct control of the transformation process, and can implement our own. Vertex position can be read from the input registers, manipulated however we like, then output as a 4D ho 阅读全文

posted @ 2013-07-11 13:07 不吃鱼的猫 阅读(354) 评论(0) 推荐(0)

Normal Vector Using WorldInverseTranspose
摘要:shader里面经常看到normal向量是用WorldInverseTranspose矩阵做变换的,有时候也可以用WorldMatrix变换。原理:If your object is only ever rotated and translated, you can transform normal... 阅读全文

posted @ 2013-07-08 18:48 不吃鱼的猫 阅读(922) 评论(0) 推荐(0)

三维模型的渲染效率
摘要:有几个点,可以考虑提高三维模型的实时显示效率。1. 改变渲染顺序,基本的是node->mesh->material,可以改成material优先或者mesh优先,视具体情况定。2. 为所以的mesh建立lod暂时只想了这么多 阅读全文

posted @ 2013-05-30 13:27 不吃鱼的猫 阅读(411) 评论(0) 推荐(0)

编译STL的效率问题
摘要:程序中如果大量使用stl,效率低下,可以在项目预处理宏里面添加_HAS_ITERATOR_DEBUGGING=0_SECURE_SCL=0 阅读全文

posted @ 2013-05-29 15:53 不吃鱼的猫 阅读(482) 评论(4) 推荐(0)