feat: post-effects array parameters & add gfx.posteffects.set_array & make shadows opacity depending on clouds opacity

This commit is contained in:
MihailRis
2025-06-14 20:06:05 +03:00
parent 02a91e0b72
commit 436a89b066
14 changed files with 223 additions and 78 deletions
+19
View File
@@ -76,6 +76,25 @@ void Shader::uniform4f(const std::string& name, const glm::vec4& xyzw) {
glUniform4f(getUniformLocation(name), xyzw.x, xyzw.y, xyzw.z, xyzw.w);
}
void Shader::uniform1v(const std::string& name, int length, const int* v) {
glUniform1iv(getUniformLocation(name), length, v);
}
void Shader::uniform1v(const std::string& name, int length, const float* v) {
glUniform1fv(getUniformLocation(name), length, v);
}
void Shader::uniform2v(const std::string& name, int length, const float* v) {
glUniform2fv(getUniformLocation(name), length, v);
}
void Shader::uniform3v(const std::string& name, int length, const float* v) {
glUniform3fv(getUniformLocation(name), length, v);
}
void Shader::uniform4v(const std::string& name, int length, const float* v) {
glUniform4fv(getUniformLocation(name), length, v);
}
inline auto shader_deleter = [](GLuint* shader) {
glDeleteShader(*shader);