Hybrid Volumetric Fog + some swamp area test
This commit is contained in:
@@ -7,13 +7,18 @@ public class LiquidSurfaceShaderGUI_Simplified : ShaderGUI
|
||||
|
||||
public override void OnGUI(MaterialEditor m, MaterialProperty[] props)
|
||||
{
|
||||
var surface = P("_SurfaceType", props);
|
||||
var mainTex = P("_MainTex", props);
|
||||
var baseCol = P("_BaseColor", props);
|
||||
var surface = P("_SurfaceType", props);
|
||||
var mainTex = P("_MainTex", props);
|
||||
var baseCol = P("_BaseColor", props);
|
||||
var mainTexAlpha = P("_MainTexAlpha", props); // NOWE
|
||||
var smooth = P("_Smoothness", props); // NOWE
|
||||
|
||||
// Water
|
||||
var tint = P("_WaterTint", props);
|
||||
var depth = P("_DepthStrength", props);
|
||||
var mainTexBlend = P("_MainTexBlend", props);
|
||||
|
||||
|
||||
|
||||
var waveAmp = P("_WaveAmplitude", props);
|
||||
var waveLen = P("_WaveLength", props);
|
||||
@@ -30,8 +35,10 @@ public class LiquidSurfaceShaderGUI_Simplified : ShaderGUI
|
||||
var foamTex = P("_FoamTex", props);
|
||||
var foamStr = P("_FoamStrength", props);
|
||||
var foamBias = P("_FoamBias", props);
|
||||
var foamCol = P("_FoamColor", props);
|
||||
var normalScrollStr = P("_NormalScrollStrength", props);
|
||||
var foamScrollStr = P("_FoamScrollStrength", props);
|
||||
|
||||
// NEW: UV scroll speeds
|
||||
var n1Spd = P("_WaterNormal1Speed", props);
|
||||
var n2Spd = P("_WaterNormal2Speed", props);
|
||||
var foamSpd = P("_FoamScrollSpeed", props);
|
||||
@@ -61,6 +68,16 @@ public class LiquidSurfaceShaderGUI_Simplified : ShaderGUI
|
||||
|
||||
if (mainTex != null && baseCol != null)
|
||||
m.TexturePropertySingleLine(new GUIContent("Main Texture"), mainTex, baseCol);
|
||||
if (mainTexAlpha != null)
|
||||
m.ShaderProperty(mainTexAlpha, "MainTex Alpha Strength"); // NOWE
|
||||
if (smooth != null)
|
||||
m.ShaderProperty(smooth, "Smoothness"); // NOWE
|
||||
if (mainTexBlend != null)
|
||||
m.ShaderProperty(mainTexBlend, "MainTex Blend Strength");
|
||||
if (normalScrollStr != null)
|
||||
m.ShaderProperty(normalScrollStr, "Normal Scroll Strength");
|
||||
if (foamScrollStr != null)
|
||||
m.ShaderProperty(foamScrollStr, "Foam Scroll Strength");
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
@@ -94,6 +111,7 @@ public class LiquidSurfaceShaderGUI_Simplified : ShaderGUI
|
||||
EditorGUILayout.LabelField("Foam", EditorStyles.boldLabel);
|
||||
if (foamTex != null) m.TexturePropertySingleLine(new GUIContent("Foam Texture"), foamTex, foamStr);
|
||||
if (foamBias != null) m.ShaderProperty(foamBias, "Foam Bias");
|
||||
if (foamCol != null) m.ShaderProperty(foamCol, "Foam Color");
|
||||
if (shoreStr != null) m.ShaderProperty(shoreStr, "Shoreline Strength");
|
||||
if (shoreSharp!= null) m.ShaderProperty(shoreSharp, "Shoreline Sharpness");
|
||||
|
||||
@@ -133,6 +151,7 @@ public class LiquidSurfaceShaderGUI_Simplified : ShaderGUI
|
||||
EditorGUILayout.LabelField("River Settings", EditorStyles.boldLabel);
|
||||
if (foamTex != null) m.TexturePropertySingleLine(new GUIContent("Foam Texture"), foamTex, foamStr);
|
||||
if (foamSpd != null) m.ShaderProperty(foamSpd, "Foam Scroll Speed (X,Y)");
|
||||
if (foamCol != null) m.ShaderProperty(foamCol, "Foam Color");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user