Hello,
After Moving to Unity 6000.0.25 i haven’t been able to reproduce all the Custom Nodes that worked on 2022 or 2023.
Just as a quick example,
if i want to create a node that return me the closest Cubemap Reflection,
this is no longer possible.
#ifndef SHADERGRAPH_PREVIEW
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
#endif
void GetCubemap_float(float3 ViewDirWS, float3 PositionWS, float3 NormalsWS, float Roughness, out float3 Cubemap)
{
#ifdef SHADERGRAPH_PREVIEW
Cubemap = 0;
#else
half3 reflectionVector = reflect(-ViewDirWS, NormalsWS);
Cubemap = GlossyEnvironmentReflection(reflectionVector, PositionWS, Roughness, 1.0, float2(0,0));
#endif
}
This is really a basic example.
EDIT
This work in Unity6 Forward Rendering.
Any idea how to make this work with Forward Plus?