I’m an artist. I can ‘code’ a bit but only to the extent of getting the job done. I use visual-scripting and blueprints for absolutely everything I do.
I have tried to learn ‘pure’ coding, c#, etc. I got fairly far with javascript but not anything else. At this point, I’ve come to the accepting and undeniable fact that It’s just not how my mind works.
I am attempting to get the 90 degree threshold Step Shader, used in Guilty Gear Xrd and Xrd Revelator going inside a UE4 project. I want to do this so I can practice more-so from the asset set-up perspective.
I’ve watched the GDC video enough to memorize it. I understand in full why the shader works but I don’t know enough about HLSL to determine if they literally provided the code or not.
Here is the explanation they provided in the GDC video:
"Generic step(Threshold, dot(Light, Normal))
- Determine if a surface is lit or not.
If the surface Normal is facing the Light source, it is lit.
If it is facing away more than 90dg (the threshold), it is not lit."
Am I to take this to mean that the ‘code’ is quite literally?
“generic step(Threshold, dot(Light, Normal))”?
If so does it need a semi-colon on the end of it?
Example: “generic step(Threshold, dot(Light, Normal);”
How would I indicate the 90-degree threshold? Do I do that in the code? Or through a ‘node’ in the blueprint? both?
Quite literally all I am looking for is the proper syntax for an HLSL shader in which you indicate whether a surface normal is lit or not and whether or not the light source is head on, or more than 90 degrees away. Just as their explanation states it should work.
Alternatively, can this exact same thing be accomplished with a blueprint? Because I understand blueprints so I’m totally open to being given a few reference links.
I can handle every single aspect of the asset set up (vertex colors, etc) on my own. but I simply cannot understand HLSL and the supporting documentation does not serve to explain how multiple parts work together (it’s not friendly to a non-programmer)
Thanks for taking the time to read this. Hopefully someone can provide guidance. Have an awesome day.