Search Unity

Question How does the Ambient node work??

Discussion in 'Shader Graph' started by noio, Oct 14, 2019.

  1. noio

    noio

    Joined:
    Dec 17, 2013
    Posts:
    231
    I made a simple Shader Graph that is just supposed to reflect the ambient color, set to Gradient in the Lighting Inspector.



    The graph just takes the Ambient Node and lerps depending on the normal direction.



    I have added this node to two Shader Graphs, one Unlit and one PBR (output into the emission slot). This is the Expected Result when viewed in the Unity Editor: (at least what I would expect..)



    However, when building to iOS the objects that are supposed to reflect the ambient lighting are completely black.





    I did read that the behavior of the Ambient node is defined differently depending on the render pipeline, but I don't understand how the result can be completely black.




    Edit: After doing some digging, I saw this post mentioning reflection probes. So I added a reflection probe to the scene, the result of which is that now the objects are black in the Editor as well.

     
    Last edited: Oct 14, 2019
  2. noio

    noio

    Joined:
    Dec 17, 2013
    Posts:
    231
    Looking at the Frame Debugger, I see that unity_AmbientSky, unity_AmbientEquator and unity_AmbientGround are being passed, but they're all 0.

     
  3. noio

    noio

    Joined:
    Dec 17, 2013
    Posts:
    231
    Anyone? Apologies for bumping..

    Is this a bug or is this intended behavior?
     
  4. zacharyd890

    zacharyd890

    Unity Technologies

    Joined:
    Apr 18, 2018
    Posts:
    6
    Hello,

    As the documentation states "A Node might be defined in one Render Pipeline and undefined in the other. If this Node is undefined, it returns 0 (black)." which is why you are seeing black. However, it should be working in Universal RP. If you're using URP, then we would appreciate if you file a bug report :).
     
  5. noio

    noio

    Joined:
    Dec 17, 2013
    Posts:
    231
    Yes, this was in URP! The behavior is also inconsistent between platforms (editor/iOS build) and it's weird that adding a reflection probe alters the behavior.

    I'll repro it in a sandbox scene and file a bug report.
     
  6. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,165
    I have search the code in PackageCache of
    com.unity.render-pipelines.core@7.2.0
    com.unity.render-pipelines.universal@7.2.0
    and
    com.unity.shadergraph@7.2.0
    But there was nowhere
    RenderSettings.ambientSkyColor
    or even
    RenderSettings.ambientMode
    was used in the project

    I then try to hacked by fixing
    com.unity.render-pipelines.universal@7.2.0\Runtime\ForwardLights.cs
    like this

    https://gist.github.com/Thaina/79fd5bd25f47344aac04865b42a568fd

    Code (CSharp):
    1.  
    2. using UnityEngine.Experimental.GlobalIllumination;
    3. using Unity.Collections;
    4.  
    5. namespace UnityEngine.Rendering.Universal.Internal
    6. {
    7.     /// <summary>
    8.     /// Computes and submits lighting data to the GPU.
    9.     /// </summary>
    10.     public class ForwardLights
    11.     {
    12.         static class LightConstantBuffer
    13.         {
    14. #region AmbientFix
    15.             public static int _AmbientSky;
    16.             public static int _AmbientEquator;
    17.             public static int _AmbientGround;
    18. #endregion
    19.             public static int _MainLightPosition;
    20.             public static int _MainLightColor;
    21.  
    22.             public static int _AdditionalLightsCount;
    23.             public static int _AdditionalLightsPosition;
    24.             public static int _AdditionalLightsColor;
    25.             public static int _AdditionalLightsAttenuation;
    26.             public static int _AdditionalLightsSpotDir;
    27.  
    28.             public static int _AdditionalLightOcclusionProbeChannel;
    29.         }
    30.  
    31.         int m_AdditionalLightsBufferId;
    32.         int m_AdditionalLightsIndicesId;
    33.  
    34.         const string k_SetupLightConstants = "Setup Light Constants";
    35.         MixedLightingSetup m_MixedLightingSetup;
    36.  
    37.         // Holds light direction for directional lights or position for punctual lights.
    38.         // When w is set to 1.0, it means it's a punctual light.
    39.         Vector4 k_DefaultLightPosition = new Vector4(0.0f, 0.0f, 1.0f, 0.0f);
    40.         Vector4 k_DefaultLightColor = Color.black;
    41.  
    42.         // Default light attenuation is setup in a particular way that it causes
    43.         // directional lights to return 1.0 for both distance and angle attenuation
    44.         Vector4 k_DefaultLightAttenuation = new Vector4(0.0f, 1.0f, 0.0f, 1.0f);
    45.         Vector4 k_DefaultLightSpotDirection = new Vector4(0.0f, 0.0f, 1.0f, 0.0f);
    46.         Vector4 k_DefaultLightsProbeChannel = new Vector4(-1.0f, 1.0f, -1.0f, -1.0f);
    47.  
    48.         Vector4[] m_AdditionalLightPositions;
    49.         Vector4[] m_AdditionalLightColors;
    50.         Vector4[] m_AdditionalLightAttenuations;
    51.         Vector4[] m_AdditionalLightSpotDirections;
    52.         Vector4[] m_AdditionalLightOcclusionProbeChannels;
    53.  
    54.         bool m_UseStructuredBuffer;
    55.  
    56.         public ForwardLights()
    57.         {
    58.             m_UseStructuredBuffer = RenderingUtils.useStructuredBuffer;
    59. #region AmbientFix
    60.             LightConstantBuffer._AmbientSky = Shader.PropertyToID("unity_AmbientSky");
    61.             LightConstantBuffer._AmbientEquator = Shader.PropertyToID("unity_AmbientEquator");
    62.             LightConstantBuffer._AmbientGround = Shader.PropertyToID("unity_AmbientGround");
    63. #endregion
    64.             LightConstantBuffer._MainLightPosition = Shader.PropertyToID("_MainLightPosition");
    65.             LightConstantBuffer._MainLightColor = Shader.PropertyToID("_MainLightColor");
    66.             LightConstantBuffer._AdditionalLightsCount = Shader.PropertyToID("_AdditionalLightsCount");
    67.  
    68.             if (m_UseStructuredBuffer)
    69.             {
    70.                 m_AdditionalLightsBufferId = Shader.PropertyToID("_AdditionalLightsBuffer");
    71.                 m_AdditionalLightsIndicesId = Shader.PropertyToID("_AdditionalLightsIndices");
    72.             }
    73.             else
    74.             {
    75.                 LightConstantBuffer._AdditionalLightsPosition = Shader.PropertyToID("_AdditionalLightsPosition");
    76.                 LightConstantBuffer._AdditionalLightsColor = Shader.PropertyToID("_AdditionalLightsColor");
    77.                 LightConstantBuffer._AdditionalLightsAttenuation = Shader.PropertyToID("_AdditionalLightsAttenuation");
    78.                 LightConstantBuffer._AdditionalLightsSpotDir = Shader.PropertyToID("_AdditionalLightsSpotDir");
    79.                 LightConstantBuffer._AdditionalLightOcclusionProbeChannel = Shader.PropertyToID("_AdditionalLightsOcclusionProbes");
    80.  
    81.                 int maxLights = UniversalRenderPipeline.maxVisibleAdditionalLights;
    82.                 m_AdditionalLightPositions = new Vector4[maxLights];
    83.                 m_AdditionalLightColors = new Vector4[maxLights];
    84.                 m_AdditionalLightAttenuations = new Vector4[maxLights];
    85.                 m_AdditionalLightSpotDirections = new Vector4[maxLights];
    86.                 m_AdditionalLightOcclusionProbeChannels = new Vector4[maxLights];
    87.             }
    88.         }
    89.  
    90.         public void Setup(ScriptableRenderContext context, ref RenderingData renderingData)
    91.         {
    92.             int additionalLightsCount = renderingData.lightData.additionalLightsCount;
    93.             bool additionalLightsPerVertex = renderingData.lightData.shadeAdditionalLightsPerVertex;
    94.             CommandBuffer cmd = CommandBufferPool.Get(k_SetupLightConstants);
    95.             SetupShaderLightConstants(cmd, ref renderingData);
    96.  
    97.             CoreUtils.SetKeyword(cmd, ShaderKeywordStrings.AdditionalLightsVertex,
    98.                 additionalLightsCount > 0 && additionalLightsPerVertex);
    99.             CoreUtils.SetKeyword(cmd, ShaderKeywordStrings.AdditionalLightsPixel,
    100.                 additionalLightsCount > 0 && !additionalLightsPerVertex);
    101.             CoreUtils.SetKeyword(cmd, ShaderKeywordStrings.MixedLightingSubtractive,
    102.                 renderingData.lightData.supportsMixedLighting &&
    103.                 m_MixedLightingSetup == MixedLightingSetup.Subtractive);
    104.             context.ExecuteCommandBuffer(cmd);
    105.             CommandBufferPool.Release(cmd);
    106.         }
    107.  
    108.         void InitializeLightConstants(NativeArray<VisibleLight> lights, int lightIndex, out Vector4 lightPos, out Vector4 lightColor, out Vector4 lightAttenuation, out Vector4 lightSpotDir, out Vector4 lightOcclusionProbeChannel)
    109.         {
    110.             lightPos = k_DefaultLightPosition;
    111.             lightColor = k_DefaultLightColor;
    112.             lightAttenuation = k_DefaultLightAttenuation;
    113.             lightSpotDir = k_DefaultLightSpotDirection;
    114.             lightOcclusionProbeChannel = k_DefaultLightsProbeChannel;
    115.  
    116.             // When no lights are visible, main light will be set to -1.
    117.             // In this case we initialize it to default values and return
    118.             if (lightIndex < 0)
    119.                 return;
    120.  
    121.             VisibleLight lightData = lights[lightIndex];
    122.             if (lightData.lightType == LightType.Directional)
    123.             {
    124.                 Vector4 dir = -lightData.localToWorldMatrix.GetColumn(2);
    125.                 lightPos = new Vector4(dir.x, dir.y, dir.z, 0.0f);
    126.             }
    127.             else
    128.             {
    129.                 Vector4 pos = lightData.localToWorldMatrix.GetColumn(3);
    130.                 lightPos = new Vector4(pos.x, pos.y, pos.z, 1.0f);
    131.             }
    132.  
    133.             // VisibleLight.finalColor already returns color in active color space
    134.             lightColor = lightData.finalColor;
    135.  
    136.             // Directional Light attenuation is initialize so distance attenuation always be 1.0
    137.             if (lightData.lightType != LightType.Directional)
    138.             {
    139.                 // Light attenuation in universal matches the unity vanilla one.
    140.                 // attenuation = 1.0 / distanceToLightSqr
    141.                 // We offer two different smoothing factors.
    142.                 // The smoothing factors make sure that the light intensity is zero at the light range limit.
    143.                 // The first smoothing factor is a linear fade starting at 80 % of the light range.
    144.                 // smoothFactor = (lightRangeSqr - distanceToLightSqr) / (lightRangeSqr - fadeStartDistanceSqr)
    145.                 // We rewrite smoothFactor to be able to pre compute the constant terms below and apply the smooth factor
    146.                 // with one MAD instruction
    147.                 // smoothFactor =  distanceSqr * (1.0 / (fadeDistanceSqr - lightRangeSqr)) + (-lightRangeSqr / (fadeDistanceSqr - lightRangeSqr)
    148.                 //                 distanceSqr *           oneOverFadeRangeSqr             +              lightRangeSqrOverFadeRangeSqr
    149.  
    150.                 // The other smoothing factor matches the one used in the Unity lightmapper but is slower than the linear one.
    151.                 // smoothFactor = (1.0 - saturate((distanceSqr * 1.0 / lightrangeSqr)^2))^2
    152.                 float lightRangeSqr = lightData.range * lightData.range;
    153.                 float fadeStartDistanceSqr = 0.8f * 0.8f * lightRangeSqr;
    154.                 float fadeRangeSqr = (fadeStartDistanceSqr - lightRangeSqr);
    155.                 float oneOverFadeRangeSqr = 1.0f / fadeRangeSqr;
    156.                 float lightRangeSqrOverFadeRangeSqr = -lightRangeSqr / fadeRangeSqr;
    157.                 float oneOverLightRangeSqr = 1.0f / Mathf.Max(0.0001f, lightData.range * lightData.range);
    158.  
    159.                 // On mobile: Use the faster linear smoothing factor.
    160.                 // On other devices: Use the smoothing factor that matches the GI.
    161.                 lightAttenuation.x = Application.isMobilePlatform ? oneOverFadeRangeSqr : oneOverLightRangeSqr;
    162.                 lightAttenuation.y = lightRangeSqrOverFadeRangeSqr;
    163.             }
    164.  
    165.             if (lightData.lightType == LightType.Spot)
    166.             {
    167.                 Vector4 dir = lightData.localToWorldMatrix.GetColumn(2);
    168.                 lightSpotDir = new Vector4(-dir.x, -dir.y, -dir.z, 0.0f);
    169.  
    170.                 // Spot Attenuation with a linear falloff can be defined as
    171.                 // (SdotL - cosOuterAngle) / (cosInnerAngle - cosOuterAngle)
    172.                 // This can be rewritten as
    173.                 // invAngleRange = 1.0 / (cosInnerAngle - cosOuterAngle)
    174.                 // SdotL * invAngleRange + (-cosOuterAngle * invAngleRange)
    175.                 // If we precompute the terms in a MAD instruction
    176.                 float cosOuterAngle = Mathf.Cos(Mathf.Deg2Rad * lightData.spotAngle * 0.5f);
    177.                 // We neeed to do a null check for particle lights
    178.                 // This should be changed in the future
    179.                 // Particle lights will use an inline function
    180.                 float cosInnerAngle;
    181.                 if (lightData.light != null)
    182.                     cosInnerAngle = Mathf.Cos(lightData.light.innerSpotAngle * Mathf.Deg2Rad * 0.5f);
    183.                 else
    184.                     cosInnerAngle = Mathf.Cos((2.0f * Mathf.Atan(Mathf.Tan(lightData.spotAngle * 0.5f * Mathf.Deg2Rad) * (64.0f - 18.0f) / 64.0f)) * 0.5f);
    185.                 float smoothAngleRange = Mathf.Max(0.001f, cosInnerAngle - cosOuterAngle);
    186.                 float invAngleRange = 1.0f / smoothAngleRange;
    187.                 float add = -cosOuterAngle * invAngleRange;
    188.                 lightAttenuation.z = invAngleRange;
    189.                 lightAttenuation.w = add;
    190.             }
    191.  
    192.             Light light = lightData.light;
    193.  
    194.             // Set the occlusion probe channel.
    195.             int occlusionProbeChannel = light != null ? light.bakingOutput.occlusionMaskChannel : -1;
    196.  
    197.             // If we have baked the light, the occlusion channel is the index we need to sample in 'unity_ProbesOcclusion'
    198.             // If we have not baked the light, the occlusion channel is -1.
    199.             // In case there is no occlusion channel is -1, we set it to zero, and then set the second value in the
    200.             // input to one. We then, in the shader max with the second value for non-occluded lights.
    201.             lightOcclusionProbeChannel.x = occlusionProbeChannel == -1 ? 0f : occlusionProbeChannel;
    202.             lightOcclusionProbeChannel.y = occlusionProbeChannel == -1 ? 1f : 0f;
    203.  
    204.             // TODO: Add support to shadow mask
    205.             if (light != null && light.bakingOutput.mixedLightingMode == MixedLightingMode.Subtractive && light.bakingOutput.lightmapBakeType == LightmapBakeType.Mixed)
    206.             {
    207.                 if (m_MixedLightingSetup == MixedLightingSetup.None && lightData.light.shadows != LightShadows.None)
    208.                 {
    209.                     m_MixedLightingSetup = MixedLightingSetup.Subtractive;
    210.                 }
    211.             }
    212.         }
    213.  
    214.         void SetupShaderLightConstants(CommandBuffer cmd, ref RenderingData renderingData)
    215.         {
    216.             m_MixedLightingSetup = MixedLightingSetup.None;
    217.  
    218.             // Main light has an optimized shader path for main light. This will benefit games that only care about a single light.
    219.             // Universal pipeline also supports only a single shadow light, if available it will be the main light.
    220.             SetupMainLightConstants(cmd, ref renderingData.lightData);
    221.             SetupAdditionalLightConstants(cmd, ref renderingData);
    222.         }
    223.  
    224.         void SetupMainLightConstants(CommandBuffer cmd, ref LightData lightData)
    225.         {
    226.             Vector4 lightPos, lightColor, lightAttenuation, lightSpotDir, lightOcclusionChannel;
    227.             InitializeLightConstants(lightData.visibleLights, lightData.mainLightIndex, out lightPos, out lightColor, out lightAttenuation, out lightSpotDir, out lightOcclusionChannel);
    228. #region AmbientFix
    229.             if(RenderSettings.ambientMode == AmbientMode.Trilight)
    230.             {
    231.                 cmd.EnableShaderKeyword("TRI_COLOR_AMBIENT");
    232.                 cmd.SetGlobalVector(LightConstantBuffer._AmbientSky, RenderSettings.ambientSkyColor);
    233.                 cmd.SetGlobalVector(LightConstantBuffer._AmbientEquator, RenderSettings.ambientEquatorColor);
    234.                 cmd.SetGlobalVector(LightConstantBuffer._AmbientGround, RenderSettings.ambientGroundColor);
    235.             }
    236.             else
    237.             {
    238.                 cmd.DisableShaderKeyword("TRI_COLOR_AMBIENT");
    239.                 cmd.SetGlobalVector(LightConstantBuffer._AmbientSky, RenderSettings.ambientLight);
    240.             }
    241. #endregion
    242.             cmd.SetGlobalVector(LightConstantBuffer._MainLightPosition, lightPos);
    243.             cmd.SetGlobalVector(LightConstantBuffer._MainLightColor, lightColor);
    244.         }
    245.  
    246.         void SetupAdditionalLightConstants(CommandBuffer cmd, ref RenderingData renderingData)
    247.         {
    248.             ref LightData lightData = ref renderingData.lightData;
    249.             var cullResults = renderingData.cullResults;
    250.             var lights = lightData.visibleLights;
    251.             int maxAdditionalLightsCount = UniversalRenderPipeline.maxVisibleAdditionalLights;
    252.             int additionalLightsCount = SetupPerObjectLightIndices(cullResults, ref lightData);
    253.             if (additionalLightsCount > 0)
    254.             {
    255.                 if (m_UseStructuredBuffer)
    256.                 {
    257.                     NativeArray<ShaderInput.LightData> additionalLightsData = new NativeArray<ShaderInput.LightData>(additionalLightsCount, Allocator.Temp);
    258.                     for (int i = 0, lightIter = 0; i < lights.Length && lightIter < maxAdditionalLightsCount; ++i)
    259.                     {
    260.                         VisibleLight light = lights[i];
    261.                         if (lightData.mainLightIndex != i)
    262.                         {
    263.                             ShaderInput.LightData data;
    264.                             InitializeLightConstants(lights, i,
    265.                                 out data.position, out data.color, out data.attenuation,
    266.                                 out data.spotDirection, out data.occlusionProbeChannels);
    267.                             additionalLightsData[lightIter] = data;
    268.                             lightIter++;
    269.                         }
    270.                     }
    271.  
    272.                     var lightDataBuffer = ShaderData.instance.GetLightDataBuffer(additionalLightsCount);
    273.                     lightDataBuffer.SetData(additionalLightsData);
    274.  
    275.                     int lightIndices = cullResults.lightAndReflectionProbeIndexCount;
    276.                     var lightIndicesBuffer = ShaderData.instance.GetLightIndicesBuffer(lightIndices);
    277.  
    278.                     cmd.SetGlobalBuffer(m_AdditionalLightsBufferId, lightDataBuffer);
    279.                     cmd.SetGlobalBuffer(m_AdditionalLightsIndicesId, lightIndicesBuffer);
    280.  
    281.                     additionalLightsData.Dispose();
    282.                 }
    283.                 else
    284.                 {
    285.                     for (int i = 0, lightIter = 0; i < lights.Length && lightIter < maxAdditionalLightsCount; ++i)
    286.                     {
    287.                         VisibleLight light = lights[i];
    288.                         if (lightData.mainLightIndex != i)
    289.                         {
    290.                             InitializeLightConstants(lights, i, out m_AdditionalLightPositions[lightIter],
    291.                                 out m_AdditionalLightColors[lightIter],
    292.                                 out m_AdditionalLightAttenuations[lightIter],
    293.                                 out m_AdditionalLightSpotDirections[lightIter],
    294.                                 out m_AdditionalLightOcclusionProbeChannels[lightIter]);
    295.                             lightIter++;
    296.                         }
    297.                     }
    298.  
    299.                     cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightsPosition, m_AdditionalLightPositions);
    300.                     cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightsColor, m_AdditionalLightColors);
    301.                     cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightsAttenuation, m_AdditionalLightAttenuations);
    302.                     cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightsSpotDir, m_AdditionalLightSpotDirections);
    303.                     cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightOcclusionProbeChannel, m_AdditionalLightOcclusionProbeChannels);
    304.                 }
    305.  
    306.                 cmd.SetGlobalVector(LightConstantBuffer._AdditionalLightsCount, new Vector4(lightData.maxPerObjectAdditionalLightsCount,
    307.                     0.0f, 0.0f, 0.0f));
    308.             }
    309.             else
    310.             {
    311.                 cmd.SetGlobalVector(LightConstantBuffer._AdditionalLightsCount, Vector4.zero);
    312.             }
    313.         }
    314.  
    315.         int SetupPerObjectLightIndices(CullingResults cullResults, ref LightData lightData)
    316.         {
    317.             if (lightData.additionalLightsCount == 0)
    318.                 return lightData.additionalLightsCount;
    319.  
    320.             var visibleLights = lightData.visibleLights;
    321.             var perObjectLightIndexMap = cullResults.GetLightIndexMap(Allocator.Temp);
    322.             int globalDirectionalLightsCount = 0;
    323.             int additionalLightsCount = 0;
    324.  
    325.             // Disable all directional lights from the perobject light indices
    326.             // Pipeline handles main light globally and there's no support for additional directional lights atm.
    327.             for (int i = 0; i < visibleLights.Length; ++i)
    328.             {
    329.                 if (additionalLightsCount >= UniversalRenderPipeline.maxVisibleAdditionalLights)
    330.                     break;
    331.  
    332.                 VisibleLight light = visibleLights[i];
    333.                 if (i == lightData.mainLightIndex)
    334.                 {
    335.                     perObjectLightIndexMap[i] = -1;
    336.                     ++globalDirectionalLightsCount;
    337.                 }
    338.                 else
    339.                 {
    340.                     perObjectLightIndexMap[i] -= globalDirectionalLightsCount;
    341.                     ++additionalLightsCount;
    342.                 }
    343.             }
    344.  
    345.             // Disable all remaining lights we cannot fit into the global light buffer.
    346.             for (int i = globalDirectionalLightsCount + additionalLightsCount; i < perObjectLightIndexMap.Length; ++i)
    347.                 perObjectLightIndexMap[i] = -1;
    348.  
    349.             cullResults.SetLightIndexMap(perObjectLightIndexMap);
    350.  
    351.             if (m_UseStructuredBuffer && additionalLightsCount > 0)
    352.             {
    353.                 int lightAndReflectionProbeIndices = cullResults.lightAndReflectionProbeIndexCount;
    354.                 Assertions.Assert.IsTrue(lightAndReflectionProbeIndices > 0, "Pipelines configures additional lights but per-object light and probe indices count is zero.");
    355.                 cullResults.FillLightAndReflectionProbeIndices(ShaderData.instance.GetLightIndicesBuffer(lightAndReflectionProbeIndices));
    356.             }
    357.  
    358.             perObjectLightIndexMap.Dispose();
    359.             return additionalLightsCount;
    360.         }
    361.     }
    362. }
    363.  
    Note the
    #region AmbientFix
    I have put there. It make ambient value work correctly

    Is it a bug?
     
    Last edited: Feb 16, 2020
    Muuuuo likes this.
  7. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    108
    I had exactly the same issues with the Ambient node using URP and Unity 2019.4.12f1. In my case I also got black values passed when entering build mode, and not seeing any updates when saving scene / changing color in Lightning settings. Did you submit a bug report?
     
  8. noio

    noio

    Joined:
    Dec 17, 2013
    Posts:
    231
    I did not have the time to create a bug report yet, unfortunately. I think I worked around the bug using a single Reflection Probe and a custom Skybox shader that just renders the ambient values.
     
  9. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    108
    @noio
    Seems they fixed it. From changelog:

    From https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@10.0/changelog/CHANGELOG.html

    Since I'm using 2019 im stuck at URP 7.5.1 so I am using an unexposed property in Shadergraph and
    Shader.SetGlobalColor
    as a workaround for now.
     
    Thaina likes this.
  10. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107