From a752d9d244c0d2f4101ee461f8810f91dc9c34ad Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Sat, 21 Jan 2017 22:12:52 +1100 Subject: [PATCH] updated water shader --- IronToad_UnityProject/Assets/Sound.meta | 9 ++ .../Assets/water/WaterShader.shader | 98 +++++++++++++------ 2 files changed, 78 insertions(+), 29 deletions(-) create mode 100644 IronToad_UnityProject/Assets/Sound.meta diff --git a/IronToad_UnityProject/Assets/Sound.meta b/IronToad_UnityProject/Assets/Sound.meta new file mode 100644 index 0000000..c6dafb0 --- /dev/null +++ b/IronToad_UnityProject/Assets/Sound.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0fbabcae9313543ffbf1429aeac3664d +folderAsset: yes +timeCreated: 1484963877 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/water/WaterShader.shader b/IronToad_UnityProject/Assets/water/WaterShader.shader index cb218d5..61eefce 100644 --- a/IronToad_UnityProject/Assets/water/WaterShader.shader +++ b/IronToad_UnityProject/Assets/water/WaterShader.shader @@ -4,7 +4,7 @@ // Shader created with Shader Forge v1.30 // Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/ // Note: Manually altering this data may prevent you from opening it in Shader Forge -/*SF_DATA;ver:1.30;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False;n:type:ShaderForge.SFN_Final,id:1,x:33430,y:32397,varname:node_1,prsc:2|diff-4940-OUT,spec-1863-OUT,normal-4935-OUT,transm-133-OUT,lwrap-133-OUT,alpha-6891-OUT,voffset-140-OUT;n:type:ShaderForge.SFN_Panner,id:23,x:30606,y:31816,varname:node_23,prsc:2,spu:5,spv:0|UVIN-882-OUT;n:type:ShaderForge.SFN_Power,id:133,x:31725,y:32205,cmnt:Panning gradient,varname:node_133,prsc:2|VAL-6791-OUT,EXP-8547-OUT;n:type:ShaderForge.SFN_NormalVector,id:139,x:31952,y:32688,prsc:2,pt:True;n:type:ShaderForge.SFN_Multiply,id:140,x:32326,y:32562,varname:node_140,prsc:2|A-1924-OUT,B-142-OUT,C-139-OUT;n:type:ShaderForge.SFN_ValueProperty,id:142,x:32099,y:32564,ptovrint:False,ptlb:Bulge Scale,ptin:_BulgeScale,varname:_BulgeScale,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1.1;n:type:ShaderForge.SFN_Lerp,id:149,x:32304,y:31852,varname:node_149,prsc:2|A-288-OUT,B-168-RGB,T-133-OUT;n:type:ShaderForge.SFN_Lerp,id:150,x:32077,y:31694,varname:node_150,prsc:2|A-267-RGB,B-265-OUT,T-133-OUT;n:type:ShaderForge.SFN_Tex2d,id:151,x:30229,y:31339,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:4620d1bc99cb5fd498e646d94b9ee22f,ntxv:2,isnm:False|UVIN-23-UVOUT;n:type:ShaderForge.SFN_Color,id:168,x:32014,y:32121,ptovrint:False,ptlb:Glow Color,ptin:_GlowColor,varname:_GlowColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Vector3,id:265,x:31861,y:31760,varname:node_265,prsc:2,v1:0,v2:0,v3:1;n:type:ShaderForge.SFN_Tex2d,id:267,x:31861,y:31576,ptovrint:False,ptlb:Normals,ptin:_Normals,varname:_Normals,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:e1110e8b284166c4090af21bb5bc02fe,ntxv:2,isnm:False|UVIN-23-UVOUT;n:type:ShaderForge.SFN_Vector1,id:4921,x:32326,y:32058,varname:node_4921,prsc:2,v1:1;n:type:ShaderForge.SFN_Normalize,id:4935,x:32359,y:32162,varname:node_4935,prsc:2|IN-150-OUT;n:type:ShaderForge.SFN_ValueProperty,id:8547,x:31500,y:32377,ptovrint:False,ptlb:Bulge Shape,ptin:_BulgeShape,varname:_BulgeShape,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1.8;n:type:ShaderForge.SFN_Vector1,id:8608,x:32077,y:31543,varname:node_8608,prsc:2,v1:0.1;n:type:ShaderForge.SFN_TexCoord,id:5169,x:29011,y:31532,varname:node_5169,prsc:2,uv:0;n:type:ShaderForge.SFN_Relay,id:1924,x:32099,y:32472,varname:node_1924,prsc:2|IN-133-OUT;n:type:ShaderForge.SFN_Tex2d,id:1000,x:30900,y:31928,ptovrint:False,ptlb:Perlin,ptin:_Perlin,varname:node_1000,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:28c7aad1372ff114b90d330f8a2dd938,ntxv:3,isnm:False|UVIN-23-UVOUT;n:type:ShaderForge.SFN_Time,id:9449,x:30569,y:32615,varname:node_9449,prsc:2;n:type:ShaderForge.SFN_Sin,id:872,x:30830,y:32637,varname:node_872,prsc:2|IN-9449-TSL;n:type:ShaderForge.SFN_RemapRange,id:728,x:31123,y:32628,varname:node_728,prsc:2,frmn:-1,frmx:1,tomn:0,tomx:1|IN-872-OUT;n:type:ShaderForge.SFN_Lerp,id:6791,x:31328,y:32216,varname:node_6791,prsc:2|A-3165-OUT,B-5880-R,T-728-OUT;n:type:ShaderForge.SFN_Tex2d,id:5880,x:30772,y:32411,ptovrint:False,ptlb:Perlin_copy,ptin:_Perlin_copy,varname:_Perlin_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:28c7aad1372ff114b90d330f8a2dd938,ntxv:0,isnm:False|UVIN-4275-UVOUT;n:type:ShaderForge.SFN_Panner,id:4275,x:30532,y:32124,varname:node_4275,prsc:2,spu:2.5,spv:2.5|UVIN-882-OUT;n:type:ShaderForge.SFN_RemapRange,id:7035,x:31235,y:31503,varname:node_7035,prsc:2,frmn:0,frmx:1,tomn:0,tomx:1|IN-151-R;n:type:ShaderForge.SFN_Power,id:6956,x:31577,y:31867,varname:node_6956,prsc:2|VAL-7035-OUT,EXP-6075-OUT;n:type:ShaderForge.SFN_Multiply,id:3165,x:31213,y:31980,varname:node_3165,prsc:2|A-1000-R,B-6956-OUT;n:type:ShaderForge.SFN_Vector1,id:6075,x:31121,y:31811,varname:node_6075,prsc:2,v1:0.3;n:type:ShaderForge.SFN_OneMinus,id:1863,x:32474,y:31884,varname:node_1863,prsc:2|IN-149-OUT;n:type:ShaderForge.SFN_DepthBlend,id:8882,x:32532,y:33176,varname:node_8882,prsc:2|DIST-965-OUT;n:type:ShaderForge.SFN_Slider,id:965,x:32111,y:33235,ptovrint:False,ptlb:ShoreBlend,ptin:_ShoreBlend,varname:node_965,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:100;n:type:ShaderForge.SFN_Color,id:2802,x:32510,y:32768,ptovrint:False,ptlb:Shore,ptin:_Shore,varname:node_2802,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:0,c3:0,c4:1;n:type:ShaderForge.SFN_Lerp,id:4940,x:32895,y:32732,varname:node_4940,prsc:2|A-2802-RGB,B-149-OUT,T-8882-OUT;n:type:ShaderForge.SFN_Slider,id:6891,x:32824,y:33251,ptovrint:False,ptlb:Opacity,ptin:_Opacity,varname:node_6891,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.3994928,max:1;n:type:ShaderForge.SFN_Multiply,id:288,x:31220,y:31249,varname:node_288,prsc:2|A-2646-RGB,B-151-RGB;n:type:ShaderForge.SFN_Color,id:2646,x:30787,y:31052,ptovrint:False,ptlb:Color,ptin:_Color,varname:node_2646,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.07352942,c2:0.9233267,c3:1,c4:1;n:type:ShaderForge.SFN_Multiply,id:882,x:29290,y:31621,varname:node_882,prsc:2|A-5169-UVOUT,B-8975-OUT;n:type:ShaderForge.SFN_ObjectScale,id:3614,x:28773,y:31843,varname:node_3614,prsc:2,rcp:False;n:type:ShaderForge.SFN_ComponentMask,id:8975,x:28974,y:31843,varname:node_8975,prsc:2,cc1:0,cc2:2,cc3:-1,cc4:-1|IN-3614-XYZ;proporder:151-267-168-142-8547-1000-5880-965-2802-6891-2646;pass:END;sub:END;*/ +/*SF_DATA;ver:1.30;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:True,hqlp:False,rprd:False,enco:False,rmgx:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:3,bdst:7,dpts:2,wrdp:False,dith:0,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:True,qofs:0,qpre:3,rntp:2,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False;n:type:ShaderForge.SFN_Final,id:1,x:33430,y:32397,varname:node_1,prsc:2|diff-4940-OUT,spec-1863-OUT,normal-4935-OUT,transm-133-OUT,lwrap-133-OUT,alpha-6891-OUT,voffset-140-OUT;n:type:ShaderForge.SFN_Panner,id:23,x:29724,y:31689,varname:node_23,prsc:2,spu:0.05,spv:0|UVIN-882-OUT,DIST-4763-OUT;n:type:ShaderForge.SFN_Power,id:133,x:31725,y:32205,cmnt:Panning gradient,varname:node_133,prsc:2|VAL-6791-OUT,EXP-8547-OUT;n:type:ShaderForge.SFN_NormalVector,id:139,x:31952,y:32688,prsc:2,pt:True;n:type:ShaderForge.SFN_Multiply,id:140,x:32326,y:32562,varname:node_140,prsc:2|A-1924-OUT,B-142-OUT,C-139-OUT;n:type:ShaderForge.SFN_ValueProperty,id:142,x:32099,y:32564,ptovrint:False,ptlb:Bulge Scale,ptin:_BulgeScale,varname:_BulgeScale,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1.1;n:type:ShaderForge.SFN_Lerp,id:149,x:32304,y:31852,varname:node_149,prsc:2|A-288-OUT,B-168-RGB,T-133-OUT;n:type:ShaderForge.SFN_Lerp,id:150,x:32077,y:31694,varname:node_150,prsc:2|A-267-RGB,B-265-OUT,T-133-OUT;n:type:ShaderForge.SFN_Tex2d,id:151,x:30229,y:31339,ptovrint:False,ptlb:Diffuse,ptin:_Diffuse,varname:_Diffuse,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:4620d1bc99cb5fd498e646d94b9ee22f,ntxv:2,isnm:False|UVIN-23-UVOUT;n:type:ShaderForge.SFN_Color,id:168,x:32014,y:32121,ptovrint:False,ptlb:Glow Color,ptin:_GlowColor,varname:_GlowColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Vector3,id:265,x:31861,y:31760,varname:node_265,prsc:2,v1:0,v2:0,v3:1;n:type:ShaderForge.SFN_Tex2d,id:267,x:31861,y:31576,ptovrint:False,ptlb:Normals,ptin:_Normals,varname:_Normals,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:e1110e8b284166c4090af21bb5bc02fe,ntxv:2,isnm:False|UVIN-23-UVOUT;n:type:ShaderForge.SFN_Vector1,id:4921,x:32326,y:32058,varname:node_4921,prsc:2,v1:1;n:type:ShaderForge.SFN_Normalize,id:4935,x:32359,y:32162,varname:node_4935,prsc:2|IN-150-OUT;n:type:ShaderForge.SFN_ValueProperty,id:8547,x:31500,y:32377,ptovrint:False,ptlb:Bulge Shape,ptin:_BulgeShape,varname:_BulgeShape,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:1.8;n:type:ShaderForge.SFN_Vector1,id:8608,x:32077,y:31543,varname:node_8608,prsc:2,v1:0.1;n:type:ShaderForge.SFN_TexCoord,id:5169,x:29011,y:31532,varname:node_5169,prsc:2,uv:0;n:type:ShaderForge.SFN_Relay,id:1924,x:32099,y:32472,varname:node_1924,prsc:2|IN-133-OUT;n:type:ShaderForge.SFN_Tex2d,id:1000,x:30900,y:31928,ptovrint:False,ptlb:Perlin,ptin:_Perlin,varname:node_1000,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:28c7aad1372ff114b90d330f8a2dd938,ntxv:3,isnm:False|UVIN-23-UVOUT;n:type:ShaderForge.SFN_Time,id:9449,x:30307,y:32597,varname:node_9449,prsc:2;n:type:ShaderForge.SFN_Sin,id:872,x:30830,y:32637,varname:node_872,prsc:2|IN-3394-OUT;n:type:ShaderForge.SFN_RemapRange,id:728,x:31123,y:32628,varname:node_728,prsc:2,frmn:-1,frmx:1,tomn:0,tomx:1|IN-872-OUT;n:type:ShaderForge.SFN_Lerp,id:6791,x:31328,y:32216,varname:node_6791,prsc:2|A-3165-OUT,B-5923-OUT,T-728-OUT;n:type:ShaderForge.SFN_Tex2d,id:5880,x:30689,y:32396,ptovrint:False,ptlb:Perlin_copy,ptin:_Perlin_copy,varname:_Perlin_copy,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,tex:28c7aad1372ff114b90d330f8a2dd938,ntxv:0,isnm:False|UVIN-4275-UVOUT;n:type:ShaderForge.SFN_Panner,id:4275,x:30532,y:32124,varname:node_4275,prsc:2,spu:0.05,spv:0.05|UVIN-882-OUT,DIST-4763-OUT;n:type:ShaderForge.SFN_RemapRange,id:7035,x:31235,y:31503,varname:node_7035,prsc:2,frmn:0,frmx:1,tomn:0,tomx:1|IN-151-R;n:type:ShaderForge.SFN_Power,id:6956,x:31577,y:31867,varname:node_6956,prsc:2|VAL-7035-OUT,EXP-6075-OUT;n:type:ShaderForge.SFN_Multiply,id:3165,x:31213,y:31980,varname:node_3165,prsc:2|A-1000-R,B-6956-OUT;n:type:ShaderForge.SFN_Vector1,id:6075,x:31121,y:31811,varname:node_6075,prsc:2,v1:0.3;n:type:ShaderForge.SFN_OneMinus,id:1863,x:32474,y:31884,varname:node_1863,prsc:2|IN-149-OUT;n:type:ShaderForge.SFN_DepthBlend,id:8882,x:32532,y:33176,varname:node_8882,prsc:2|DIST-965-OUT;n:type:ShaderForge.SFN_Slider,id:965,x:32111,y:33235,ptovrint:False,ptlb:ShoreBlend,ptin:_ShoreBlend,varname:node_965,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0,max:100;n:type:ShaderForge.SFN_Color,id:2802,x:32510,y:32768,ptovrint:False,ptlb:Shore,ptin:_Shore,varname:node_2802,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:0,c3:0,c4:1;n:type:ShaderForge.SFN_Lerp,id:4940,x:32895,y:32732,varname:node_4940,prsc:2|A-2802-RGB,B-149-OUT,T-8882-OUT;n:type:ShaderForge.SFN_Slider,id:6891,x:32824,y:33251,ptovrint:False,ptlb:Opacity,ptin:_Opacity,varname:node_6891,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:0,cur:0.3994928,max:1;n:type:ShaderForge.SFN_Multiply,id:288,x:31220,y:31249,varname:node_288,prsc:2|A-2646-RGB,B-151-RGB;n:type:ShaderForge.SFN_Color,id:2646,x:30787,y:31052,ptovrint:False,ptlb:Color,ptin:_Color,varname:node_2646,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.07352942,c2:0.9233267,c3:1,c4:1;n:type:ShaderForge.SFN_Multiply,id:882,x:29290,y:31621,varname:node_882,prsc:2|A-5169-UVOUT,B-8975-OUT;n:type:ShaderForge.SFN_ObjectScale,id:3614,x:28773,y:31843,varname:node_3614,prsc:2,rcp:False;n:type:ShaderForge.SFN_ComponentMask,id:8975,x:28974,y:31843,varname:node_8975,prsc:2,cc1:0,cc2:2,cc3:-1,cc4:-1|IN-3614-XYZ;n:type:ShaderForge.SFN_ValueProperty,id:633,x:30307,y:32767,ptovrint:False,ptlb:buffer Speed,ptin:_bufferSpeed,varname:node_633,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,v1:0.7;n:type:ShaderForge.SFN_Multiply,id:3394,x:30553,y:32623,varname:node_3394,prsc:2|A-9449-T,B-633-OUT;n:type:ShaderForge.SFN_Multiply,id:5923,x:30969,y:32378,varname:node_5923,prsc:2|A-5880-R,B-6956-OUT;n:type:ShaderForge.SFN_Time,id:7529,x:28507,y:32136,varname:node_7529,prsc:2;n:type:ShaderForge.SFN_Sin,id:2710,x:28903,y:32187,varname:node_2710,prsc:2|IN-6302-OUT;n:type:ShaderForge.SFN_Vector1,id:7346,x:28676,y:32623,varname:node_7346,prsc:2,v1:10;n:type:ShaderForge.SFN_Divide,id:6302,x:28715,y:32261,varname:node_6302,prsc:2|A-7529-T,B-7346-OUT;n:type:ShaderForge.SFN_Multiply,id:4763,x:29135,y:32158,varname:node_4763,prsc:2|A-2710-OUT,B-7346-OUT;proporder:151-267-168-142-8547-1000-5880-965-2802-6891-2646-633;pass:END;sub:END;*/ Shader "LightHouse/WaterShader" { Properties { @@ -19,6 +19,7 @@ Shader "LightHouse/WaterShader" { _Shore ("Shore", Color) = (1,0,0,1) _Opacity ("Opacity", Range(0, 1)) = 0.3994928 _Color ("Color", Color) = (0.07352942,0.9233267,1,1) + _bufferSpeed ("buffer Speed", Float ) = 0.7 [HideInInspector]_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5 } SubShader { @@ -65,6 +66,7 @@ Shader "LightHouse/WaterShader" { uniform float4 _Shore; uniform float _Opacity; uniform float4 _Color; + uniform float _bufferSpeed; struct VertexInput { float4 vertex : POSITION; float3 normal : NORMAL; @@ -106,15 +108,20 @@ Shader "LightHouse/WaterShader" { o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w); float3 recipObjScale = float3( length(unity_WorldToObject[0].xyz), length(unity_WorldToObject[1].xyz), length(unity_WorldToObject[2].xyz) ); float3 objScale = 1.0/recipObjScale; - float4 node_3480 = _Time + _TimeEditor; + float4 node_7529 = _Time + _TimeEditor; + float node_7346 = 10.0; + float node_6302 = (node_7529.g/node_7346); + float node_2710 = sin(node_6302); + float node_4763 = (node_2710*node_7346); float2 node_882 = (o.uv0*objScale.rb); - float2 node_23 = (node_882+node_3480.g*float2(0.05,0)); + float2 node_23 = (node_882+node_4763*float2(0.05,0)); float4 _Perlin_var = tex2Dlod(_Perlin,float4(TRANSFORM_TEX(node_23, _Perlin),0.0,0)); float4 _Diffuse_var = tex2Dlod(_Diffuse,float4(TRANSFORM_TEX(node_23, _Diffuse),0.0,0)); - float2 node_4275 = (node_882+node_3480.g*float2(0.025,0.025)); + float node_6956 = pow((_Diffuse_var.r*1.0+0.0),0.3); + float2 node_4275 = (node_882+node_4763*float2(0.05,0.05)); float4 _Perlin_copy_var = tex2Dlod(_Perlin_copy,float4(TRANSFORM_TEX(node_4275, _Perlin_copy),0.0,0)); float4 node_9449 = _Time + _TimeEditor; - float node_133 = pow(lerp((_Perlin_var.r*pow((_Diffuse_var.r*1.0+0.0),0.3)),_Perlin_copy_var.r,(sin(node_9449.r)*0.5+0.5)),_BulgeShape); // Panning gradient + float node_133 = pow(lerp((_Perlin_var.r*node_6956),(_Perlin_copy_var.r*node_6956),(sin((node_9449.g*_bufferSpeed))*0.5+0.5)),_BulgeShape); // Panning gradient v.vertex.xyz += (node_133*_BulgeScale*v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; @@ -130,16 +137,21 @@ Shader "LightHouse/WaterShader" { i.normalDir = normalize(i.normalDir); float3x3 tangentTransform = float3x3( i.tangentDir, i.bitangentDir, i.normalDir); float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); - float4 node_3480 = _Time + _TimeEditor; + float4 node_7529 = _Time + _TimeEditor; + float node_7346 = 10.0; + float node_6302 = (node_7529.g/node_7346); + float node_2710 = sin(node_6302); + float node_4763 = (node_2710*node_7346); float2 node_882 = (i.uv0*objScale.rb); - float2 node_23 = (node_882+node_3480.g*float2(0.05,0)); + float2 node_23 = (node_882+node_4763*float2(0.05,0)); float4 _Normals_var = tex2D(_Normals,TRANSFORM_TEX(node_23, _Normals)); float4 _Perlin_var = tex2D(_Perlin,TRANSFORM_TEX(node_23, _Perlin)); float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(node_23, _Diffuse)); - float2 node_4275 = (node_882+node_3480.g*float2(0.025,0.025)); + float node_6956 = pow((_Diffuse_var.r*1.0+0.0),0.3); + float2 node_4275 = (node_882+node_4763*float2(0.05,0.05)); float4 _Perlin_copy_var = tex2D(_Perlin_copy,TRANSFORM_TEX(node_4275, _Perlin_copy)); float4 node_9449 = _Time + _TimeEditor; - float node_133 = pow(lerp((_Perlin_var.r*pow((_Diffuse_var.r*1.0+0.0),0.3)),_Perlin_copy_var.r,(sin(node_9449.r)*0.5+0.5)),_BulgeShape); // Panning gradient + float node_133 = pow(lerp((_Perlin_var.r*node_6956),(_Perlin_copy_var.r*node_6956),(sin((node_9449.g*_bufferSpeed))*0.5+0.5)),_BulgeShape); // Panning gradient float3 normalLocal = normalize(lerp(_Normals_var.rgb,float3(0,0,1),node_133)); float3 normalDirection = normalize(mul( normalLocal, tangentTransform )); // Perturbed normals float3 viewReflectDirection = reflect( -viewDirection, normalDirection ); @@ -247,6 +259,7 @@ Shader "LightHouse/WaterShader" { uniform float4 _Shore; uniform float _Opacity; uniform float4 _Color; + uniform float _bufferSpeed; struct VertexInput { float4 vertex : POSITION; float3 normal : NORMAL; @@ -278,15 +291,20 @@ Shader "LightHouse/WaterShader" { o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w); float3 recipObjScale = float3( length(unity_WorldToObject[0].xyz), length(unity_WorldToObject[1].xyz), length(unity_WorldToObject[2].xyz) ); float3 objScale = 1.0/recipObjScale; - float4 node_175 = _Time + _TimeEditor; + float4 node_7529 = _Time + _TimeEditor; + float node_7346 = 10.0; + float node_6302 = (node_7529.g/node_7346); + float node_2710 = sin(node_6302); + float node_4763 = (node_2710*node_7346); float2 node_882 = (o.uv0*objScale.rb); - float2 node_23 = (node_882+node_175.g*float2(0.05,0)); + float2 node_23 = (node_882+node_4763*float2(0.05,0)); float4 _Perlin_var = tex2Dlod(_Perlin,float4(TRANSFORM_TEX(node_23, _Perlin),0.0,0)); float4 _Diffuse_var = tex2Dlod(_Diffuse,float4(TRANSFORM_TEX(node_23, _Diffuse),0.0,0)); - float2 node_4275 = (node_882+node_175.g*float2(0.025,0.025)); + float node_6956 = pow((_Diffuse_var.r*1.0+0.0),0.3); + float2 node_4275 = (node_882+node_4763*float2(0.05,0.05)); float4 _Perlin_copy_var = tex2Dlod(_Perlin_copy,float4(TRANSFORM_TEX(node_4275, _Perlin_copy),0.0,0)); float4 node_9449 = _Time + _TimeEditor; - float node_133 = pow(lerp((_Perlin_var.r*pow((_Diffuse_var.r*1.0+0.0),0.3)),_Perlin_copy_var.r,(sin(node_9449.r)*0.5+0.5)),_BulgeShape); // Panning gradient + float node_133 = pow(lerp((_Perlin_var.r*node_6956),(_Perlin_copy_var.r*node_6956),(sin((node_9449.g*_bufferSpeed))*0.5+0.5)),_BulgeShape); // Panning gradient v.vertex.xyz += (node_133*_BulgeScale*v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); float3 lightColor = _LightColor0.rgb; @@ -303,16 +321,21 @@ Shader "LightHouse/WaterShader" { i.normalDir = normalize(i.normalDir); float3x3 tangentTransform = float3x3( i.tangentDir, i.bitangentDir, i.normalDir); float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); - float4 node_175 = _Time + _TimeEditor; + float4 node_7529 = _Time + _TimeEditor; + float node_7346 = 10.0; + float node_6302 = (node_7529.g/node_7346); + float node_2710 = sin(node_6302); + float node_4763 = (node_2710*node_7346); float2 node_882 = (i.uv0*objScale.rb); - float2 node_23 = (node_882+node_175.g*float2(0.05,0)); + float2 node_23 = (node_882+node_4763*float2(0.05,0)); float4 _Normals_var = tex2D(_Normals,TRANSFORM_TEX(node_23, _Normals)); float4 _Perlin_var = tex2D(_Perlin,TRANSFORM_TEX(node_23, _Perlin)); float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(node_23, _Diffuse)); - float2 node_4275 = (node_882+node_175.g*float2(0.025,0.025)); + float node_6956 = pow((_Diffuse_var.r*1.0+0.0),0.3); + float2 node_4275 = (node_882+node_4763*float2(0.05,0.05)); float4 _Perlin_copy_var = tex2D(_Perlin_copy,TRANSFORM_TEX(node_4275, _Perlin_copy)); float4 node_9449 = _Time + _TimeEditor; - float node_133 = pow(lerp((_Perlin_var.r*pow((_Diffuse_var.r*1.0+0.0),0.3)),_Perlin_copy_var.r,(sin(node_9449.r)*0.5+0.5)),_BulgeShape); // Panning gradient + float node_133 = pow(lerp((_Perlin_var.r*node_6956),(_Perlin_copy_var.r*node_6956),(sin((node_9449.g*_bufferSpeed))*0.5+0.5)),_BulgeShape); // Panning gradient float3 normalLocal = normalize(lerp(_Normals_var.rgb,float3(0,0,1),node_133)); float3 normalDirection = normalize(mul( normalLocal, tangentTransform )); // Perturbed normals float sceneZ = max(0,LinearEyeDepth (UNITY_SAMPLE_DEPTH(tex2Dproj(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos)))) - _ProjectionParams.g); @@ -381,6 +404,7 @@ Shader "LightHouse/WaterShader" { uniform float _BulgeShape; uniform sampler2D _Perlin; uniform float4 _Perlin_ST; uniform sampler2D _Perlin_copy; uniform float4 _Perlin_copy_ST; + uniform float _bufferSpeed; struct VertexInput { float4 vertex : POSITION; float3 normal : NORMAL; @@ -404,15 +428,20 @@ Shader "LightHouse/WaterShader" { o.normalDir = UnityObjectToWorldNormal(v.normal); float3 recipObjScale = float3( length(unity_WorldToObject[0].xyz), length(unity_WorldToObject[1].xyz), length(unity_WorldToObject[2].xyz) ); float3 objScale = 1.0/recipObjScale; - float4 node_8823 = _Time + _TimeEditor; + float4 node_7529 = _Time + _TimeEditor; + float node_7346 = 10.0; + float node_6302 = (node_7529.g/node_7346); + float node_2710 = sin(node_6302); + float node_4763 = (node_2710*node_7346); float2 node_882 = (o.uv0*objScale.rb); - float2 node_23 = (node_882+node_8823.g*float2(0.05,0)); + float2 node_23 = (node_882+node_4763*float2(0.05,0)); float4 _Perlin_var = tex2Dlod(_Perlin,float4(TRANSFORM_TEX(node_23, _Perlin),0.0,0)); float4 _Diffuse_var = tex2Dlod(_Diffuse,float4(TRANSFORM_TEX(node_23, _Diffuse),0.0,0)); - float2 node_4275 = (node_882+node_8823.g*float2(0.025,0.025)); + float node_6956 = pow((_Diffuse_var.r*1.0+0.0),0.3); + float2 node_4275 = (node_882+node_4763*float2(0.05,0.05)); float4 _Perlin_copy_var = tex2Dlod(_Perlin_copy,float4(TRANSFORM_TEX(node_4275, _Perlin_copy),0.0,0)); float4 node_9449 = _Time + _TimeEditor; - float node_133 = pow(lerp((_Perlin_var.r*pow((_Diffuse_var.r*1.0+0.0),0.3)),_Perlin_copy_var.r,(sin(node_9449.r)*0.5+0.5)),_BulgeShape); // Panning gradient + float node_133 = pow(lerp((_Perlin_var.r*node_6956),(_Perlin_copy_var.r*node_6956),(sin((node_9449.g*_bufferSpeed))*0.5+0.5)),_BulgeShape); // Panning gradient v.vertex.xyz += (node_133*_BulgeScale*v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); o.pos = mul(UNITY_MATRIX_MVP, v.vertex ); @@ -466,6 +495,7 @@ Shader "LightHouse/WaterShader" { uniform float _ShoreBlend; uniform float4 _Shore; uniform float4 _Color; + uniform float _bufferSpeed; struct VertexInput { float4 vertex : POSITION; float3 normal : NORMAL; @@ -490,15 +520,20 @@ Shader "LightHouse/WaterShader" { o.normalDir = UnityObjectToWorldNormal(v.normal); float3 recipObjScale = float3( length(unity_WorldToObject[0].xyz), length(unity_WorldToObject[1].xyz), length(unity_WorldToObject[2].xyz) ); float3 objScale = 1.0/recipObjScale; - float4 node_4394 = _Time + _TimeEditor; + float4 node_7529 = _Time + _TimeEditor; + float node_7346 = 10.0; + float node_6302 = (node_7529.g/node_7346); + float node_2710 = sin(node_6302); + float node_4763 = (node_2710*node_7346); float2 node_882 = (o.uv0*objScale.rb); - float2 node_23 = (node_882+node_4394.g*float2(0.05,0)); + float2 node_23 = (node_882+node_4763*float2(0.05,0)); float4 _Perlin_var = tex2Dlod(_Perlin,float4(TRANSFORM_TEX(node_23, _Perlin),0.0,0)); float4 _Diffuse_var = tex2Dlod(_Diffuse,float4(TRANSFORM_TEX(node_23, _Diffuse),0.0,0)); - float2 node_4275 = (node_882+node_4394.g*float2(0.025,0.025)); + float node_6956 = pow((_Diffuse_var.r*1.0+0.0),0.3); + float2 node_4275 = (node_882+node_4763*float2(0.05,0.05)); float4 _Perlin_copy_var = tex2Dlod(_Perlin_copy,float4(TRANSFORM_TEX(node_4275, _Perlin_copy),0.0,0)); float4 node_9449 = _Time + _TimeEditor; - float node_133 = pow(lerp((_Perlin_var.r*pow((_Diffuse_var.r*1.0+0.0),0.3)),_Perlin_copy_var.r,(sin(node_9449.r)*0.5+0.5)),_BulgeShape); // Panning gradient + float node_133 = pow(lerp((_Perlin_var.r*node_6956),(_Perlin_copy_var.r*node_6956),(sin((node_9449.g*_bufferSpeed))*0.5+0.5)),_BulgeShape); // Panning gradient v.vertex.xyz += (node_133*_BulgeScale*v.normal); o.posWorld = mul(unity_ObjectToWorld, v.vertex); o.pos = UnityMetaVertexPosition(v.vertex, v.texcoord1.xy, v.texcoord2.xy, unity_LightmapST, unity_DynamicLightmapST ); @@ -519,15 +554,20 @@ Shader "LightHouse/WaterShader" { o.Emission = 0; - float4 node_4394 = _Time + _TimeEditor; + float4 node_7529 = _Time + _TimeEditor; + float node_7346 = 10.0; + float node_6302 = (node_7529.g/node_7346); + float node_2710 = sin(node_6302); + float node_4763 = (node_2710*node_7346); float2 node_882 = (i.uv0*objScale.rb); - float2 node_23 = (node_882+node_4394.g*float2(0.05,0)); + float2 node_23 = (node_882+node_4763*float2(0.05,0)); float4 _Diffuse_var = tex2D(_Diffuse,TRANSFORM_TEX(node_23, _Diffuse)); float4 _Perlin_var = tex2D(_Perlin,TRANSFORM_TEX(node_23, _Perlin)); - float2 node_4275 = (node_882+node_4394.g*float2(0.025,0.025)); + float node_6956 = pow((_Diffuse_var.r*1.0+0.0),0.3); + float2 node_4275 = (node_882+node_4763*float2(0.05,0.05)); float4 _Perlin_copy_var = tex2D(_Perlin_copy,TRANSFORM_TEX(node_4275, _Perlin_copy)); float4 node_9449 = _Time + _TimeEditor; - float node_133 = pow(lerp((_Perlin_var.r*pow((_Diffuse_var.r*1.0+0.0),0.3)),_Perlin_copy_var.r,(sin(node_9449.r)*0.5+0.5)),_BulgeShape); // Panning gradient + float node_133 = pow(lerp((_Perlin_var.r*node_6956),(_Perlin_copy_var.r*node_6956),(sin((node_9449.g*_bufferSpeed))*0.5+0.5)),_BulgeShape); // Panning gradient float3 node_149 = lerp((_Color.rgb*_Diffuse_var.rgb),_GlowColor.rgb,node_133); float3 diffColor = lerp(_Shore.rgb,node_149,saturate((sceneZ-partZ)/_ShoreBlend)); float3 specColor = (1.0 - node_149);