Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New – Surface Gradient #109

Closed
Dawie3565 opened this issue Oct 20, 2022 · 1 comment
Closed

New – Surface Gradient #109

Dawie3565 opened this issue Oct 20, 2022 · 1 comment
Milestone

Comments

@Dawie3565
Copy link
Collaborator

see SurfaceGradientResolveNormalNode.cs

using System;
using System.Collections.Generic;
using UnityEditor.ShaderGraph.GraphDelta;

namespace UnityEditor.ShaderGraph.Defs
{
internal class SurfaceGradientResolveNormalNode : IStandardNode
{
public static string Name => "SurfaceGradientResolveNormal";
public static int Version => 1;
public static FunctionDescriptor FunctionDescriptor => new(
Name,
" Out = SafeNormalize(Normal - SurfaceGradient);",
new ParameterDescriptor[]
{
new ParameterDescriptor("Normal", TYPE.Vec3, GraphType.Usage.In),
new ParameterDescriptor("SurfaceGradient", TYPE.Vec3, GraphType.Usage.In),
new ParameterDescriptor("Out", TYPE.Vec3, GraphType.Usage.Out)
}
);

    public static NodeUIDescriptor NodeUIDescriptor => new(
        Version,
        Name,
        tooltip: "Combines a base normal with a surface gradient",
        category: "Artistic/Normal",
        synonyms: new string[3] { "blend", "mix", "combine" },
        displayName: "Surface Gradient Resolve Normal",
        hasPreview: false,
        parameters: new ParameterUIDescriptor[3] {
            new ParameterUIDescriptor(
                name: "Normal",
                tooltip: "the normal to combine"
            ),
            new ParameterUIDescriptor(
                name: "SurfaceGradient",
                displayName: "Surface Gradient",
                tooltip: "the surface gradient to combine"
            ),
            new ParameterUIDescriptor(
                name: "Out",
                tooltip: "the combination of the normal and the surface gradient"
            )
        }
    );
}

}

@Dawie3565 Dawie3565 modified the milestones: ASE v1.9.1.7, ASE v1.9.1.8 Mar 28, 2023
@Dawie3565 Dawie3565 changed the title Nodes & Functions New Node – Surface Gradient New – Surface Gradient Apr 10, 2023
@Dawie3565 Dawie3565 modified the milestones: ASE v1.9.1.12, ASE v1.9.1.13 Aug 8, 2023
@diogovtx diogovtx modified the milestones: ASE v1.9.3.12, Backlog Apr 10, 2024
@Dawie3565
Copy link
Collaborator Author

close and moved to Item #347 for tracking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants