bool CustomVertexLerpShader::Initialize(GraphicsDevice *graphicsDevice, const Text *vertexShaderSource, const Text *fragmentShaderSource) { if (!VertexLerpShader::Initialize(graphicsDevice, vertexShaderSource, fragmentShaderSource)) return false; ASSERT(HasUniform(GetModelViewMatrixUniform()) == true); ASSERT(HasUniform(GetProjectionMatrixUniform()) == true); ASSERT(HasUniform(GetLerpUniform()) == true); return true; }
void Shader::ValidateUniforms() { if (!HasUniform(SHADER_UNIFORM_PROJECTION_MATRIX_NAME)) SP_WARN(m_Name, " shader does not contain pr_matrix uniform."); if (!HasUniform(SHADER_UNIFORM_VIEW_MATRIX_NAME)) SP_WARN(m_Name, " shader does not contain vw_matrix uniform."); if (!HasUniform(SHADER_UNIFORM_MODEL_MATRIX_NAME)) SP_WARN(m_Name, " shader does not contain ml_matrix uniform."); SP_INFO(m_Name, " shader successfully validated."); }