I’ve been reading these great series for c++ programmers who work on rendering:
I’m starting to miss the point of them…
Can we create a simple vertex shader assigned to a material the same way unity does?
I’ve been told 99% of fragment shaders (aka pixel shaders but wrong name) can be done via the Material Editor… can we create vertex shaders too ?
You can’t create a vertex shader in material editor, but you can force a part of material graph to be calculated in vertex shader by using vertex interpolator material expression.
how would one use the vertex interpolator inside a custom node? Id like to calculate some stuff in the vertex shader and some stuff in the pixel shader, within a custom code snippet.
you would not do that, nope. When you have custom node connected to outputs that are evaluated in both vertex and pixel shader, you can separate the code inside by using #if VERTEXSHADER preprocessor directive, with a small remark that this might not work for nanite.