mirror of
https://github.com/antopilo/Nuake.git
synced 2026-01-03 14:09:46 +03:00
More work
This commit is contained in:
@@ -269,6 +269,17 @@ namespace Nuake
|
||||
Shader* shader = ShaderManager::GetShader("Resources/Shaders/outline.shader");
|
||||
shader->Bind();
|
||||
|
||||
//mGBuffer->GetTexture(GL_COLOR_ATTACHMENT3)->Bind(0);
|
||||
//mGBuffer->GetTexture(GL_DEPTH_ATTACHMENT)->Bind(1);
|
||||
//shader->SetUniforms(
|
||||
//{
|
||||
// {"u_EntityID", mOutlineEntityID == -1 ? -1 : mOutlineEntityID + 1},
|
||||
// {"u_EntityTexture", 0},
|
||||
// {"u_OutlineColor", projectSettings.PrimaryColor},
|
||||
// {"u_Depth", 1},
|
||||
// {"u_Radius", projectSettings.OutlineRadius * projectSettings.ResolutionScale},
|
||||
//});
|
||||
|
||||
shader->SetUniform("u_EntityID", mOutlineEntityID == -1 ? -1 : mOutlineEntityID + 1);
|
||||
shader->SetUniform("u_EntityTexture", mGBuffer->GetTexture(GL_COLOR_ATTACHMENT3).get(), 0);
|
||||
shader->SetUniform("u_OutlineColor", projectSettings.PrimaryColor);
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Nuake
|
||||
Source = ParseShader(fileContent);
|
||||
programId = CreateProgram(Source);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Logger::Log("Shader source file not found: " + filePath, "shader", CRITICAL);
|
||||
@@ -378,7 +378,7 @@ namespace Nuake
|
||||
|
||||
void Shader::SetUniform(const std::string& name, bool value)
|
||||
{
|
||||
SetUniform(name, value);
|
||||
SetUniform(name, static_cast<int>(value));
|
||||
}
|
||||
|
||||
void Shader::SetUniform(uint32_t uniformSlot, int value)
|
||||
|
||||
@@ -130,22 +130,23 @@ namespace Nuake
|
||||
void SetUniforms(const std::vector<UniformVariable>& uniforms);
|
||||
|
||||
void SetUniform(const std::string& name, float v0);
|
||||
void SetUniform(const std::string& name, float v0, float v1);
|
||||
void SetUniform(const std::string& name, float v0, float v1, float v3);
|
||||
void SetUniform(const std::string& name, float v0, float v1, float v3, float v4);
|
||||
void SetUniform(const std::string& name, int v0);
|
||||
void SetUniform(const std::string& name, unsigned int v0);
|
||||
void SetUniform(const std::string& name, float v0, float v1);
|
||||
void SetUniformv(const std::string& name, int size, int* value);
|
||||
void SetUniform(const std::string& name, Vector2 v0);
|
||||
void SetUniform(const std::string& name, float v0, float v1, float v3);
|
||||
void SetUniform(const std::string& name, Vector3 v0);
|
||||
void SetUniform(const std::string& name, float v0, float v1, float v3, float v4);
|
||||
void SetUniform(const std::string& name, Vector4 v0);
|
||||
void SetUniform(const std::string& name, Matrix3 v0);
|
||||
void SetUniform(const std::string& name, Matrix4 v0);
|
||||
void SetUniformv(const std::string& name, int size, int* value);
|
||||
void SetUniform(const std::string& name, int size, float* value);
|
||||
void SetUniform(const std::string& name, bool value);
|
||||
void SetUniform(const std::string& name, Texture* texture, uint32_t slot = 0);
|
||||
|
||||
void SetUniform(uint32_t uniformSlot, int value);
|
||||
void SetUniform(uint32_t uniformSlot, Matrix4 value);
|
||||
void SetUniform(const std::string& name, Texture* texture, uint32_t slot);
|
||||
|
||||
int FindUniformLocation(std::string uniform);
|
||||
|
||||
|
||||
0
Resources/Shaders/ui_panel.shader
Normal file
0
Resources/Shaders/ui_panel.shader
Normal file
Reference in New Issue
Block a user