Skip to content

Commit

Permalink
fix(shader_graph): fix shader errors with time node
Browse files Browse the repository at this point in the history
  • Loading branch information
Silverlan committed Dec 24, 2024
1 parent 202e517 commit 4c5ad1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/client/src/rendering/shader_graph/nodes/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ TimeNode::TimeNode(const std::string_view &type) : Node {type}
std::string TimeNode::DoEvaluate(const pragma::shadergraph::Graph &graph, const pragma::shadergraph::GraphNode &instance) const
{
std::ostringstream code;
code << instance.GetGlslOutputDeclaration(OUT_TIME) << " = u_time.time;\n";
code << instance.GetGlslOutputDeclaration(OUT_DELTA_TIME) << " = u_time.deltaTime;\n";
code << instance.GetGlslOutputDeclaration(OUT_REAL_TIME) << " = u_time.realTime;\n";
code << instance.GetGlslOutputDeclaration(OUT_DELTA_REAL_TIME) << " = u_time.deltaRealTime;\n";
code << instance.GetGlslOutputDeclaration(OUT_TIME) << " = cur_time();\n";
code << instance.GetGlslOutputDeclaration(OUT_DELTA_TIME) << " = delta_time();\n";
code << instance.GetGlslOutputDeclaration(OUT_REAL_TIME) << " = real_time();\n";
code << instance.GetGlslOutputDeclaration(OUT_DELTA_REAL_TIME) << " = delta_real_time();\n";
return code.str();
}

0 comments on commit 4c5ad1e

Please sign in to comment.