nodes: made changes to the node system to allow for context sensitive shader code

Primarily implemented for the math node so a new shader can be generated and
compiled based on what inputs the node is receiving.
This commit is contained in:
itsmattkc
2020-03-29 03:11:30 +11:00
parent 52acb272bf
commit 7100d00060
20 changed files with 209 additions and 56 deletions
+4 -4
View File
@@ -45,17 +45,17 @@ NodeInput *VideoInput::matrix_input() const
return matrix_input_;
}
bool VideoInput::IsAccelerated() const
Node::Capabilities VideoInput::GetCapabilities(const NodeValueDatabase &) const
{
return true;
return kShader;
}
QString VideoInput::AcceleratedCodeVertex() const
QString VideoInput::ShaderVertexCode(const NodeValueDatabase&) const
{
return ReadFileAsString(":/shaders/videoinput.vert");
}
QString VideoInput::AcceleratedCodeFragment() const
QString VideoInput::ShaderFragmentCode(const NodeValueDatabase&) const
{
return ReadFileAsString(":/shaders/videoinput.frag");
}