Simple HLSL switch

Hello all,

I am trying to create a simple HLSL switch inside the custom material node. The code looks like this at the moment:

float1 output;

	case '0':
		output = shader1;
		output = shader1;

return output;

The idea is that you plug in a whole bunch of different layers and you can select which one you want to be displayed on your material instance. Rather like a static switch but with unlimited number of inputs. I have a feeling my HLSL code is quite awful and is missing some rather vital things. I have worked with HLSL very little in the past and never created a custom node before. Any help would be greatly appreciated :slight_smile:


Curious if you ever got anywhere with this.

ah shoot I was already here