Factor shadow constants out of MainShaderConstantSetter

This commit is contained in:
sfan5
2024-02-20 10:38:29 +01:00
parent 5da18d34ba
commit e9ab5bc223
6 changed files with 118 additions and 81 deletions

View File

@@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class ShadowDepthShaderCB;
class shadowScreenQuad;
class shadowScreenQuadCB;
class IWritableShaderSource;
enum E_SHADOW_MODE : u8
{
@@ -54,9 +55,13 @@ class ShadowRenderer
static const int TEXTURE_LAYER_SHADOW = 3;
ShadowRenderer(IrrlichtDevice *device, Client *client);
~ShadowRenderer();
// Call before generating any shaders
// This is required because this class is initialized much later than all
// the shaders are dealt with.
static void preInit(IWritableShaderSource *shsrc);
void initialize();
/// Adds a directional light shadow map (Usually just one (the sun) except in