SimpleURPToonLitOutlineExample icon indicating copy to clipboard operation
SimpleURPToonLitOutlineExample copied to clipboard

Is it possible to convert this shader into a standard shader graph?

Open ReForge-Mode opened this issue 2 years ago • 3 comments

Since shader graph is now supported for non-URP project, I've been trying to convert this URP shader into a non-URP shader graph. But I keep encountering error with the custom node in the shader graph.

Before I proceed even further, is it even possible to have this shader as a shader graph for non-URP project?

ReForge-Mode avatar Nov 23 '22 17:11 ReForge-Mode

Assets\SimplestarGame\SimpleURPToonLitOutlineExample\Resources\Unity-Technologies\ShaderGraph-Custom-Lighting\Includes\CustomLighting.hlsl

#ifndef CUSTOM_LIGHTING_INCLUDED
#define CUSTOM_LIGHTING_INCLUDED

#define SHADERGRAPH_PREVIEW // added line

void MainLight_float(float3 WorldPos, out float3 Direction, out float3 Color, out float DistanceAtten, out float ShadowAtten)

I was able to resolve the build error, but I will not support it until Built-in since it has been built for URP.

simplestargame avatar Nov 27 '22 02:11 simplestargame

I see. I'm not too familiar with shader programming. I'm more of a shader graph guy. So this should be a good challenge for me to take.

Would you mind if I ask a thing or two if I found some errors along the way?

ReForge-Mode avatar Nov 27 '22 03:11 ReForge-Mode

It is my understanding that there is indeed shader code that works with both... but the shader code in this repository will not work without a drastic fix. I think it is a difficult task to tackle.

I am not sure I can answer your question.

simplestargame avatar Nov 27 '22 15:11 simplestargame