Skip to content

Commit

Permalink
WIP2 v0.507
Browse files Browse the repository at this point in the history
  • Loading branch information
ozonexo3 committed Jul 30, 2017
1 parent c015a68 commit 4e1cecc
Show file tree
Hide file tree
Showing 15 changed files with 1,162 additions and 72 deletions.
2 changes: 1 addition & 1 deletion Assets/GFX/PostProcess.asset
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ MonoBehaviour:
m_Enabled: 1
m_Settings:
bloom:
intensity: 0.8
intensity: 0.2
threshold: 0
softKnee: 0
radius: 1
Expand Down
16 changes: 12 additions & 4 deletions Assets/GFX/Shaders/Backup/FaTerrainShader 1.shader
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Properties {


_WaterRam ("Water Ramp (RGBA)", 2D) = "blue" {}
_WaterLevel ("Water Level", Range (0.03, 5)) = 0.078125
_AbyssLevel ("Abyss Level", Range (0.03, 5)) = 0.078125
_UtilitySamplerC ("_UtilitySamplerC", 2D) = "white" {}
_WaterLevel ("Water Level", float) = 0.078125
_DepthLevel ("Depth Level", float) = 0.078125
_AbyssLevel ("Abyss Level", float) = 0.078125

[MaterialToggle] _Area("Area", Int) = 0
_AreaX ("Area X", Range (0, 2048)) = 0
Expand Down Expand Up @@ -188,7 +190,7 @@ Properties {
sampler2D _WaterRam;
half _Shininess;
half _WaterLevel;
half _AbyssLevel;
half _DepthLevel, _AbyssLevel;
fixed4 _Abyss;
fixed4 _Deep;
int _Water;
Expand All @@ -203,6 +205,7 @@ Properties {

sampler2D _ControlXP;
sampler2D _Control2XP;
sampler2D _UtilitySamplerC;
sampler2D _SplatNormal3;
sampler2D _SplatNormal0, _SplatNormal1, _SplatNormal2, _NormalLower;
sampler2D _SplatNormal4, _SplatNormal5, _SplatNormal6, _SplatNormal7;
Expand Down Expand Up @@ -253,7 +256,12 @@ Properties {
}

void surf (Input IN, inout SurfaceOutput o) {
float WaterDepth = (_WaterLevel - IN.worldPos.y) / (_WaterLevel - _AbyssLevel);

float4 waterTexture = tex2D( _UtilitySamplerC, IN.uv_Control * float2(-1, 1) );

//float WaterDepth = (_WaterLevel - IN.worldPos.y) / (_WaterLevel - _AbyssLevel);
float WaterDepth = waterTexture.g;

float2 UV = IN.uv_Control * fixed2(1, -1);
float4 splat_control = saturate(tex2D (_ControlXP, UV) * 2 - 1);
float4 splat_control2 = saturate(tex2D (_Control2XP, UV) * 2 - 1);
Expand Down
2 changes: 1 addition & 1 deletion Assets/GFX/Shaders/FaWater.shader
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ Shader "MapEditor/FaWater" {

// implement the water depth into the reflection
float depthReflectionAmount = 10;
//skyreflectionAmount *= saturate(waterDepth * depthReflectionAmount);
skyreflectionAmount *= saturate(waterDepth * depthReflectionAmount);

// lerp the reflection into the refraction
refractedPixels = lerp( refractedPixels, reflectedPixels, saturate(skyreflectionAmount * saturate(waterDepth * depthReflectionAmount) * fresnel));
Expand Down
Binary file modified Assets/GFX/Terrain/ScmapTerrain.asset
Binary file not shown.
63 changes: 32 additions & 31 deletions Assets/GFX/Terrain/TerrainShader.mat
Original file line number Diff line number Diff line change
Expand Up @@ -215,51 +215,52 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AbyssLevel: 0.3
- _AbyssLevel: 0.25
- _Area: 0
- _AreaHeight: 42.55
- _AreaWidht: 50.25
- _AreaX: 1.05
- _AreaY: 8.75
- _AreaHeight: 102
- _AreaWidht: 102.1
- _AreaX: 0.4
- _AreaY: 0.3
- _Brush: 0
- _BrushSize: 20
- _BrushSize: 0
- _BrushUvX: 0.9071651
- _BrushUvY: 0.87415236
- _DeepLevel: 1.675625
- _DepthLevel: 1.5
- _Grid: 0
- _GridCamDist: 3.6821427
- _GridCamDist: 3.682143
- _GridScale: 51.2
- _LightingMultiplier: 1.25
- _LowerScale: 102.4
- _LowerScaleNormal: 51.2
- _LightingMultiplier: 1.3
- _LowerScale: 128
- _LowerScaleNormal: 128
- _Shininess: 0.03
- _Slope: 0
- _Splat0Scale: 512
- _Splat0ScaleNormal: 284.44446
- _Splat1Scale: 29.257143
- _Splat1ScaleNormal: 32
- _Splat2Scale: 512
- _Splat2ScaleNormal: 73.14286
- _Splat3Scale: 128
- _Splat3ScaleNormal: 97.52381
- _Splat4Scale: 128
- _Splat4ScaleNormal: 128
- _Splat5Scale: 128
- _Splat5ScaleNormal: 128
- _Splat6Scale: 128
- _Splat6ScaleNormal: 128
- _Splat7Scale: 128
- _Splat7ScaleNormal: 128
- _TTerrainXP: 0
- _Splat0Scale: 64
- _Splat0ScaleNormal: 128
- _Splat1Scale: 64
- _Splat1ScaleNormal: 128
- _Splat2Scale: 64
- _Splat2ScaleNormal: 64
- _Splat3Scale: 102.4
- _Splat3ScaleNormal: 102.4
- _Splat4Scale: 85.333336
- _Splat4ScaleNormal: 85.333336
- _Splat5Scale: 85.333336
- _Splat5ScaleNormal: 85.333336
- _Splat6Scale: 56.88889
- _Splat6ScaleNormal: 73.14286
- _Splat7Scale: 56.88889
- _Splat7ScaleNormal: 73.14286
- _TTerrainXP: 1
- _UpperScale: 4
- _UpperScaleNormal: 512
- _Water: 1
- _WaterLevel: 3.6
- _WaterLevel: 1.75
m_Colors:
- _Abyss: {r: 0.005190316, g: 0.051962737, b: 0.2352941, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Deep: {r: 0.22577855, g: 0.4590157, b: 0.5294118, a: 1}
- _ShadowColor: {r: 0.075, g: 0.115, b: 0.14, a: 1}
- _ShadowColor: {r: 0.145, g: 0.155, b: 0.275, a: 1}
- _SpecColor: {r: 0, g: 0, b: 0, a: 0}
- _SunAmbience: {r: 0.32, g: 0.22, b: 0.22, a: 1}
- _SunColor: {r: 1, g: 0.735, b: 0.725, a: 1}
- _SunAmbience: {r: 0.044999998, g: 0.089999996, b: 0.175, a: 1}
- _SunColor: {r: 0.56, g: 0.56, b: 0.56, a: 1}
4 changes: 2 additions & 2 deletions Assets/GFX/Terrain/WaterShader.mat
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,5 @@ Material:
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- sunColor: {r: 0.44, g: 0.44, b: 0.44, a: 1}
- waterColor: {r: 1.41, g: 1.41, b: 1.41, a: 1}
- sunColor: {r: 0.52, g: 0.61, b: 0.9, a: 1}
- waterColor: {r: 0.72, g: 0.96999997, b: 1.16, a: 1}
Loading

0 comments on commit 4e1cecc

Please sign in to comment.