CGBeginner

 

2012年5月26日

Introduction to my galaxy engine 5: Differed Lighting

摘要: 忙碌了好几天终于把deffered lighting做出了个雏形。其实关键就是局部灯光范围的检测。这里我是通过depth fail test和读写stencil value 来实现的。以下是每一步的截图:这幅图是将场景物体的法向量渲染到第一个render target texture的RGB值这幅图是将场景物体的projection depth渲染到第一个render target texture的Alpha值这幅图是将场景物体的diffuse color渲染到第二个render target texture的RGB值,如果有specular color的话可以写到alpha值之后就开始利用之 阅读全文

posted @ 2012-05-26 15:07 CGBeginner 阅读(975) 评论(0) 推荐(0) 编辑

导航