So, I am trying to get a custom node working with tessellation, and although I searched through google, I cannot seem to get this working.
I am getting errors al over and just don’t get what to do with it…the code works when I plug into diffuse or spec only.
Any help would be very helpful. (or an alternative way to do loops within the material editor)
regards! Tom
(i disabled the loop to check where this goes wrong…)
float3 uvs = worldposition / tile;
/*
uvs += vertexnormalws * 0;
float3 _hold = Texture2DSample(txt, txtSampler, uvs.rg);
float3 _prevhold = _hold;
for(int i = 0; i < counter; i++){
uvs += vertexnormalws * -(i*(1/counter));
_hold = max(_hold, Texture2DSample(txt, txtSampler, uvs.rg));
}
*/
return Texture2DSample(txt, txtSampler, uvs.rg);