Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
xgalaxy
Jan 27, 2004
i write code
This is why I can’t wait for FBX to die off.
If you can... change to GLTF format.

Adbot
ADBOT LOVES YOU

xgalaxy
Jan 27, 2004
i write code
Kind of a long shot.

Does anyone know how the Material Graph in Unreal Engine works?
I’m assuming a graph gets "cooked" into a shader + textures but I can’t seem to find where in the code this happens.

For example in another engine I know that has a much less sophisticated material graph each node actually corresponds to a "template" (for lack of a better term) of shader code and when the graph gets cooked for release it just compiles together each node into a single shader text file and then compiles that to spirv or whatever platform shader byte code. In other words each node is just some text and it walks the graph and concats the text together (albeit it’s a bit more complicated then that). But this doesn’t appear to be how Unreal does it.

EDIT:
Was able to find what I was looking for in:
- Source/Runtime/Engine/Private/Materials
- Shaders/Private/MaterialTemplate.ush

xgalaxy fucked around with this message at 17:05 on May 25, 2022

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply