Saturate Node | Shader Graph | 9.0.0-preview.72
image/svg+xml
docs.unity.cn
  • Manual
  • Scripting API
  • Changelog
  • License

Shader Graph 9.0.0-preview.72

    Show / Hide Table of Contents
    • About Shader Graph
    • Getting started with Shader Graph
      • Creating a new Shader Graph Asset
      • My first Shader Graph
      • Shader Graph Window
        • Blackboard
        • Master Preview
        • Graph Inspector
      • Create Node Menu
      • Graph Settings Menu
      • Master Stack
      • Sticky Notes
      • Sub Graph
      • Color Modes
      • Precision Modes
      • Custom Function Node
      • Shader Graph Preferences
      • Samples
    • Upgrade Guides
      • Upgrade to Shader Graph 9.​0.​x
    • Inside Shader Graph
      • Shader Graph Asset
      • Graph Target
      • Sub Graph Asset
      • Node
        • Port
        • Custom Port Menu
        • Edge
      • Property Types
      • Keywords
      • Data Types
      • Precision Types
      • Port Bindings
      • Shader Stage
    • Node Library
      • Artistic
        • Adjustment
          • Channel Mixer
          • Contrast
          • Hue
          • Invert Colors
          • Replace Color
          • Saturation
          • White Balance
        • Blend
          • Blend
        • Filter
          • Dither
        • Mask
          • Channel Mask
          • Color Mask
        • Normal
          • Normal Blend
          • Normal From Height
          • Normal From Texture
          • Normal Reconstruct Z
          • Normal Strength
          • Normal Unpack
        • Utility
          • Colorspace Conversion
      • Channel
        • Combine
        • Flip
        • Split
        • Swizzle
      • Input
        • Basic
          • Boolean
          • Color
          • Constant
          • Integer
          • Slider
          • Time
          • Vector 1
          • Vector 2
          • Vector 3
          • Vector 4
        • Geometry
          • Bitangent Vector
          • Normal Vector
          • Position
          • Screen Position
          • Tangent Vector
          • UV
          • Vertex Color
          • View Direction
        • Gradient
          • Blackbody
          • Gradient
          • Sample Gradient
        • Matrix
          • Matrix 2x2
          • Matrix 3x3
          • Matrix 4x4
          • Transformation Matrix
        • PBR
          • Dielectric Specular
          • Metal Reflectance
        • Scene
          • Ambient
          • Camera
          • Fog
          • Object
          • Reflection Probe
          • Scene Color
          • Scene Depth
          • Screen
        • Texture
          • Cubemap Asset
          • Sample Cubemap
          • Sample Texture 2D
          • Sample Texture 2D Array
          • Sample Texture 2D LOD
          • Sample Texture 3D
          • Sample Virtual Texture
          • Sampler State
          • Texel Size
          • Texture 2D Array Asset
          • Texture 2D Asset
          • Texture 3D Asset
      • Math
        • Advanced
          • Absolute
          • Exponential
          • Length
          • Log
          • Modulo
          • Negate
          • Normalize
          • Posterize
          • Reciprocal
          • Reciprocal Square Root
        • Basic
          • Add
          • Divide
          • Multiply
          • Power
          • Square Root
          • Subtract
        • Derivative
          • DDX
          • DDXY
          • DDY
        • Interpolation
          • Inverse Lerp
          • Lerp
          • Smoothstep
        • Matrix
          • Matrix Construction
          • Matrix Determinant
          • Matrix Split
          • Matrix Transpose
        • Range
          • Clamp
          • Fraction
          • Maximum
          • Minimum
          • One Minus
          • Random Range
          • Remap
          • Saturate
        • Round
          • Ceiling
          • Floor
          • Round
          • Sign
          • Step
          • Truncate
        • Trigonometry
          • Arccosine
          • Arcsine
          • Arctangent
          • Arctangent2
          • Cosine
          • Degrees To Radians
          • Hyperbolic Cosine
          • Hyperbolic Sine
          • Hyperbolic Tangent
          • Radians To Degrees
          • Sine
          • Tangent
        • Vector
          • Cross Product
          • Distance
          • Dot Product
          • Fresnel Effect
          • Projection
          • Reflection
          • Rejection
          • Rotate About Axis
          • Sphere Mask
          • Transform
        • Wave
          • Noise Sine Wave
          • Sawtooth Wave
          • Square Wave
          • Triangle Wave
      • Mesh Deformation
        • Compute Deformation
        • Linear Blend Skinning
      • Procedural
        • Noise
          • Gradient Noise
          • Simple Noise
          • Voronoi
        • Shapes
          • Ellipse
          • Polygon
          • Rectangle
          • Rounded Polygon
          • Rounded Rectangle
        • Checkerboard
      • Utility
        • Logic
          • All
          • And
          • Any
          • Branch
          • Comparison
          • Is Front Face
          • Is Infinite
          • Is Na​N
          • Nand
          • Not
          • Or
        • Custom Function
        • Keyword
        • Preview
        • Sub Graph
      • UV
        • Flipbook
        • Polar Coordinates
        • Radial Shear
        • Rotate
        • Spherize
        • Tiling And Offset
        • Triplanar
        • Twirl
      • Block Nodes
        • Built In
    • Manual
    • Node Library
    • Math
    • Range
    • Saturate

    Saturate Node

    Description

    Returns the value of input In clamped between 0 and 1.

    Ports

    Name Direction Type Description
    In Input Dynamic Vector Input value
    Out Output Dynamic Vector Output value

    Generated Code Example

    The following example code represents one possible outcome of this node.

    void Unity_Saturate_float4(float4 In, out float4 Out)
    {
        Out = saturate(In);
    }
    

    对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
    In This Article
    • Description
    • Ports
    • Generated Code Example
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Thursday, October 29, 2020