0
Fixed

Set / Get nodes are not working when using one variable in both Displacement nad Tesselation

Vaclav 9 aastat tagasi uuendaja Freya Holmér (Developer) 9 aastat tagasi 8

The new nodes for Get and Set aren't working when connected like this(see below).

Workaround is to make the Variable using two Set nodes, one for each of the outputs.

Interesting is, that when plugged into the Vertex offset instead of the displacement, it works.

Image 514

Vasta

Vasta
Fixed

This has now been fixed in 1.26

Ülevaatamisel

What if you connect the Variable node directly, instead of via the Get/Set? Does the same issue happen?

Both of these work

One more thing, would it be possible to show in the Get node shader properties as well ? It would make a life just a bit easier if I wouldn't have to create additional Set node, just to set the property, which is already there.

It might simply be the name of the node in that case. What if you rename "var" to something like "my_thing" ?

That breaks it, it prints error that theres undeclared identifier 'mything'.

There's a problem in the shader, that it doesn't declare the variable in the Tesselation function I believe.

SF declares it for displacement, but not tessallation.


This is how the shader code looks like, for these functions :

void displacement (inout VertexInput v){
float mything = _Variable;
float node_5526 = mything;
v.vertex.xyz += float3(node_5526,node_5526,node_5526);
}
float Tessellation(TessVertex v){
return mything;
}

What if it goes via a relay node? Variable -> Relay -> all the inputs that you have now

Nope, still the same problem. I tried all possible combinations of relaying, just to be sure.

+1

Thanks for the extra info, I'll see what I can do!

Vasta
Fixed

This has now been fixed in 1.26