TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ OnEvaluate()

void BakeToSlotNode::OnEvaluate ( GLSLFunction function,
GLSLLine line 
)
overridevirtual

Implements SNENode.

Definition at line 5 of file BakeToSlotNode.cpp.

6{
7 if(inputPins[0]->IsLinked())
8 {
9 GLSLLine tmp("", "");
10 inputPins[0]->other->Evaluate(GetParams(function, &tmp));
11 function->AddLine(GLSLLine("textureBakeSlots[int(" + SDATA(0) + ")] = " + tmp.line + ";"));
12 line->line = tmp.line;
13 }
14 else
15 {
16 function->AddLine(GLSLLine("textureBakeSlots[int(" + SDATA(0) + ")] = vec3(0.0f);"));
17 line->line = "vec3(0.0f)";
18 }
19}