Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

Shader permutation mayhem

$
0
0

Hello everyone, my question pertains to a specific problem related to shader permutation. I am aware of a lot of other posts that touched on the topic but despite reading quite a lot of them I couldn't find the solution.

So far, I have managed to implement a system that produced 192 different vertex shaders for me. Each permutation is based on the following parameters (a flag means it's taking in, processing and outputting whatever is specified):

enum SHG_VS_SETTINGS : uint32_t
{
	SHG_VS_TEXCOORDS	= (1 << 0),
	SHG_VS_NORMALS		= (1 << 1),
	SHG_VS_COLOUR		= (1 << 2),
	SHG_VS_TANGENT		= (1 << 3 | SHG_VS_NORMALS),
	SHG_VS_BITANGENT …

Viewing all articles
Browse latest Browse all 16874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>