Removed ShaderUniform_[EyePosition|SceneAmbient]

Former-commit-id: 89dedaf78d86def598531f472a1a6ecd56fe8371
This commit is contained in:
Lynix
2015-01-19 00:15:01 +01:00
parent f518311223
commit c18fc4cb14
10 changed files with 63 additions and 23 deletions

View File

@@ -25,6 +25,7 @@ class NAZARA_API NzDeferredFogPass : public NzDeferredRenderPass
NzRenderStates m_states;
NzShaderRef m_shader;
NzTextureSampler m_pointSampler;
int m_shaderEyePositionLocation;
};
#endif // NAZARA_DEFERREDFOGPASS_HPP

View File

@@ -22,6 +22,18 @@ class NAZARA_API NzDeferredGeometryPass : public NzDeferredRenderPass
bool Resize(const NzVector2ui& dimensions);
protected:
struct ShaderUniforms;
const ShaderUniforms* GetShaderUniforms(const NzShader* shader) const;
struct ShaderUniforms
{
int eyePosition;
int sceneAmbient;
int textureOverlay;
};
mutable std::unordered_map<const NzShader*, ShaderUniforms> m_shaderUniforms;
NzRenderStates m_clearStates;
NzShaderRef m_clearShader;
};

View File

@@ -39,7 +39,11 @@ class NAZARA_API NzDeferredPhongLightingPass : public NzDeferredRenderPass
NzStaticMesh* m_coneMesh;
NzStaticMesh* m_sphereMesh;
bool m_lightMeshesDrawing;
int m_directionalLightShaderEyePositionLocation;
int m_directionalLightShaderSceneAmbientLocation;
int m_pointSpotLightShaderDiscardLocation;
int m_pointSpotLightShaderEyePositionLocation;
int m_pointSpotLightShaderSceneAmbientLocation;
};
#endif // NAZARA_DEFERREDPHONGLIGHTINGPASS_HPP

View File

@@ -49,6 +49,8 @@ class NAZARA_API NzForwardRenderTechnique : public NzAbstractRenderTechnique, Nz
int lightOffset; // "Distance" entre Lights[0].type et Lights[1].type
// Autre uniformes
int eyePosition;
int sceneAmbient;
int textureOverlay;
};