portals and dash. Also a bit of terrain building and level design

This commit is contained in:
2022-03-13 00:26:35 +02:00
parent 813cd0c451
commit e82799c36a
6242 changed files with 2160679 additions and 188245 deletions

View File

@@ -0,0 +1,163 @@
#ifndef BUILTIN_RP_FORWARD_ADD_INCLUDED
#define BUILTIN_RP_FORWARD_ADD_INCLUDED
#define _ALPHABLEND_ON 1
#include "HLSLSupport.cginc"
#include "UnityShaderVariables.cginc"
#include "UnityShaderUtilities.cginc"
#include "UnityCG.cginc"
#include "UnityLightingCommon.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#include "AutoLight.cginc"
#if AURA_LIGHTING || AURA_FOG
#include "Assets/Aura 2/Core/Code/Shaders/Aura.cginc"
#endif
struct Varyings
{
UNITY_POSITION(pos);
float3 positionWS : TEXCOORD1;
#if FLAT_LIGHTING
float3 positionLS : TEXCOORD2;
#endif
float4 positionSS : TEXCOORD3;
float3 normalWS : TEXCOORD4;
#if WAVE
float crestMask : TEXCOORD5;
#endif
UNITY_LIGHTING_COORDS(6, 7)
UNITY_FOG_COORDS(8)
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
#if AURA_LIGHTING || AURA_FOG
float3 positionAura : TEXCOORD9;
#endif
};
Varyings vert(appdata_full v)
{
UNITY_SETUP_INSTANCE_ID(v);
Varyings o;
UNITY_INITIALIZE_OUTPUT(Varyings, o);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#if MESH_NOISE && !defined(POSEIDON_RIVER)
ApplyMeshNoise(v.vertex, v.texcoord, v.color);
#endif
#if WAVE
ApplyWaveHQ(v.vertex, v.texcoord, v.color, o.crestMask);
#endif
#if defined(POSEIDON_RIVER)
ApplyRipple(v.vertex, v.texcoord, v.color, v.texcoord1);
#else
ApplyRipple(v.vertex, v.texcoord, v.color);
#endif
CalculateNormal(v.vertex, v.texcoord, v.color, v.normal);
o.pos = UnityObjectToClipPos(v.vertex);
o.positionWS = mul(unity_ObjectToWorld, v.vertex).xyz;
#if FLAT_LIGHTING
float3 centerVertex = (v.vertex.xyz + v.texcoord.xyz + v.color.xyz) / 3.0;
o.positionLS = mul(unity_ObjectToWorld, float4(centerVertex, 1)).xyz;
#endif
o.normalWS = UnityObjectToWorldNormal(v.normal);
o.positionSS = ComputeScreenPos(o.pos);
UNITY_TRANSFER_LIGHTING(o, i.texcoord1.xy);
UNITY_TRANSFER_FOG(o, o.pos);
#if AURA_LIGHTING || AURA_FOG
o.positionAura = Aura2_GetFrustumSpaceCoordinates(v.vertex);
#endif
return o;
}
fixed4 frag(Varyings i) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(i);
//Unpack data
float3 positionWS = i.positionWS;
#if FLAT_LIGHTING
float3 positionLS = i.positionLS;
#else
float3 positionLS = i.positionWS;
#endif
float4 positionSS = i.positionSS;
float3 normalWS = i.normalWS;
//Prepare and call SurfaceFunction
SurfaceInput surfIn;
UNITY_INITIALIZE_OUTPUT(SurfaceInput, surfIn);
surfIn.positionWS = positionWS;
surfIn.positionSS = positionSS;
surfIn.normalWS = normalWS;
#if WAVE
surfIn.crestMask = i.crestMask;
#endif
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
SurfaceOutput surfOut = (SurfaceOutput)0;
surfOut.Gloss = 0.5;
surfOut.Specular = 0;
#else
SurfaceOutputStandardSpecular surfOut = (SurfaceOutputStandardSpecular)0;
surfOut.Smoothness = 0;
surfOut.Specular = 0;
surfOut.Occlusion = 1;
#endif
surfOut.Albedo = 0;
surfOut.Emission = 0;
surfOut.Alpha = 0;
surfOut.Normal = normalWS;
SURFACE_FUNCTION(surfIn, surfOut);
#if AURA_LIGHTING
Aura2_ApplyLighting(surfOut.Albedo, i.positionAura, _AuraLightingFactor);
#endif
//Calculate lighting
fixed4 finalColor = 0;
//Compute lighting & shadowing factor
UNITY_LIGHT_ATTENUATION(lightAtten, i, positionLS);
//Setup lighting environment
#ifndef USING_DIRECTIONAL_LIGHT
fixed3 lightDirection = normalize(UnityWorldSpaceLightDir(positionLS));
#else
fixed3 lightDirection = _WorldSpaceLightPos0.xyz;
#endif
float3 viewDirectionWS = normalize(UnityWorldSpaceViewDir(positionLS));
UnityGI gi;
UNITY_INITIALIZE_OUTPUT(UnityGI, gi);
gi.indirect.diffuse = 0;
gi.indirect.specular = 0;
gi.light.color = _LightColor0;
gi.light.dir = lightDirection;
gi.light.color *= lightAtten;
#if LIGHTING_LAMBERT
finalColor += LightingLambert(surfOut, gi);
#elif LIGHTING_BLINN_PHONG
finalColor += LightingBlinnPhong(surfOut, viewDirectionWS, gi);
#else
finalColor += LightingStandardSpecular(surfOut, viewDirectionWS, gi);
#endif
UNITY_APPLY_FOG(i.fogCoord, finalColor);
#if AURA_FOG
Aura2_ApplyFog(finalColor, i.positionAura);
#endif
return finalColor;
}
#endif

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 447087d6c8e6f0a47b0b0210d02223e0
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,212 @@
#ifndef BUILTIN_RP_FORWARD_BASE_INCLUDED
#define BUILTIN_RP_FORWARD_BASE_INCLUDED
#define _ALPHABLEND_ON 1
#include "HLSLSupport.cginc"
#include "UnityShaderVariables.cginc"
#include "UnityShaderUtilities.cginc"
#include "UnityCG.cginc"
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#include "AutoLight.cginc"
#if AURA_LIGHTING || AURA_FOG
#include "Assets/Aura 2/Core/Code/Shaders/Aura.cginc"
#endif
struct Varyings
{
UNITY_POSITION(pos);
float3 positionWS : TEXCOORD1;
#if FLAT_LIGHTING
float3 positionLS : TEXCOORD2;
#endif
float4 positionSS : TEXCOORD3;
float3 normalWS : TEXCOORD4;
#if WAVE
float crestMask : TEXCOORD5;
#endif
#if UNITY_SHOULD_SAMPLE_SH
fixed3 lightSH : TEXCOORD6;
#endif
UNITY_LIGHTING_COORDS(7,8)
UNITY_FOG_COORDS(9)
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
#if AURA_LIGHTING || AURA_FOG
float3 positionAura : TEXCOORD10;
#endif
};
Varyings vert(appdata_full v)
{
UNITY_SETUP_INSTANCE_ID(v);
Varyings o;
UNITY_INITIALIZE_OUTPUT(Varyings, o);
UNITY_TRANSFER_INSTANCE_ID(v, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
#if MESH_NOISE && !defined(POSEIDON_RIVER)
ApplyMeshNoise(v.vertex, v.texcoord, v.color);
#endif
#if WAVE
ApplyWaveHQ(v.vertex, v.texcoord, v.color, o.crestMask);
#endif
#if defined(POSEIDON_RIVER)
ApplyRipple(v.vertex, v.texcoord, v.color, v.texcoord1);
#else
ApplyRipple(v.vertex, v.texcoord, v.color);
#endif
CalculateNormal(v.vertex, v.texcoord, v.color, v.normal);
o.pos = UnityObjectToClipPos(v.vertex);
o.positionWS = mul(unity_ObjectToWorld, v.vertex).xyz;
#if FLAT_LIGHTING
float3 centerVertex = (v.vertex.xyz + v.texcoord.xyz + v.color.xyz) / 3.0;
o.positionLS = mul(unity_ObjectToWorld, float4(centerVertex, 1)).xyz;
#endif
o.normalWS = UnityObjectToWorldNormal(v.normal);
o.positionSS = ComputeScreenPos(o.pos);
#if FLAT_LIGHTING
float3 positionLS = o.positionLS;
#else
float3 positionLS = o.positionWS;
#endif
//Vertex lights and SH
#if UNITY_SHOULD_SAMPLE_SH && !UNITY_SAMPLE_FULL_SH_PER_PIXEL
o.lightSH = 0;
#ifdef VERTEXLIGHT_ON
o.lightSH += Shade4PointLights(
unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0,
unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb,
unity_4LightAtten0, positionLS, o.normalWS);
#endif
o.lightSH = ShadeSHPerVertex(o.normalWS, o.lightSH);
#endif
UNITY_TRANSFER_LIGHTING(o, i.texcoord1.xy);
UNITY_TRANSFER_FOG(o, o.pos);
#if AURA_LIGHTING || AURA_FOG
o.positionAura = Aura2_GetFrustumSpaceCoordinates(v.vertex);
#endif
return o;
}
fixed4 frag(Varyings i) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
//Unpack data
float3 positionWS = i.positionWS;
#if FLAT_LIGHTING
float3 positionLS = i.positionLS;
#else
float3 positionLS = i.positionWS;
#endif
float4 positionSS = i.positionSS;
float3 normalWS = i.normalWS;
//Prepare and call SurfaceFunction
SurfaceInput surfIn;
UNITY_INITIALIZE_OUTPUT(SurfaceInput, surfIn);
surfIn.positionWS = positionWS;
surfIn.positionSS = positionSS;
surfIn.normalWS = normalWS;
#if WAVE
surfIn.crestMask = i.crestMask;
#endif
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
SurfaceOutput surfOut = (SurfaceOutput)0;
surfOut.Gloss = 0.5;
surfOut.Specular = 0;
#else
SurfaceOutputStandardSpecular surfOut = (SurfaceOutputStandardSpecular)0;
surfOut.Smoothness = 0;
surfOut.Specular = 0;
surfOut.Occlusion = 1;
#endif
surfOut.Albedo = 0;
surfOut.Emission = 0;
surfOut.Alpha = 0;
surfOut.Normal = normalWS;
SURFACE_FUNCTION(surfIn, surfOut);
#if AURA_LIGHTING
Aura2_ApplyLighting(surfOut.Albedo, i.positionAura, _AuraLightingFactor);
#endif
//Calculate lighting
fixed4 finalColor = 0;
//Compute lighting & shadowing factor
UNITY_LIGHT_ATTENUATION(lightAtten, i, positionLS);
//Setup lighting environment
#ifndef USING_DIRECTIONAL_LIGHT
fixed3 lightDirection = normalize(UnityWorldSpaceLightDir(positionLS));
#else
fixed3 lightDirection = _WorldSpaceLightPos0.xyz;
#endif
float3 viewDirectionWS = normalize(UnityWorldSpaceViewDir(positionLS));
UnityGI gi;
UNITY_INITIALIZE_OUTPUT(UnityGI, gi);
gi.indirect.diffuse = 0;
gi.indirect.specular = 0;
gi.light.color = _LightColor0.rgb;
gi.light.dir = lightDirection;
UnityGIInput giInput;
UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput);
giInput.light = gi.light;
giInput.worldPos = positionLS;
giInput.worldViewDir = viewDirectionWS;
giInput.atten = lightAtten;
giInput.lightmapUV = 0;
#if UNITY_SHOULD_SAMPLE_SH && !UNITY_SAMPLE_FULL_SH_PER_PIXEL
giInput.ambient = i.lightSH;
#else
giInput.ambient = 0;
#endif
giInput.probeHDR[0] = unity_SpecCube0_HDR;
giInput.probeHDR[1] = unity_SpecCube1_HDR;
#if defined(UNITY_SPECCUBE_BLENDING) || defined(UNITY_SPECCUBE_BOX_PROJECTION)
giInput.boxMin[0] = unity_SpecCube0_BoxMin;
#endif
#ifdef UNITY_SPECCUBE_BOX_PROJECTION
giInput.boxMax[0] = unity_SpecCube0_BoxMax;
giInput.probePosition[0] = unity_SpecCube0_ProbePosition;
giInput.boxMin[1] = unity_SpecCube1_BoxMin;
giInput.boxMax[1] = unity_SpecCube1_BoxMax;
giInput.probePosition[1] = unity_SpecCube1_ProbePosition;
#endif
#if LIGHTING_LAMBERT
LightingLambert_GI(surfOut, giInput, gi);
finalColor += LightingLambert(surfOut, gi);
#elif LIGHTING_BLINN_PHONG
LightingBlinnPhong_GI(surfOut, giInput, gi);
finalColor += LightingBlinnPhong(surfOut, viewDirectionWS, gi);
#else
LightingStandardSpecular_GI(surfOut, giInput, gi);
finalColor += LightingStandardSpecular(surfOut, viewDirectionWS, gi);
#endif
UNITY_APPLY_FOG(i.fogCoord, finalColor);
#if AURA_FOG
Aura2_ApplyFog(finalColor, i.positionAura);
#endif
return finalColor;
}
#endif

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 72fbdc83820bf7a44b4bb3d456a0ae6e
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,239 @@
#ifndef BUILTIN_RP_SURFACE_FUNCTION_INCLUDED
#define BUILTIN_RP_SURFACE_FUNCTION_INCLUDED
struct SurfaceInput
{
float3 positionWS;
float4 positionSS;
float3 normalWS;
float crestMask;
};
#if defined(POSEIDON_WATER_ADVANCED)
#if defined(POSEIDON_BACK_FACE)
#define SURFACE_FUNCTION(i, o) surfBackFace(i, o);
#else
#define SURFACE_FUNCTION(i, o) surfAdvanced(i, o);
#endif
#elif defined(POSEIDON_RIVER)
#define SURFACE_FUNCTION(i, o) surfRiver(i, o);
#else
#define SURFACE_FUNCTION(i, o) surfBasic(i, o);
#endif
#ifndef POSEIDON_WATER_ADVANCED
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
void surfBasic(SurfaceInput i, inout SurfaceOutput o)
#else
void surfBasic(SurfaceInput i, inout SurfaceOutputStandardSpecular o)
#endif
{
float fresnel;
CalculateFresnelFactor(i.positionWS, i.normalWS, fresnel);
float4 waterColor = _Color;
float4 tintColor = _Color;
#if LIGHT_ABSORPTION || FOAM
float sceneDepth = GetSceneDepth(i.positionSS);
float surfaceDepth = GetSurfaceDepth(float4(i.positionWS, 1));
#endif
#if LIGHT_ABSORPTION
CalculateDeepWaterColor(sceneDepth, surfaceDepth, tintColor);
#endif
waterColor = lerp(waterColor, tintColor, fresnel);
half4 foamColor = half4(0, 0, 0, 0);
#if FOAM
#if FOAM_HQ
CalculateFoamColorHQ(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, i.crestMask, foamColor);
#else
CalculateFoamColor(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, i.crestMask, foamColor);
#endif
#endif
waterColor = saturate(waterColor);
o.Albedo = lerp(waterColor.rgb, foamColor.rgb, foamColor.a);
o.Alpha = lerp(waterColor.a, foamColor.a, foamColor.a);
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
o.Specular = saturate(_Smoothness - foamColor.a);
#else
o.Specular = _Specular;
o.Smoothness = saturate(_Smoothness - foamColor.a);
#endif
}
#endif //!POSEIDON_WATER_ADVANCED
#if defined(POSEIDON_WATER_ADVANCED)
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
void surfAdvanced(SurfaceInput i, inout SurfaceOutput o)
#else
void surfAdvanced(SurfaceInput i, inout SurfaceOutputStandardSpecular o)
#endif
{
#if LIGHT_ABSORPTION || CAUSTIC || FOAM
float sceneDepth = GetSceneDepth(i.positionSS);
float surfaceDepth = GetSurfaceDepth(float4(i.positionWS, 1));
#if LIGHT_ABSORPTION
float depthFade = GetDepthFade(sceneDepth, surfaceDepth, _MaxDepth);
#endif
#endif
float4 waterColor;
float4 tintColor = _Color;
#if LIGHT_ABSORPTION
CalculateDeepWaterColor(sceneDepth, surfaceDepth, tintColor);
#endif
float fresnel;
CalculateFresnelFactor(i.positionWS, i.normalWS, fresnel);
float4 reflColor = _Color;
#if REFLECTION && !UNITY_SINGLE_PASS_STEREO && !STEREO_INSTANCING_ON && !UNITY_STEREO_MULTIVIEW_ENABLED
SampleReflectionTexture(i.positionSS, i.normalWS, reflColor);
#endif
float4 refrColor = _DepthColor;
#if REFRACTION
SampleRefractionTexture(i.positionSS, i.normalWS, refrColor);
#if LIGHT_ABSORPTION
refrColor = lerp(_DepthColor, refrColor, depthFade);
#endif
#endif
half4 causticColor = half4(0, 0, 0, 0);
#if CAUSTIC
SampleCausticTexture(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, causticColor);
#if LIGHT_ABSORPTION
causticColor *= depthFade;
#endif
#endif
refrColor += causticColor;
waterColor = tintColor * lerp(refrColor, reflColor, fresnel);
waterColor = waterColor * tintColor.a + (1 - tintColor.a) * refrColor;
waterColor = saturate(waterColor);
half4 foamColor = half4(0, 0, 0, 0);
#if FOAM
#if FOAM_HQ
CalculateFoamColorHQ(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, i.crestMask, foamColor);
#else
CalculateFoamColor(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, i.crestMask, foamColor);
#endif
#endif
o.Albedo = lerp(waterColor.rgb, foamColor.rgb, foamColor.a);
o.Alpha = lerp(tintColor.a, foamColor.a, foamColor.a);
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
o.Specular = saturate(_Smoothness - foamColor.a);
#else
o.Specular = _Specular;
o.Smoothness = saturate(_Smoothness - foamColor.a);
#endif
}
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
void surfBackFace(SurfaceInput i, inout SurfaceOutput o)
#else
void surfBackFace(SurfaceInput i, inout SurfaceOutputStandardSpecular o)
#endif
{
float sceneDepth = GetSceneDepth(i.positionSS);
float surfaceDepth = GetSurfaceDepth(float4(i.positionWS, 1));
float4 waterColor;
float4 tintColor = _Color;
float fresnel;
CalculateFresnelFactor(i.positionWS, -i.normalWS, fresnel);
float4 reflColor = _Color;
float4 refrColor = _Color;
SampleRefractionTexture(i.positionSS, i.normalWS, refrColor);
waterColor = tintColor * lerp(refrColor, reflColor, fresnel);
waterColor = waterColor * tintColor.a + (1 - tintColor.a) * refrColor;
waterColor = saturate(waterColor);
half4 foamColor = half4(0, 0, 0, 0);
#if FOAM
#if FOAM_HQ
CalculateFoamColorHQ(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, i.crestMask, foamColor);
#else
CalculateFoamColor(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, i.crestMask, foamColor);
#endif
foamColor.a *= 0.5;
#endif
o.Albedo = lerp(waterColor.rgb, foamColor.rgb, foamColor.a);
o.Alpha = lerp(tintColor.a, foamColor.a, foamColor.a);
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
o.Specular = saturate(_Smoothness - foamColor.a);
#else
o.Specular = _Specular;
o.Smoothness = saturate(_Smoothness - foamColor.a);
#endif
}
#endif //POSEIDON_WATER_ADVANCED
#if defined(POSEIDON_RIVER)
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
void surfRiver(SurfaceInput i, inout SurfaceOutput o)
#else
void surfRiver(SurfaceInput i, inout SurfaceOutputStandardSpecular o)
#endif
{
float sceneDepth = GetSceneDepth(i.positionSS);
float surfaceDepth = GetSurfaceDepth(float4(i.positionWS, 1));
#if LIGHT_ABSORPTION
float depthFade = GetDepthFade(sceneDepth, surfaceDepth, _MaxDepth);
#endif
float4 waterColor;
float4 tintColor = _Color;
#if LIGHT_ABSORPTION
CalculateDeepWaterColor(sceneDepth, surfaceDepth, tintColor);
#endif
float fresnel;
CalculateFresnelFactor(i.positionWS, i.normalWS, fresnel);
float4 refrColor = _DepthColor;
SampleRefractionTexture(i.positionSS, i.normalWS, refrColor);
#if LIGHT_ABSORPTION
refrColor = lerp(_DepthColor, refrColor, depthFade);
#endif
half4 causticColor = half4(0, 0, 0, 0);
#if CAUSTIC
SampleCausticTexture(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, causticColor);
#if LIGHT_ABSORPTION
causticColor *= depthFade;
#endif
#endif
refrColor += causticColor;
waterColor = lerp(refrColor, tintColor, tintColor.a * fresnel);
half4 foamColor = half4(0, 0, 0, 0);
#if FOAM
#if FOAM_HQ
CalculateFoamColorHQ(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, i.crestMask, foamColor);
#else
CalculateFoamColor(sceneDepth, surfaceDepth, float4(i.positionWS, 1), i.normalWS, i.crestMask, foamColor);
#endif
#endif
o.Albedo = lerp(waterColor.rgb, foamColor.rgb, foamColor.a);
o.Alpha = 1;
#if LIGHTING_LAMBERT || LIGHTING_BLINN_PHONG
o.Specular = saturate(_Smoothness - foamColor.a);
#else
o.Specular = _Specular;
o.Smoothness = saturate(_Smoothness - foamColor.a);
#endif
}
#endif //POSEIDON_RIVER
#endif //BUILTIN_RP_SURFACE_FUNCTION_INCLUDED

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c6345bc57dfc38b4b8a82b87ba0f9da9
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,170 @@
Shader "Poseidon/Default/River"
{
Properties
{
[HideInInspector] _Color("Color", Color) = (0.0, 0.8, 1.0, 0.5)
[HideInInspector] _Specular("Specular Color", Color) = (0.1, 0.1, 0.1, 1)
[HideInInspector] _Smoothness("Smoothness", Range(0.0, 1.0)) = 1
[HideInInspector] _DepthColor("Depth Color", Color) = (0.0, 0.45, 0.65, 0.85)
[HideInInspector] _MaxDepth("Max Depth", Float) = 5
[HideInInspector] _FoamColor("Foam Color", Color) = (1, 1, 1, 1)
[HideInInspector] _FoamDistance("Foam Distance", Float) = 1.2
[HideInInspector] _FoamNoiseScaleHQ("Foam Noise Scale HQ", Float) = 3
[HideInInspector] _FoamNoiseSpeedHQ("Foam Noise Speed HQ", Float) = 1
[HideInInspector] _ShorelineFoamStrength("Shoreline Foam Strength", Float) = 1
[HideInInspector] _CrestFoamStrength("Crest Foam Strength", Float) = 1
[HideInInspector] _CrestMaxDepth("Crest Max Depth", Float) = 1
[HideInInspector] _SlopeFoamStrength("Slope Foam Strength", Float) = 0.5
[HideInInspector] _SlopeFoamFlowSpeed("Slope Foam Flow Speed", Float) = 20
[HideInInspector] _SlopeFoamDistance("Slope Foam Distance", Float) = 100
[HideInInspector] _RippleHeight("Ripple Height", Range(0, 1)) = 0.1
[HideInInspector] _RippleSpeed("Ripple Speed", Float) = 5
[HideInInspector] _RippleNoiseScale("Ripple Noise Scale", Float) = 1
[HideInInspector] _WaveDirection("Wave Direction", Vector) = (1, 0, 0, 0)
[HideInInspector] _WaveSpeed("Wave Speed", Float) = 1
[HideInInspector] _WaveHeight("Wave Height", Float) = 1
[HideInInspector] _WaveLength("Wave Length", Float) = 1
[HideInInspector] _WaveSteepness("Wave Steepness", Float) = 1
[HideInInspector] _WaveDeform("Wave Deform", Float) = 0.3
[HideInInspector] _WaveMask("Wave Mask", 2D) = "white" {}
[HideInInspector] _WaveMaskBounds("Wave Mask", Vector) = (0, 0, 0, 0)
[HideInInspector] _FresnelStrength("Fresnel Strength", Range(0.0, 5.0)) = 1
[HideInInspector] _FresnelBias("Fresnel Bias", Range(0.0, 1.0)) = 0
[HideInInspector] _RefractionDistortionStrength("Refraction Distortion Strength", Float) = 1
[HideInInspector] _CausticTex("Caustic Texture", 2D) = "black" { }
[HideInInspector] _CausticSize("Caustic Size", Float) = 1
[HideInInspector] _CausticStrength("Caustic Strength", Range(0.0, 1.0)) = 1
[HideInInspector] _CausticDistortionStrength("Caustic Distortion Strength", Float) = 1
[HideInInspector] _AuraLightingFactor("Aura Lighting Factor", Float) = 1
}
SubShader
{
LOD 200
GrabPass
{
"_RefractionTex"
}
Pass
{
Name "FORWARD"
Tags { "LightMode" = "ForwardBase"
"RenderType" = "Transparent"
"Queue" = "Transparent+0" }
Cull Back
ZWrite On
ZTest LEqual
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_instancing
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#define UNITY_INSTANCED_LOD_FADE
#define UNITY_INSTANCED_SH
#define UNITY_INSTANCED_LIGHTMAPSTS
#pragma shader_feature_local WAVE
#pragma shader_feature_local WAVE_MASK
#pragma shader_feature_local LIGHT_ABSORPTION
#pragma shader_feature_local FOAM
#pragma shader_feature_local FOAM_HQ
#pragma shader_feature_local FOAM_CREST
#pragma shader_feature_local FOAM_SLOPE
#pragma shader_feature_local CAUSTIC
#pragma shader_feature_local LIGHTING_BLINN_PHONG
#pragma shader_feature_local LIGHTING_LAMBERT
#pragma shader_feature_local FLAT_LIGHTING
#pragma shader_feature_local AURA_LIGHTING
#pragma shader_feature_local AURA_FOG
#define POSEIDON_RIVER
#undef POSEIDON_WATER_ADVANCED
#undef POSEIDON_BACK_FACE
#undef POSEIDON_SRP
#include "../CGIncludes/PUniforms.cginc"
#include "../CGIncludes/PWave.cginc"
#include "../CGIncludes/PLightAbsorption.cginc"
#include "../CGIncludes/PFoam.cginc"
#include "../CGIncludes/PRipple.cginc"
#include "../CGIncludes/PFresnel.cginc"
#include "../CGIncludes/PRefraction.cginc"
#include "../CGIncludes/PCaustic.cginc"
#include "BuiltinRP_SurfaceFunction.cginc"
#include "BuiltinRP_ForwardBase.cginc"
ENDCG
}
Pass
{
Name "FORWARD_ADD"
Tags { "LightMode" = "ForwardAdd"
"RenderType" = "Transparent"
"Queue" = "Transparent+0" }
Blend SrcAlpha One
Cull Back
ZTest LEqual
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma skip_variants INSTANCING_ON
#pragma multi_compile_fwdadd_fullshadows noshadow
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#define UNITY_INSTANCED_LOD_FADE
#define UNITY_INSTANCED_SH
#define UNITY_INSTANCED_LIGHTMAPSTS
#pragma shader_feature_local WAVE
#pragma shader_feature_local WAVE_MASK
#pragma shader_feature_local LIGHT_ABSORPTION
#pragma shader_feature_local FOAM
#pragma shader_feature_local FOAM_HQ
#pragma shader_feature_local FOAM_CREST
#pragma shader_feature_local FOAM_SLOPE
#pragma shader_feature_local CAUSTIC
#pragma shader_feature_local LIGHTING_BLINN_PHONG
#pragma shader_feature_local LIGHTING_LAMBERT
#pragma shader_feature_local FLAT_LIGHTING
#define POSEIDON_RIVER
#undef POSEIDON_WATER_ADVANCED
#undef POSEIDON_BACK_FACE
#undef POSEIDON_SRP
#include "../CGIncludes/PUniforms.cginc"
#include "../CGIncludes/PWave.cginc"
#include "../CGIncludes/PLightAbsorption.cginc"
#include "../CGIncludes/PFoam.cginc"
#include "../CGIncludes/PRipple.cginc"
#include "../CGIncludes/PFresnel.cginc"
#include "../CGIncludes/PRefraction.cginc"
#include "../CGIncludes/PCaustic.cginc"
#include "BuiltinRP_SurfaceFunction.cginc"
#include "BuiltinRP_ForwardAdd.cginc"
ENDCG
}
}
Fallback "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 133ea1caccadba94fbb5b1ff96532f55
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,181 @@
Shader "Poseidon/Default/WaterAdvanced"
{
Properties
{
[HideInInspector] _MeshNoise("Mesh Noise", Range(0.0, 1.0)) = 0
[HideInInspector] _Color("Color", Color) = (0.0, 0.8, 1.0, 0.5)
[HideInInspector] _Specular("Specular Color", Color) = (0.1, 0.1, 0.1, 1)
[HideInInspector] _Smoothness("Smoothness", Range(0.0, 1.0)) = 1
[HideInInspector] _DepthColor("Depth Color", Color) = (0.0, 0.45, 0.65, 0.85)
[HideInInspector] _MaxDepth("Max Depth", Float) = 5
[HideInInspector] _FoamColor("Foam Color", Color) = (1, 1, 1, 1)
[HideInInspector] _FoamDistance("Foam Distance", Float) = 1.2
[HideInInspector] _FoamNoiseScaleHQ("Foam Noise Scale HQ", Float) = 3
[HideInInspector] _FoamNoiseSpeedHQ("Foam Noise Speed HQ", Float) = 1
[HideInInspector] _ShorelineFoamStrength("Shoreline Foam Strength", Float) = 1
[HideInInspector] _CrestFoamStrength("Crest Foam Strength", Float) = 1
[HideInInspector] _CrestMaxDepth("Crest Max Depth", Float) = 1
[HideInInspector] _RippleHeight("Ripple Height", Range(0, 1)) = 0.1
[HideInInspector] _RippleSpeed("Ripple Speed", Float) = 5
[HideInInspector] _RippleNoiseScale("Ripple Noise Scale", Float) = 1
[HideInInspector] _WaveDirection("Wave Direction", Vector) = (1, 0, 0, 0)
[HideInInspector] _WaveSpeed("Wave Speed", Float) = 1
[HideInInspector] _WaveHeight("Wave Height", Float) = 1
[HideInInspector] _WaveLength("Wave Length", Float) = 1
[HideInInspector] _WaveSteepness("Wave Steepness", Float) = 1
[HideInInspector] _WaveDeform("Wave Deform", Float) = 0.3
[HideInInspector] _WaveMask("Wave Mask", 2D) = "white" {}
[HideInInspector] _WaveMaskBounds("Wave Mask", Vector) = (0, 0, 0, 0)
[HideInInspector] _FresnelStrength("Fresnel Strength", Range(0.0, 5.0)) = 1
[HideInInspector] _FresnelBias("Fresnel Bias", Range(0.0, 1.0)) = 0
[HideInInspector] _ReflectionTex("Reflection Texture", 2D) = "black" { }
[HideInInspector] _ReflectionDistortionStrength("Reflection Distortion Strength", Float) = 1
[HideInInspector] _RefractionDistortionStrength("Refraction Distortion Strength", Float) = 1
[HideInInspector] _CausticTex("Caustic Texture", 2D) = "black" { }
[HideInInspector] _CausticSize("Caustic Size", Float) = 1
[HideInInspector] _CausticStrength("Caustic Strength", Range(0.0, 1.0)) = 1
[HideInInspector] _CausticDistortionStrength("Caustic Distortion Strength", Float) = 1
[HideInInspector] _AuraLightingFactor("Aura Lighting Factor", Float) = 1
}
SubShader
{
LOD 200
GrabPass
{
"_RefractionTex"
}
Pass
{
Name "FORWARD"
Tags { "LightMode" = "ForwardBase"
"RenderType" = "Transparent"
"Queue" = "Transparent+0" }
Blend One Zero
Cull Back
ZTest LEqual
ZWrite On
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_instancing
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#define UNITY_INSTANCED_LOD_FADE
#define UNITY_INSTANCED_SH
#define UNITY_INSTANCED_LIGHTMAPSTS
#pragma shader_feature_local MESH_NOISE
#pragma shader_feature_local WAVE
#pragma shader_feature_local WAVE_MASK
#pragma shader_feature_local LIGHT_ABSORPTION
#pragma shader_feature_local FOAM
#pragma shader_feature_local FOAM_HQ
#pragma shader_feature_local FOAM_CREST
#pragma shader_feature_local REFLECTION
#pragma shader_feature_local REFRACTION
#pragma shader_feature_local CAUSTIC
#pragma shader_feature_local LIGHTING_BLINN_PHONG
#pragma shader_feature_local LIGHTING_LAMBERT
#pragma shader_feature_local FLAT_LIGHTING
#pragma shader_feature_local AURA_LIGHTING
#pragma shader_feature_local AURA_FOG
#define POSEIDON_WATER_ADVANCED
#undef POSEIDON_BACK_FACE
#undef POSEIDON_RIVER
#undef POSEIDON_SRP
#include "../CGIncludes/PUniforms.cginc"
#include "../CGIncludes/PMeshNoise.cginc"
#include "../CGIncludes/PWave.cginc"
#include "../CGIncludes/PLightAbsorption.cginc"
#include "../CGIncludes/PFoam.cginc"
#include "../CGIncludes/PRipple.cginc"
#include "../CGIncludes/PFresnel.cginc"
#include "../CGIncludes/PReflection.cginc"
#include "../CGIncludes/PRefraction.cginc"
#include "../CGIncludes/PCaustic.cginc"
#include "BuiltinRP_SurfaceFunction.cginc"
#include "BuiltinRP_ForwardBase.cginc"
ENDCG
}
Pass
{
Name "FORWARD_ADD"
Tags { "LightMode" = "ForwardAdd"
"RenderType" = "Transparent"
"Queue" = "Transparent+0" }
Blend SrcAlpha One
Cull Back
ZTest LEqual
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma skip_variants INSTANCING_ON
#pragma multi_compile_fwdadd_fullshadows noshadow
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#define UNITY_INSTANCED_LOD_FADE
#define UNITY_INSTANCED_SH
#define UNITY_INSTANCED_LIGHTMAPSTS
#pragma shader_feature_local MESH_NOISE
#pragma shader_feature_local WAVE
#pragma shader_feature_local WAVE_MASK
#pragma shader_feature_local LIGHT_ABSORPTION
#pragma shader_feature_local FOAM
#pragma shader_feature_local FOAM_HQ
#pragma shader_feature_local FOAM_CREST
#pragma shader_feature_local REFLECTION
#pragma shader_feature_local REFRACTION
#pragma shader_feature_local CAUSTIC
#pragma shader_feature_local LIGHTING_BLINN_PHONG
#pragma shader_feature_local LIGHTING_LAMBERT
#pragma shader_feature_local FLAT_LIGHTING
#define POSEIDON_WATER_ADVANCED
#undef POSEIDON_BACK_FACE
#undef POSEIDON_RIVER
#undef POSEIDON_SRP
#include "../CGIncludes/PUniforms.cginc"
#include "../CGIncludes/PMeshNoise.cginc"
#include "../CGIncludes/PWave.cginc"
#include "../CGIncludes/PLightAbsorption.cginc"
#include "../CGIncludes/PFoam.cginc"
#include "../CGIncludes/PRipple.cginc"
#include "../CGIncludes/PFresnel.cginc"
#include "../CGIncludes/PReflection.cginc"
#include "../CGIncludes/PRefraction.cginc"
#include "../CGIncludes/PCaustic.cginc"
#include "BuiltinRP_SurfaceFunction.cginc"
#include "BuiltinRP_ForwardAdd.cginc"
ENDCG
}
}
Fallback "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 37dec5e07a1bac64d8c5bb87acf7a26e
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,156 @@
Shader "Poseidon/Default/WaterBackFace"
{
Properties
{
[HideInInspector] _MeshNoise("Mesh Noise", Range(0.0, 1.0)) = 0
[HideInInspector] _Color("Color", Color) = (0.0, 0.8, 1.0, 0.5)
[HideInInspector] _Specular("Specular Color", Color) = (0.1, 0.1, 0.1, 1)
[HideInInspector] _Smoothness("Smoothness", Range(0.0, 1.0)) = 1
[HideInInspector] _FoamColor("Foam Color", Color) = (1, 1, 1, 1)
[HideInInspector] _FoamDistance("Foam Distance", Float) = 1.2
[HideInInspector] _FoamNoiseScaleHQ("Foam Noise Scale HQ", Float) = 3
[HideInInspector] _FoamNoiseSpeedHQ("Foam Noise Speed HQ", Float) = 1
[HideInInspector] _ShorelineFoamStrength("Shoreline Foam Strength", Float) = 1
[HideInInspector] _CrestFoamStrength("Crest Foam Strength", Float) = 1
[HideInInspector] _CrestMaxDepth("Crest Max Depth", Float) = 1
[HideInInspector] _RippleHeight("Ripple Height", Range(0, 1)) = 0.1
[HideInInspector] _RippleSpeed("Ripple Speed", Float) = 5
[HideInInspector] _RippleNoiseScale("Ripple Noise Scale", Float) = 1
[HideInInspector] _WaveDirection("Wave Direction", Vector) = (1, 0, 0, 0)
[HideInInspector] _WaveSpeed("Wave Speed", Float) = 1
[HideInInspector] _WaveHeight("Wave Height", Float) = 1
[HideInInspector] _WaveLength("Wave Length", Float) = 1
[HideInInspector] _WaveSteepness("Wave Steepness", Float) = 1
[HideInInspector] _WaveDeform("Wave Deform", Float) = 0.3
[HideInInspector] _WaveMask("Wave Mask", 2D) = "white" {}
[HideInInspector] _WaveMaskBounds("Wave Mask", Vector) = (0, 0, 0, 0)
[HideInInspector] _FresnelStrength("Fresnel Strength", Range(0.0, 5.0)) = 1
[HideInInspector] _FresnelBias("Fresnel Bias", Range(0.0, 1.0)) = 0
[HideInInspector] _RefractionDistortionStrength("Refraction Distortion Strength", Float) = 1
[HideInInspector] _AuraLightingFactor("Aura Lighting Factor", Float) = 1
}
SubShader
{
LOD 200
GrabPass
{
"_RefractionTex"
}
Pass
{
Name "FORWARD"
Tags { "LightMode" = "ForwardBase"
"RenderType" = "Transparent"
"Queue" = "Transparent+0" }
Blend One Zero
Cull Front
ZTest LEqual
ZWrite On
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_instancing
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#define UNITY_INSTANCED_LOD_FADE
#define UNITY_INSTANCED_SH
#define UNITY_INSTANCED_LIGHTMAPSTS
#pragma shader_feature_local MESH_NOISE
#pragma shader_feature_local WAVE
#pragma shader_feature_local WAVE_MASK
#pragma shader_feature_local FOAM
#pragma shader_feature_local FOAM_HQ
#pragma shader_feature_local FOAM_CREST
#pragma shader_feature_local LIGHTING_BLINN_PHONG
#pragma shader_feature_local LIGHTING_LAMBERT
#pragma shader_feature_local FLAT_LIGHTING
#pragma shader_feature_local AURA_LIGHTING
#pragma shader_feature_local AURA_FOG
#define POSEIDON_WATER_ADVANCED
#define POSEIDON_BACK_FACE
#undef POSEIDON_RIVER
#undef POSEIDON_SRP
#include "../CGIncludes/PUniforms.cginc"
#include "../CGIncludes/PMeshNoise.cginc"
#include "../CGIncludes/PWave.cginc"
#include "../CGIncludes/PFoam.cginc"
#include "../CGIncludes/PRipple.cginc"
#include "../CGIncludes/PFresnel.cginc"
#include "../CGIncludes/PRefraction.cginc"
#include "BuiltinRP_SurfaceFunction.cginc"
#include "BuiltinRP_ForwardBase.cginc"
ENDCG
}
Pass
{
Name "FORWARD_ADD"
Tags { "LightMode" = "ForwardAdd"
"RenderType" = "Transparent"
"Queue" = "Transparent+0" }
Blend SrcAlpha One
Cull Front
ZTest LEqual
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma skip_variants INSTANCING_ON
#pragma multi_compile_fwdadd_fullshadows noshadow
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#define UNITY_INSTANCED_LOD_FADE
#define UNITY_INSTANCED_SH
#define UNITY_INSTANCED_LIGHTMAPSTS
#pragma shader_feature_local MESH_NOISE
#pragma shader_feature_local WAVE
#pragma shader_feature_local WAVE_MASK
#pragma shader_feature_local FOAM
#pragma shader_feature_local FOAM_HQ
#pragma shader_feature_local FOAM_CREST
#pragma shader_feature_local LIGHTING_BLINN_PHONG
#pragma shader_feature_local LIGHTING_LAMBERT
#pragma shader_feature_local FLAT_LIGHTING
#define POSEIDON_WATER_ADVANCED
#define POSEIDON_BACK_FACE
#undef POSEIDON_RIVER
#undef POSEIDON_SRP
#include "../CGIncludes/PUniforms.cginc"
#include "../CGIncludes/PMeshNoise.cginc"
#include "../CGIncludes/PWave.cginc"
#include "../CGIncludes/PFoam.cginc"
#include "../CGIncludes/PRipple.cginc"
#include "../CGIncludes/PFresnel.cginc"
#include "../CGIncludes/PRefraction.cginc"
#include "BuiltinRP_SurfaceFunction.cginc"
#include "BuiltinRP_ForwardAdd.cginc"
ENDCG
}
}
Fallback "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3f346f62cae728141ab6dd8342f31d13
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,156 @@
Shader "Poseidon/Default/WaterBasic"
{
Properties
{
[HideInInspector] _MeshNoise("Mesh Noise", Range(0.0, 1.0)) = 0
[HideInInspector] _Color("Color", Color) = (0.0, 0.8, 1.0, 0.5)
[HideInInspector] _Specular("Specular Color", Color) = (0.1, 0.1, 0.1, 1)
[HideInInspector] _SpecColor("Specular Color", Color) = (0.1, 0.1, 0.1, 1) //For Blinn-Phong mode
[HideInInspector] _Smoothness("Smoothness", Range(0.0, 1.0)) = 1
[HideInInspector] _DepthColor("Depth Color", Color) = (0.0, 0.45, 0.65, 0.85)
[HideInInspector] _MaxDepth("Max Depth", Float) = 5
[HideInInspector] _FoamColor("Foam Color", Color) = (1, 1, 1, 1)
[HideInInspector] _FoamDistance("Foam Distance", Float) = 1.2
[HideInInspector] _FoamNoiseScaleHQ("Foam Noise Scale HQ", Float) = 3
[HideInInspector] _FoamNoiseSpeedHQ("Foam Noise Speed HQ", Float) = 1
[HideInInspector] _ShorelineFoamStrength("Shoreline Foam Strength", Float) = 1
[HideInInspector] _CrestFoamStrength("Crest Foam Strength", Float) = 1
[HideInInspector] _CrestMaxDepth("Crest Max Depth", Float) = 1
[HideInInspector] _RippleHeight("Ripple Height", Range(0, 1)) = 0.1
[HideInInspector] _RippleSpeed("Ripple Speed", Float) = 5
[HideInInspector] _RippleNoiseScale("Ripple Noise Scale", Float) = 1
[HideInInspector] _WaveDirection("Wave Direction", Vector) = (1, 0, 0, 0)
[HideInInspector] _WaveSpeed("Wave Speed", Float) = 1
[HideInInspector] _WaveHeight("Wave Height", Float) = 1
[HideInInspector] _WaveLength("Wave Length", Float) = 1
[HideInInspector] _WaveSteepness("Wave Steepness", Float) = 1
[HideInInspector] _WaveDeform("Wave Deform", Float) = 0.3
[HideInInspector] _WaveMask("Wave Mask", 2D) = "white" {}
[HideInInspector] _WaveMaskBounds("Wave Mask", Vector) = (0, 0, 0, 0)
[HideInInspector] _FresnelStrength("Fresnel Strength", Range(0.0, 5.0)) = 1
[HideInInspector] _FresnelBias("Fresnel Bias", Range(0.0, 1.0)) = 0
[HideInInspector] _AuraLightingFactor("Aura Lighting Factor", Float) = 1
}
SubShader
{
LOD 200
Pass
{
Name "FORWARD"
Tags { "LightMode" = "ForwardBase"
"RenderType" = "Transparent"
"Queue" = "Transparent+0" }
Blend SrcAlpha OneMinusSrcAlpha
Cull Back
ZTest LEqual
ZWrite On
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_instancing
#pragma multi_compile_fwdbase
#pragma multi_compile_fog
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#define UNITY_INSTANCED_LOD_FADE
#define UNITY_INSTANCED_SH
#define UNITY_INSTANCED_LIGHTMAPSTS
#pragma shader_feature_local MESH_NOISE
#pragma shader_feature_local WAVE
#pragma shader_feature_local WAVE_MASK
#pragma shader_feature_local LIGHT_ABSORPTION
#pragma shader_feature_local FOAM
#pragma shader_feature_local FOAM_HQ
#pragma shader_feature_local FOAM_CREST
#pragma shader_feature_local LIGHTING_BLINN_PHONG
#pragma shader_feature_local LIGHTING_LAMBERT
#pragma shader_feature_local FLAT_LIGHTING
#pragma shader_feature_local AURA_LIGHTING
#pragma shader_feature_local AURA_FOG
#undef POSEIDON_WATER_ADVANCED
#undef POSEIDON_BACK_FACE
#undef POSEIDON_RIVER
#undef POSEIDON_SRP
#include "../CGIncludes/PUniforms.cginc"
#include "../CGIncludes/PMeshNoise.cginc"
#include "../CGIncludes/PLightAbsorption.cginc"
#include "../CGIncludes/PFoam.cginc"
#include "../CGIncludes/PRipple.cginc"
#include "../CGIncludes/PFresnel.cginc"
#include "../CGIncludes/PCore.cginc"
#include "BuiltinRP_SurfaceFunction.cginc"
#include "BuiltinRP_ForwardBase.cginc"
ENDCG
}
Pass
{
Name "FORWARD_ADD"
Tags { "LightMode" = "ForwardAdd"
"RenderType" = "Transparent"
"Queue" = "Transparent+0" }
Blend SrcAlpha One
Cull Back
ZTest LEqual
ZWrite Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#pragma multi_compile_instancing
#pragma multi_compile_fog
#pragma skip_variants INSTANCING_ON
#pragma multi_compile_fwdadd_fullshadows noshadow
#include "Lighting.cginc"
#include "UnityPBSLighting.cginc"
#define UNITY_INSTANCED_LOD_FADE
#define UNITY_INSTANCED_SH
#define UNITY_INSTANCED_LIGHTMAPSTS
#pragma shader_feature_local MESH_NOISE
#pragma shader_feature_local WAVE
#pragma shader_feature_local WAVE_MASK
#pragma shader_feature_local LIGHT_ABSORPTION
#pragma shader_feature_local FOAM
#pragma shader_feature_local FOAM_HQ
#pragma shader_feature_local FOAM_CREST
#pragma shader_feature_local LIGHTING_BLINN_PHONG
#pragma shader_feature_local LIGHTING_LAMBERT
#pragma shader_feature_local FLAT_LIGHTING
#undef POSEIDON_WATER_ADVANCED
#undef POSEIDON_BACK_FACE
#undef POSEIDON_RIVER
#undef POSEIDON_SRP
#include "../CGIncludes/PUniforms.cginc"
#include "../CGIncludes/PMeshNoise.cginc"
#include "../CGIncludes/PLightAbsorption.cginc"
#include "../CGIncludes/PFoam.cginc"
#include "../CGIncludes/PRipple.cginc"
#include "../CGIncludes/PFresnel.cginc"
#include "../CGIncludes/PCore.cginc"
#include "BuiltinRP_SurfaceFunction.cginc"
#include "BuiltinRP_ForwardAdd.cginc"
ENDCG
}
}
Fallback "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 72887a76da566c74294de0e87cbad1b9
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant: