摘要: 很多实时渲染算法中都需要用到从深度值中重建位置信息(Reconstructing position from depth),如SSAO,Deferred Shading等,其目的是用一个通道的数据重建三个通道的数据,节省宝贵的显存资源。 阅读全文
posted @ 2012-08-30 10:07 Just a Programer 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 1.Realtime lighting 常用方法 在游戏中的实时光照,一般有三种常用的办法, 1)Single-pass, multi-light(一遍渲染多个光源).For Each Object:Render object, apply all lighting in one shader.在Single-Pass光照方法中,所有光照运算都在一个shader中进行。但一个shader有指令数量的限制,所以这个技术只适用于光源数量较少的情况。在某些游戏中,只需要少量光源,例如室外白天场景,这就是个较好的选择。这个技术的缺点是不能支持光源数量较多的情况. 2)Multi-pass, mul.. 阅读全文
posted @ 2012-08-28 17:50 Just a Programer 阅读(2528) 评论(0) 推荐(0) 编辑
摘要: 本文首先介绍了场景图SceneGraph的概念,然后介绍了OGRE的场景管理器。 阅读全文
posted @ 2012-06-13 10:20 Just a Programer 阅读(2425) 评论(0) 推荐(0) 编辑
摘要: 本文介绍了OGRE的粒子系统的组成和具体的执行流程。 阅读全文
posted @ 2012-06-07 18:04 Just a Programer 阅读(3335) 评论(0) 推荐(0) 编辑
摘要: 代理模式:为其他对象提供一种代理以控制对这个对象的访问。// Proxy.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <iostream>using namespace std;class ISubject{public:virtual void doSomething() = 0;};class ConcreateSubject: public ISubject{public:virtual void doSomething(){ 阅读全文
posted @ 2011-12-02 16:26 Just a Programer 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 装饰模式, 动态地给一个对象添加一些额外的职责,就增加功能来说,装饰模式比生成子类更为灵活。// Decorator.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <iostream>using namespace std;class IComponent{public:virtual void process() = 0;};class Component : public IComponent{public:virtual voi 阅读全文
posted @ 2011-12-01 17:31 Just a Programer 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 策略模式是一种定义一系列算法的方法,从概念上来看,所有这些算法完成的都是相同的工作,只是实现不同,它可以以相同的方式调用算法,减少了各种算法类与使用算法类之间的耦合。// Strategy.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <iostream>using namespace std;class IStrategy{public:virtual void algorithmInterface()= 0;};class Str 阅读全文
posted @ 2011-11-24 16:16 Just a Programer 阅读(164) 评论(0) 推荐(0) 编辑
摘要: // Factory.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include <iostream>using namespace std;class IProduct{public:virtual void doSomething() = 0;};class ProductA: public IProduct{public:void doSomething(){std::cout<<"Product A doSomethi 阅读全文
posted @ 2011-11-22 17:01 Just a Programer 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 用户态:Ring3运行于用户态的代码则要受到处理器的诸多检查,它们只能访问映射其地址空间的页表项中规定的在用户态下可访问页面的虚拟地址,且只能对任务状态段(TSS)中I/O许可位图(I/O Permission Bitmap)中规定的可访问端口进行直接访问。 核心态:Ring0 在处理器的存储保护中,核心态,或者特权态(与之相对应的是用户态),是操作系统内核所运行的模式。运行在该模式的代码,可以无... 阅读全文
posted @ 2010-07-21 11:00 Just a Programer 阅读(7951) 评论(0) 推荐(1) 编辑
摘要: 本文简单介绍了Percentage-Closer Filtering Shadow Map、Perspective Shadow Maps、Light Space Perspective Shadow Maps、Parallel-Split Shadow Maps for Large-scale Virtual Environments、Variance Shadow Maps。 阅读全文
posted @ 2010-03-07 13:01 Just a Programer 阅读(3674) 评论(1) 推荐(2) 编辑