[RELEASED] Weatherade: Snow and Rain System

Hi again, I’m back and got some issues. This is now a fresh install of Weatherade into a clean URP project this time on Windows, and having trouble getting the tracers to work.

Same error as before persists, just a single one, displacement not working from Truck wheels or footsteps or thrown snowballs. Is there any way you can add a list of the necessary Layer names that need to be created? Unity 2022 makes it impossible to figure out what the Layers names and numbers are supposed to be.

Something that might help? There IS a way to create a Tags & Layer Preset that can be loaded before attempting to the open the scene, have seen other vendors use this, presumably to get around the limitation that the Demo scene doesn’t carry those Layers with it in the install.

A game object can only be in one layer. The layer needs to be in the range [0...31]
UnityEngine.StackTraceUtility:ExtractStackTrace ()
SRS_Tracer:SetupTracers () (at Assets/NOT_Lonely/Weatherade SRS/Scripts/SRS_Tracer.cs:50)
SRS_Tracer:OnEnable () (at Assets/NOT_Lonely/Weatherade SRS/Scripts/SRS_Tracer.cs:16)

9822585--1411977--upload_2024-5-8_22-43-39.png

( I actually have a project I am doing with this, so I promise I will actually learn the full system now. )

Cheers - just saw that Roland C. just put out a video mini-showcase of it!

1 Like

Hi!
Here’s a preset for the demo tags and layers. Zipped it, because it’s not allowed to attach a source format.

Hah, yeah, he showed it to me :smile:

9822717–1411995–WeatheradeURP_Demo_TagsAndLayers.zip (812 Bytes)

1 Like

Thank you! Will Confirm.

Bingo - works like a charm.

For anyone else struggling with it because you are impatient and ADD like me, before opening the demo scenes, import / drag the Tags & Layer Preset from above into your project - maybe into “Assets > Settings”. Then Go to Player Settings, search for “Tags”, and import the preset. Now open the Demo scene and enjoy the beauty!

1 Like

Hi,

we tried the package on Windows and everything looks good. Now we need it on Apple but even in a blank project with nothing but your Plugin we get the following message (and several more similar ones) and the materials are pink.
Tested in Unity 2022.3.10f and Unity 2022.4.27f1

Shader error in ‘Hidden/NOT_Lonely/Weatherade/Snow Coverage (Tessellation)’: Couldn’t open include file ‘Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl’. at line 298

Compiling Subshader: 0, Pass: ForwardLit, Vertex program with
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_NEEDS_RENDERPASS_FBFETCH_FALLBACK UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED DOTS_INSTANCING_ON DYNAMICLIGHTMAP_ON EVALUATE_SH_MIXED EVALUATE_SH_VERTEX FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UN

Hi,
What if you turn off tessellation? Does it work without it?
And please, make a screenshot of the whole console with these errors, if possible.

Thanks for the reply,
modifying tessellation in the material didn’t change it. Here are screenshots of the three errors we get.



Ahh got it. I fixed this problem but haven’t uploaded it yet.
Here’s a quick fix:

  1. Open the SRS_CoverageCommon.hlsl file in Assets\NOT_Lonely\Weatherade SRS\Shaders\Includes
  2. Change the code block with the UNITY_SAMPLE_TEX2DARRAY_GRAD macro by this one:
#if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(SHADER_API_GLES3) || defined(SHADER_API_GLCORE) || defined(SHADER_API_VULKAN) || defined(SHADER_API_METAL)
    #define UNITY_SAMPLE_TEX2DARRAY_GRAD(tex,samper,coord,dx,dy) tex.SampleGrad (samper,coord,dx,dy)
#else
    #if defined(UNITY_COMPILER_HLSL2GLSL) || defined(SHADER_TARGET_SURFACE_ANALYSIS)
        #define UNITY_SAMPLE_TEX2DARRAY_GRAD(tex,samper,coord,dx,dy) tex2DArray(tex,coord,dx,dy)
    #endif
#endif

3.Save the file.

1 Like

Yes this seems to work, thanks!

1 Like

Another question: is it supposed to work in VR? We also tried it on the Apple Vision Pro and it works but only on one eye. The other one shows a blue material.

I created a follow-up video :slight_smile:

https://www.youtube.com/watch?v=8Tem2VpkwpU

2 Likes

Is the whole scene not render or terrain only? And do you have errors in console?
Try to use a multi-pass VR mode and look if it works.

It’s the terrain and all other MeshRenderers using the Snow Coverage material.There are no console errors.
VisionOS in Unity doesn’t support mult-pass yet.It’s on the roadmap though.

Please, try to select the shader in the folder and look at it’s inspector. I’m pretty sure it has some errors or warnings at least.

Yes you are right, there are some errors in the inspector:

SnowCoverage (Terrain):

Program ‘DomainProgram’, error X8000: D3D11 Internal Compiler Error: Invalid Bytecode: Named register components cannot appear to the left (xyzw order) of components that are not named in a given register. TessFactors are an exception. Affected register is output 7.
Compiling Subshader: 0, Pass: ForwardLit, Vertex program with FOG_EXP2 STEREO_INSTANCING_ON _COVERAGE_ON _DISPLACEMENT_ON _TRACES_ON _USE_COVERAGE_DETAIL
Platform defines: UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON EVALUATE_SH_MIXED EVALUATE_SH_VERTEX FOG_EXP FOG_LINEAR INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHTS_VERTEX _FORWARD_PLUS _LIGHT_LAYERS _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _NORMALMAP _PAINTABLE_COVERAGE_ON _STOCHASTIC_ON _TERRAIN_INSTANCED_PERPIXEL_NORMAL _THREE_TEX_MODE _TRACE_DETAIL

Program ‘DomainProgram’, error X8000: D3D11 Internal Compiler Error: Invalid Bytecode: Named register components cannot appear to the left (xyzw order) of components that are not named in a given register. TessFactors are an exception. Affected register is output 8.
Compiling Subshader: 0, Pass: ForwardLit, Vertex program with DIRLIGHTMAP_COMBINED LIGHTMAP_ON STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS _MAIN_LIGHT_SHADOWS
Platform defines: UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DYNAMICLIGHTMAP_ON EVALUATE_SH_MIXED EVALUATE_SH_VERTEX FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS_VERTEX _COVERAGE_ON _DISPLACEMENT_ON _FORWARD_PLUS _LIGHT_LAYERS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _NORMALMAP _PAINTABLE_COVERAGE_ON _STOCHASTIC_ON _TERRAIN_INSTANCED_PERPIXEL_NORMAL _THREE_TEX_MODE _TRACES_ON _TRACE_DETAIL _USE_COVERAGE_DETAIL

Program ‘DomainProgram’, error X8000: D3D11 Internal Compiler Error: Invalid Bytecode: Named register components cannot appear to the left (xyzw order) of components that are not named in a given register. TessFactors are an exception. Affected register is output 2.
Compiling Subshader: 0, Pass: DepthOnly, Vertex program with STEREO_INSTANCING_ON _COVERAGE_ON _DISPLACEMENT_ON _TRACES_ON _USE_COVERAGE_DETAIL
Platform defines: UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _PAINTABLE_COVERAGE_ON _STOCHASTIC_ON _TERRAIN_INSTANCED_PERPIXEL_NORMAL _THREE_TEX_MODE _TRACE_DETAIL

Program ‘DomainProgram’, error X8000: D3D11 Internal Compiler Error: Invalid Bytecode: Named register components cannot appear to the left (xyzw order) of components that are not named in a given register. TessFactors are an exception. Affected register is output 6.
Compiling Subshader: 0, Pass: DepthNormals, Vertex program with STEREO_INSTANCING_ON _COVERAGE_ON _DISPLACEMENT_ON _TRACES_ON _USE_COVERAGE_DETAIL
Platform defines: UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _NORMALMAP _PAINTABLE_COVERAGE_ON _STOCHASTIC_ON _TERRAIN_INSTANCED_PERPIXEL_NORMAL _THREE_TEX_MODE _TRACE_DETAIL

SnowCoverage (Tesselation):

maximum ps_5_0 sampler register index (16) exceeded
Compiling Subshader: 0, Pass: ForwardLit, Fragment program with DIRLIGHTMAP_COMBINED FOG_EXP2 LIGHTMAP_ON LOD_FADE_CROSSFADE _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _COVERAGE_ON _DISPLACEMENT_ON _EMISSION _LIGHT_COOKIES _MAIN_LIGHT_SHADOWS _METALLICSPECGLOSSMAP _NORMALMAP _OCCLUSIONMAP _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _SCREEN_SPACE_OCCLUSION _SPARKLE_ON _SPARKLE_TEX_LS _SPARKLE_TEX_SS _SSS_ON _TRACES_ON _USE_COVERAGE_DETAIL
Platform defines: UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_NO_DXT5nm UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DEBUG_DISPLAY DOTS_INSTANCING_ON DYNAMICLIGHTMAP_ON EVALUATE_SH_MIXED EVALUATE_SH_VERTEX FOG_EXP FOG_LINEAR INSTANCING_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS_VERTEX _ALPHAMODULATE_ON _ALPHAPREMULTIPLY_ON _ALPHATEST_ON _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 _DETAIL_MULX2 _DETAIL_SCALED _ENVIRONMENTREFLECTIONS_OFF _FORWARD_PLUS _LIGHT_LAYERS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _PAINTABLE_COVERAGE_ON _PARALLAXMAP _RECEIVE_SHADOWS_OFF _SHADOWS_SOFT _SHADOWS_SOFT_HIGH _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A _SPECULARHIGHLIGHTS_OFF _SPECULAR_SETUP _SURFACE_TYPE_TRANSPARENT _THREE_TEX_MODE _TRACE_DETAIL _USE_AVERAGED_NORMALS _WRITE_RENDERING_LAYERS

invalid subscript ‘stereoTargetEyeIndexAsRTArrayIdx’
Compiling Subshader: 0, Pass: ShadowCaster, Fragment program with LOD_FADE_CROSSFADE STEREO_INSTANCING_ON _ALPHATEST_ON _COVERAGE_ON _DISPLACEMENT_ON _SSS_ON _TRACES_ON
Platform defines: UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_NO_DXT5nm UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DOTS_INSTANCING_ON INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _PAINTABLE_COVERAGE_ON _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A _THREE_TEX_MODE _TRACE_DETAIL _USE_AVERAGED_NORMALS

I have been working on a solution to this problem and hope it can be resolved. Could you write me via support email? I will send you the corrected files.

Okay thank you. I sent you an email.

1 Like

Replied.

awesome!