If you’re stuck using Microsoft Visual C++, these tips may help make the experience more pleasant. I’ve been collecting these little tidbits for a while, and decided to collect them in one spot. I’ve chosen to collect them here because I can’t think of a better spot.
First thing, get yourself a copy of Workspace Whiz. Workspace Whiz gives you a nice GUI interface to Exhuberant CTAGS. It also gives you a handy button to switch between the header and source files. It’s cheap ($10), and makes life better.
Intel SSE4 Programming Reference.pdf
SSE4多了不少非常有用的指令,可以进一步优化XNAMath
In high school, we learned that some mathematical operations are logically equivalent, as well as rules for transforming operations into easier-to-solve formats. But as programmers, we know that not all forms of a problem are computationally the same, because some can take advantage of particular programming languages or microprocessor features to reduce the clock cycles required for evaluation.
C/C++ optimizing compilers are great–but there *are* a few techniques for hand-tuning your code to run as efficiently as possible on the AMD Athlon64 and Opteron processors, especially when developing DLLs, device drivers, or other performance-bound pieces of code.
这两天花时间改进了Volumetric Obscurance的算法,并取得了一些成果。暂时先把改进后的算法称为Advanced Volumetric Obscurance。
原VO论文提出了一个非常好的概念 – Line Sample。可惜论文本身却有不少不严谨的推导和错漏,甚至里面给出的关于Line Sample的数学结论也是不严谨的,只是因为多次取样的缘故,效果上的误差变小了而已。另外,在采样次数较少的情况下(比如4 samples),原VO论文的方法在处理高复杂度的场景时效果惨不忍睹(特别是down-sample之后)。所幸从一开始就没有按照论文给出的结论来,只是借鉴了Line Sample这个概念,所以前一篇博文里面得到效果才比较对(其实也有问题)。
这里先贴几张图,具体分析和改进细节待续。
Read more »
原始的Parallax Mapping在Normal Mapping基础上,通过高度图和视线计算视差,对texcoord做位移,从而更好地表现凹凸感。而后PM发展出多种“改进”方法,大都是通过多次采样,选取最合适位移来达到更精确的效果,甚至可以表现出遮挡关系。但是每个pixel都需要做n次heightmap采样,效率上并不适合实时渲染。Parallax Occlusion Mapping、Distance Mapping都属于这种。
Shadow Mapping已经成为当前3D游戏的标配。传统SM+PCF可以很好地实现日光环境下的Hard Shadow,但如果要实现由昏暗灯光所产生的Soft Shadow,则要么效果过于生硬(sample次数少)要么效率低下(sample次数多)。因此,越来越多的游戏开始使用能够充分利用硬件特性的软阴影算法。
这里主要总结各种Soft Shadow Mapping的算法思想和推导过程,不提及实现上的细节和具体代码,等有空再写写Demo。
本文为原创内容,转载请注明出处。
Read more »
Categories
- Development (27)
- Diary (26)
- Download (5)
- Gallery (4)
- Programming (16)
- Uncategorized (6)
Archives
Tags
Meta
Recent Posts
- Microsoft Visual C++ Tips and Tricks
- Intel SSE4 Programming Reference
- Optimizing Your C/C++ Applications, Part 2
- Optimizing Your C/C++ Applications, Part 1
- Advanced Volumetric Obscurance (1)
- Volumetric Obscurance
- Parallax Mapping
- 各种Soft Shadow Mapping算法及推导过程
- Spherical Harmonics Lighting (1)
- Ocean Simulation Demo
Recent Comments
- Product Review on Fourier Transform 傅里叶变换 (4)
- Neil Musson on A与D的距离,以及问路与指路
- Roslyn Garton on 杯粪果然可以转化为力量……
- Temika Nims on 一个好玩的JavaScript程序,来把本站摧毁吧~
- music is my love on emVista Theme for Windows XP


EMAX Studio