Search Unity

[2019.3.b8] Alpha gradient is opaque

Discussion in 'Shader Graph' started by StarChick971, Nov 6, 2019.

  1. StarChick971

    StarChick971

    Joined:
    Nov 28, 2015
    Posts:
    118
    Hello,

    I was following this video tutorial from Brackeys to reproduce the intersection effect where the gradient fades the borders of the sphere:


    Instead, I don't see the gradient alpha which should be fading out the sphere from the intersection to its center. I only get an opaque border rather than gradient:
    upload_2019-11-6_17-45-16.png

    Perhaps I did something wrong but I think I carefully followed the tutorial step-by-step but with the same result at the end.
    My goal is to make a foam effect on a water surface afterward...
    Thank you.
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Are you sure that the material type is set to transparent?
    This looks líke the cutoff when its set to opaque.
     
  3. StarChick971

    StarChick971

    Joined:
    Nov 28, 2015
    Posts:
    118
    Yes it is:
    upload_2019-11-7_22-2-44.png
    I think...
     
  4. StarChick971

    StarChick971

    Joined:
    Nov 28, 2015
    Posts:
    118
    Hum I changed also AlphaClipThreshold to 0, but still the same... I am wondering if URP is set correctly...
     
  5. StarChick971

    StarChick971

    Joined:
    Nov 28, 2015
    Posts:
    118
    I started from an empty project, then reproduced the field shader, then saved the graph which I copied inot my previous project...it works.
    Investigating my first shader test-project, I noticed some warnings & errors in the console:
    1 Error:

    Shader error in 'Shader Graphs/Skirt': redefinition of 'unity_Builtins2Array' at /Project/Test-Unity/Library/PackageCache/com.unity.render-pipelines.universal@7.1.2/ShaderLibrary/UnityInput.hlsl(114) (on d3d11)

    Warnings:
    Shader warning in 'Shader Graphs/Skirt': 'UNITY_MATRIX_M' : macro redefinition at /Project/Test-Unity/Library/PackageCache/com.unity.render-pipelines.universal@7.1.2/ShaderLibrary/Input.hlsl(63) (on d3d11)


    Shader warning in 'Shader Graphs/Skirt': 'UNITY_MATRIX_I_M' : macro redefinition at /Project/Test-Unity/Library/PackageCache/com.unity.render-pipelines.universal@7.1.2/ShaderLibrary/Input.hlsl(64) (on d3d11)


    Shader warning in 'Shader Graphs/Skirt': Output value 'vert' is not completely initialized at Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/PBRForwardPass.hlsl(18) (on d3d11)

    Compiling Vertex program with _ADDITIONAL_LIGHTS
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING