Graphics/Shader: Make texture units statics

Provides better performances and prevents the sampler type bug to happen
This commit is contained in:
Lynix
2016-12-18 01:13:46 +01:00
parent 1a8805aad1
commit 682dab32b3
10 changed files with 203 additions and 183 deletions

View File

@@ -46,7 +46,7 @@ namespace Nz
void DrawTransparentModels(const SceneData& sceneData, ForwardRenderQueue::Layer& layer) const;
const ShaderUniforms* GetShaderUniforms(const Shader* shader) const;
void OnShaderInvalidated(const Shader* shader) const;
void SendLightUniforms(const Shader* shader, const LightUniforms& uniforms, unsigned int index, unsigned int uniformOffset, UInt8 availableTextureUnit) const;
void SendLightUniforms(const Shader* shader, const LightUniforms& uniforms, unsigned int index, unsigned int lightIndex, unsigned int uniformOffset) const;
static float ComputeDirectionalLightScore(const Spheref& object, const AbstractRenderQueue::DirectionalLight& light);
static float ComputePointLightScore(const Spheref& object, const AbstractRenderQueue::PointLight& light);