Purpose:
Day to day, I work with several mainstream rendering APIs. All rendering APIs more or less do the same thing but in different ways. When you are working in DirectX11 for a while and then switch over to OpenGL Core, you may forget how to do certain things. At least I do. Therefore I write quick and dirty sample apps in various graphics APIs that accomplish one main theme. By having a handful of these sample apps around, I can quickly refresh my memory as to how to use the API. As the page name implies, these graphics samples are intended to be quick and dirty. They aren’t meant to be production quality or optimized. Memory will be leaked. Scratch that! Memory will be flooded! There will be little to no error checking. The samples are meant to be short, simple, and sweet. These samples are intended to act as a guide to get a graphics engineer up to speed with a graphics API that they are already somewhat familiar with but haven’t worked with recently.
DirectX 12
This sample demonstrates how to animate the previous sample using time and a vertex/fragment shader.Simple Animation
Vulkan
DirectX11
This sample demonstrates how to use both a geometry shader and a structured buffer. In this example, a single point will be uploaded from the CPU to the GPU. The GPU will expand that single point into a quad composed of two triangles and procedurally assign colors to each new vertex.DirectX11 Geometry Shader with a Structured Buffer
OpenGL Core
This sample demonstrates how to write your own custom MSAA resolve. The following example shades the jagged edges red. Unity's legacy renderer supported multiple light sources in the forward renderer by issuing a draw call for a single object for each light that affected the object. The first draw call will be the base draw call and all other draw calls are additively blended on top of the base draw call. Demonstrates how to make a toon shader using a stencil buffer for the silhouette. Demonstrates how to create a framebuffer object and use the color buffer attached to the frame buffer object as input into a full-screen post-processing effect. This example builds on the Stencil Buffer Effect tutorial. Demonstrates how to bind and sample from multiple textures. This sample uses assimp to load models. Demonstrates how to map data from the CPU to a buffer that lives on the GPU.OpenGL Custom MSAA Resolve
OpenGL Additive Lights
OpenGL Toon Shader Example
OpenGL Framebuffer Object Example
Multi-texturing
Mapping CPU data to a GPU Buffer