Shader preprocessor, permutations #15
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm starting to have a lot of duplicate definitions in shaders, let's make a basic preprocessor in asset compiler.
I also need some way to toggle defines on and off and compile different versions of a shader, let's add a basic permutation support.
#include "header.h"
support"permutations": [{"name": "ALPHA_DISCARD", "range": 1 }]
would allow compiling a shader with#define ALPHA_DISCARD 0
and#define ALPHA_DISCARD 1
through the asset managerEnded up having a fully dynamic defines system. It's simpler and quicker to implement. Might be a problem in the future when I need to know all permutations ahead of time though.