DirectX11 - Geometry Shader - Tree Billboards

Started by
-1 comments, last by nbertoa 11 years, 5 months ago
Hi GameDev community. I want to share my last DirectX11 application.

I implemented tree billboards in the Geometry Shader. When trees are far away, a billboarding technique is used for efficiency. That is, instead of rendering the geometry for a fully 3D tree, a quad with a picture of a 3D tree is painted on it. From a distance, you cannot tell that a billboard is being used. However, the trick is to make sure that the billboard always faces the camera (otherwise the illusion would break).

A common CPU implementation of billboards would be to use four vertices per billboard in a dynamic vertex buffer. Then every time the camera moved, the vertices would be updated on the CPU, so that the billboard face the camera. This approach must submit four vertices per billboard to the IA Stage, and requires updating dynamic vertex buffers, which has overhead. With the geometry shader approach, we can use static vertex buffers because the geometry shader does the billboard expansion and makes the billboards face the camera. Moreover, the memory footprint of the billboards is quite small, as we only have to submit one vertex per billboard to the IA stage.

WebPage: https://sites.google...ader_billboards

This topic is closed to new replies.

Advertisement