Community Tutorial: New shading models and changing the GBuffer

I’m also curious, sir. Have you solved the problem? :face_holding_back_tears:

In Main Branch,5.6 . GBuffer is used NoBindingRes ,

it has

RenderTargetBindingSlots needs to be same size on all platforms.

how to fix it, where its in the code.

please.

@0ne3y3, Could you please share the whole code in github (like fork from the original UE repository and then add the modifications) ?
I would like to see the results with anime character.
Thank you very much

Got it working! Thank you so much for this tutorial!

Running into an issue in 5.6; I am creating moving my very old retroreflection CSM to 5.6, and I saw your tutorial covered a few things that were the bane of my existence back in the day – custom GBuffer and a custom material output node. Thank you SO much for this btw! I thought Epic had hit the limit on custom GBuffer outputs back when I tried when I was working at QIS. So happy to know it’s not only possible, but still is, I was just doing it wrong haha. Anywho, I followed all of the steps to add the custom output to the material graph, even adding the new custom output to the material attribute map, however I was getting the error:

2 Shader compiler errors compiling TestRR for platform PCD3D_SM6:
V:\git\UnrealEngine\Engine\Shaders\Private\MaterialTemplate.ush(4119,9): Shader TBasePassPSFNoLightMapPolicy, Permutation 0, VF FLocalVertexFactory:
/Engine/Generated/Material.ush:4119:9: error: no matching function for call to ‘GetRetroreflection0’
return GetRetroreflection0(PixelMaterialInputs);

As it turns out – 5.6 includes both PixelMaterialInputs which is used to get CustomData outputs and the older MaterialParameters, which this new custom output node still requires. You should make a note in the tutorial, if you are trying to do something similar on later versions of UE5, beware of this, and this is most likely subject to change as Epic makes changes to the material parameter systems.
You should also update the tutorial to include adding the custom output to the material attributes map, which requires generating a new unique GUID for the custom output. Similar to this:

// Retroreflection custom output

AddCustomAttribute(FGuid(0x7b810e32, 0x9b313f9b, 0x9c54353c, 0x008c8638), UMaterialExpressionRetroreflectionCustomOutput::StaticClass(), "Retroreflection", "GetRetroreflection", 0, MCT_Float4, FVector4(0, 0, 1, 0), SF_Pixel);

On another note - when I try to preview the custom output in material graph, it errors out with this unique gem:

Nowhere do I have it even remotely close to being attached to EmissiveColor. lol

Edit: I just realized, duh, previewing the node makes it preview on an unlit material, so of course its trying to output to emissivecolor. huh… Wonder how I can work around that.