I'm learning HLSL and I was hoping to use it to help me make a material in UDK. I'm trying to get a simple switch case to work in a custom material node, and even though I'm using the official HLSL reference, I can't seem to get it to work.
The image doesn't seem to be working here. Open it on a new tab or
click here
Replies
Also try changing the default value from {0,0,0,0}; to simply
I plugged in your code and it seems to work. It might be because I didn't have decimal points in my float? Do I need the "f" after a float value?
No... Definitely works on my end :P
Here it is slightly different, in case you want 0 to be the default value...
And no, you don't need the decimal or the 'f' at the end. It's just a habit I have carried over from programming :P