|
|
|
|
|
|
base.OnAfterDeserialize(); |
|
|
|
} |
|
|
|
|
|
|
|
protected static ShaderGraphRequirements GetRequierments(AbstractMaterialNode nodeForRequirements) |
|
|
|
protected static ShaderGraphRequirements GetRequirements(AbstractMaterialNode nodeForRequirements) |
|
|
|
{ |
|
|
|
if (nodeForRequirements == null) |
|
|
|
return ShaderGraphRequirements.none; |
|
|
|
|
|
|
|
|
|
|
surfaceInputs.AddShaderChunk("struct SurfaceInputs{", false); |
|
|
|
surfaceInputs.Indent(); |
|
|
|
var requirements = GetRequierments(node); |
|
|
|
var requirements = GetRequirements(node); |
|
|
|
ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresNormal, InterpolatorType.Normal, surfaceInputs); |
|
|
|
ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresTangent, InterpolatorType.Tangent, surfaceInputs); |
|
|
|
ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresBitangent, InterpolatorType.BiTangent, surfaceInputs); |
|
|
|