Crystal Geometry Shader
Screenshots
Crystal Geometry Shader
The goal of this project was to create a geometry shader using HLSL shader model 4_0.
This shader generates a crystal on each triangle of the base mesh that is inserted. The Crystals are generated using a Crystal Height Map, and a large number of variables that may be adjusted.
A Crystal Height Map is a texture that's sampled to tell the Geometry Shader how what size the crystals should be; this can be done on a scale from 0 to 1, where 0 is no crystal, and 1 is the largest possible crystal.
The Variables:
Bottom & Top Radius
Spike Height Percentage
At what percentage of the Crystal the Spike starts
Overall Size Multiplier & Decrease
Spike & Base Color
Color Blendfactor
Crystal Opacity
All of this results in a very large number of possible combinations.
Possible Improvements:
The current implementation only works well on a ball, sleight further modifications would need to be made to make it work on any other mesh. Not much time was spent on the actual Material side, this could be improved drastically.
FURTHER INFO:
A paper was also written to describe the workings of the shader, and the shader was implemented in the Overlord Engine.