Skip to content
Snippets Groups Projects
Select Git revision
  • 5dd18e2a43692ef43eb4febdfab1a09e22a5b886
  • master default
  • JS-based-scroll-rendering
  • Paul_Marius_Level
  • Paul_Marius_2
  • Paul_Marius
  • Andi_Mark
  • be-UnityWebView
  • gitignoreFrameitServer
  • ZimmerBSc
  • Bugfix_StageLoading
  • stages
  • MAZIFAU_Experimental
  • tsc/coneworld
  • tsc/fact-interaction
  • marcel
  • MaZiFAU_TopSort
  • mergeHelper
  • zwischenSpeichern
  • tempAndrToMaster
  • SebBranch
  • 3.0
  • v2.1
  • v2.0
  • v1.0
25 results

RainShader.shader

Blame
  • RainShader.shader 4.40 KiB
    //
    // Rain Maker (c) 2015 Digital Ruby, LLC
    // http://www.digitalruby.com
    //
    
    Shader "Custom/RainShader"
    {
        Properties
    	{
    		_MainTex ("Color (RGB) Alpha (A)", 2D) = "gray" {}
    		_TintColor ("Tint Color (RGB)", Color) = (1, 1, 1, 1)
    		_PointSpotLightMultiplier ("Point/Spot Light Multiplier", Range (0, 10)) = 2
    		_DirectionalLightMultiplier ("Directional Light Multiplier", Range (0, 10)) = 1
    		_InvFade ("Soft Particles Factor", Range(0.01, 100.0)) = 1.0
    		_AmbientLightMultiplier ("Ambient light multiplier", Range(0, 1)) = 0.25
        }
    
        SubShader
    	{
            Tags { "QUEUE"="Transparent" "IGNOREPROJECTOR"="true" "RenderType"="Transparent" "LightMode"="Vertex" }
    		LOD 100
    
            Pass
    		{
    			ZWrite Off
    			Cull Back
                Lighting On     
    			AlphaTest Greater 0.01
    			ColorMask RGB
    			Blend SrcAlpha OneMinusSrcAlpha
    
                CGPROGRAM
    
                #pragma multi_compile_particles
                #pragma vertex vert
                #pragma fragment frag
    			#pragma fragmentoption ARB_precision_hint_fastest
    
                #include "UnityCG.cginc"
    			#include "Lighting.cginc"
    
    			fixed4 _TintColor;
    			float _DirectionalLightMultiplier;
    			float _PointSpotLightMultiplier;
    			float _AmbientLightMultiplier;
    
    			#if defined(SOFTPARTICLES_ON)
    			float _InvFade;
    			#endif
    
    			struct appdata_t
    			{
    				float4 vertex : POSITION;
    				fixed4 color : COLOR;
    				float2 texcoord : TEXCOORD0;
    			};
    
    		    struct v2f
                {
                    half2 uv_MainTex : TEXCOORD0;
                    fixed4 color : COLOR0;
                    float4 pos : SV_POSITION;
    				#if defined(SOFTPARTICLES_ON)
                    float4 projPos : TEXCOORD1;
                    #endif
                };
    
    			float3 ApplyLight(int index, float3 lightColor, float3 viewPos)
    			{
    				fixed3 currentLightColor = unity_LightColor[index].rgb;