물 에셋 추가
@ -15743,7 +15743,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 8a373610dbf3f9a4595fbaf9d7656393, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 04a8994fc0ed2404cb76ca609b99e87d, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 102 KiB |
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a373610dbf3f9a4595fbaf9d7656393
|
||||
guid: 04a8994fc0ed2404cb76ca609b99e87d
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
|
@ -40,6 +40,7 @@ Material:
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
- DepthOnly
|
||||
- SHADOWCASTER
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
|
@ -88,6 +88,7 @@ Material:
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaCliping: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
|
@ -511,6 +511,9 @@ MonoBehaviour:
|
||||
_movementParticle: {fileID: 1758207864085720564}
|
||||
_dashParticle: {fileID: 5016381395342745780}
|
||||
<MoveSpeed>k__BackingField: 7
|
||||
<PushDirection>k__BackingField: {x: 0, y: 0, z: 0}
|
||||
<PushPower>k__BackingField: 0
|
||||
<PushPowerReduction>k__BackingField: 20
|
||||
<DashSpeed>k__BackingField: 20
|
||||
<DashTime>k__BackingField: 0.2
|
||||
<DashCooldown>k__BackingField: 0.5
|
||||
|
@ -14,6 +14,9 @@
|
||||
},
|
||||
{
|
||||
"m_Id": "ea6b2e0779e043ec9435129c2ccb8ff0"
|
||||
},
|
||||
{
|
||||
"m_Id": "a5607bf3fffc420c80b8c89822652cb1"
|
||||
}
|
||||
],
|
||||
"m_Keywords": [],
|
||||
@ -62,6 +65,12 @@
|
||||
},
|
||||
{
|
||||
"m_Id": "e6c2c8d8519d48b982a932f836e4b3d3"
|
||||
},
|
||||
{
|
||||
"m_Id": "f6e7749e40fd40d2ab70230de2f7106a"
|
||||
},
|
||||
{
|
||||
"m_Id": "9f2a5fd483d3471b9acccc7371a57cd4"
|
||||
}
|
||||
],
|
||||
"m_GroupDatas": [
|
||||
@ -175,6 +184,20 @@
|
||||
"m_SlotId": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"m_OutputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "9f2a5fd483d3471b9acccc7371a57cd4"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
},
|
||||
"m_InputSlot": {
|
||||
"m_Node": {
|
||||
"m_Id": "f6e7749e40fd40d2ab70230de2f7106a"
|
||||
},
|
||||
"m_SlotId": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"m_OutputSlot": {
|
||||
"m_Node": {
|
||||
@ -253,6 +276,9 @@
|
||||
},
|
||||
{
|
||||
"m_Id": "e6c2c8d8519d48b982a932f836e4b3d3"
|
||||
},
|
||||
{
|
||||
"m_Id": "f6e7749e40fd40d2ab70230de2f7106a"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -893,6 +919,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "605a50a70c124141aa762aa065792b50",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "Alpha Clip Threshold",
|
||||
"m_SlotType": 0,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "AlphaClipThreshold",
|
||||
"m_StageCapability": 2,
|
||||
"m_Value": 0.5,
|
||||
"m_DefaultValue": 0.5,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Texture2DInputMaterialSlot",
|
||||
@ -1134,7 +1175,7 @@
|
||||
"m_Type": "UnityEditor.Rendering.Canvas.ShaderGraph.CanvasData",
|
||||
"m_ObjectId": "7d775c889bca4e0e97f399d89b4ecaa7",
|
||||
"m_Version": 0,
|
||||
"m_AlphaClip": false,
|
||||
"m_AlphaClip": true,
|
||||
"m_DisableTint": false
|
||||
}
|
||||
|
||||
@ -1185,10 +1226,49 @@
|
||||
},
|
||||
{
|
||||
"m_Id": "ea6b2e0779e043ec9435129c2ccb8ff0"
|
||||
},
|
||||
{
|
||||
"m_Id": "a5607bf3fffc420c80b8c89822652cb1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
|
||||
"m_ObjectId": "9f2a5fd483d3471b9acccc7371a57cd4",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "Property",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": -42.36971664428711,
|
||||
"y": -454.6595458984375,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "ce9b66b7c47f48deb4db40bbcd701102"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_Property": {
|
||||
"m_Id": "a5607bf3fffc420c80b8c89822652cb1"
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
|
||||
@ -1213,6 +1293,34 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 1,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
|
||||
"m_ObjectId": "a5607bf3fffc420c80b8c89822652cb1",
|
||||
"m_Guid": {
|
||||
"m_GuidSerialized": "2a57ad19-1076-4a1d-b572-4af1f2297fef"
|
||||
},
|
||||
"m_Name": "AlphaCliping",
|
||||
"m_DefaultRefNameVersion": 1,
|
||||
"m_RefNameGeneratedByDisplayName": "AlphaCliping",
|
||||
"m_DefaultReferenceName": "_AlphaCliping",
|
||||
"m_OverrideReferenceName": "",
|
||||
"m_GeneratePropertyBlock": true,
|
||||
"m_UseCustomSlotLabel": false,
|
||||
"m_CustomSlotLabel": "",
|
||||
"m_DismissedVersion": 0,
|
||||
"m_Precision": 0,
|
||||
"overrideHLSLDeclaration": false,
|
||||
"hlslDeclarationOverride": 0,
|
||||
"m_Hidden": false,
|
||||
"m_Value": 0.5,
|
||||
"m_FloatType": 1,
|
||||
"m_RangeValues": {
|
||||
"x": 0.0,
|
||||
"y": 1.0
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
|
||||
@ -1445,6 +1553,21 @@
|
||||
"m_SerializedDescriptor": "SurfaceDescription.Alpha"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
"m_ObjectId": "ce9b66b7c47f48deb4db40bbcd701102",
|
||||
"m_Id": 0,
|
||||
"m_DisplayName": "AlphaCliping",
|
||||
"m_SlotType": 1,
|
||||
"m_Hidden": false,
|
||||
"m_ShaderOutputName": "Out",
|
||||
"m_StageCapability": 3,
|
||||
"m_Value": 0.0,
|
||||
"m_DefaultValue": 0.0,
|
||||
"m_Labels": []
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
|
||||
@ -1745,6 +1868,40 @@
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
|
||||
"m_ObjectId": "f6e7749e40fd40d2ab70230de2f7106a",
|
||||
"m_Group": {
|
||||
"m_Id": ""
|
||||
},
|
||||
"m_Name": "SurfaceDescription.AlphaClipThreshold",
|
||||
"m_DrawState": {
|
||||
"m_Expanded": true,
|
||||
"m_Position": {
|
||||
"serializedVersion": "2",
|
||||
"x": 0.0,
|
||||
"y": 0.0,
|
||||
"width": 0.0,
|
||||
"height": 0.0
|
||||
}
|
||||
},
|
||||
"m_Slots": [
|
||||
{
|
||||
"m_Id": "605a50a70c124141aa762aa065792b50"
|
||||
}
|
||||
],
|
||||
"synonyms": [],
|
||||
"m_Precision": 0,
|
||||
"m_PreviewExpanded": true,
|
||||
"m_DismissedVersion": 0,
|
||||
"m_PreviewMode": 0,
|
||||
"m_CustomColors": {
|
||||
"m_SerializableColors": []
|
||||
},
|
||||
"m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold"
|
||||
}
|
||||
|
||||
{
|
||||
"m_SGVersion": 0,
|
||||
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
|
||||
|
8
Assets/StylizedWater2.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: daa4fe0076087734b99ccc7e302cbbba
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
586
Assets/StylizedWater2/CHANGELOG.md
Normal file
@ -0,0 +1,586 @@
|
||||
1.6.8
|
||||
|
||||
Changed:
|
||||
- Shader now falls back to URP's "magenta" shader, when failing to compile, which supports DOTS
|
||||
- Removed shader workaround for MacOS added in v1.6.6. This is now fixed in 2022.3.36f1+
|
||||
|
||||
Fixed:
|
||||
- Hotfix for OUTPUT_SH4 and SAMPLE_GI shader macro errors in Unity 6000.0.9f1+
|
||||
|
||||
1.6.7
|
||||
|
||||
Fixed:
|
||||
- Enviro fog shading not having any effect since version 3.1.3 due to a code change
|
||||
|
||||
1.6.6
|
||||
|
||||
Fixed:
|
||||
- Workaround for shader error on Mac in Unity 2022.3.15+, regarding "_FOVEATED_RENDERING_NON_UNIFORM_RASTER" (known bug: UUM-67560)
|
||||
|
||||
1.6.5
|
||||
|
||||
Added:
|
||||
- "Sample Water Normal" sub-graph, allows other shaders to read out the water surface normal
|
||||
|
||||
Fixed:
|
||||
- Distance fading for waves not behaving correctly if an origin shifting system was in use (WaterObject.PositionOffset)
|
||||
- Displacement Pre-pass unnecessarily also calculating information per-pixel
|
||||
|
||||
1.6.4
|
||||
|
||||
Changed:
|
||||
- Implemented proper error handling for Unity 6.
|
||||
- "Murky" water material
|
||||
|
||||
Fixed:
|
||||
- Planar Reflections, minute changes in render scale not having an effect on resolution.
|
||||
- Buoyancy API not respecting custom time value if it was exactly 0.
|
||||
- Indirect lighting and reflections being black in demo scenes in Unity 2023.2+.
|
||||
- Translucency for point lights being visible on backfaces (underwater scenario).
|
||||
|
||||
1.6.3
|
||||
|
||||
Added:
|
||||
- Checkbox on material to enable Dynamic Effects (enabled by default).
|
||||
|
||||
Changed:
|
||||
- Simulation space of particle effects is now World-Space by default
|
||||
- Water Grid 'columns' parameter now allows for a 0 value. This covers the use case of using the component with custom geometry.
|
||||
- Water Mesh creation is no longer limited to 65536 vertices.
|
||||
|
||||
Fixed:
|
||||
- Water Grid, wireframe display not accurately representing the geometry if the Transform was scaled.
|
||||
- Caustics effect not appearing correctly when the "Disable Depth Texture" option was enabled.
|
||||
- Shader compile error on MacOS when using 2022.3.15+ (workaround for known URP bug)
|
||||
|
||||
1.6.2
|
||||
|
||||
Added:
|
||||
- Intersection Foam distortion parameter, offsets the texture sample by the normals
|
||||
- Caustics chromance parameter, allows blending between grayscale- and RGB caustics
|
||||
|
||||
Fixed:
|
||||
- Translucency rendering not being applied with the correct strength for a 2nd+ point light.
|
||||
|
||||
1.6.1
|
||||
|
||||
Fixed:
|
||||
- DWP2 integration, water level being fixed to a value of 0 in some cases.
|
||||
- Atmospheric Height Fog integration, shader error when using latest version (v3.2.0+)
|
||||
|
||||
1.6.0
|
||||
Verified compatibility with Unity 2023.2.0
|
||||
|
||||
Note: Unity packages cannot track moved/renamed/deleted files. It is recommended to delete the StylizedWater2 folder before updating!
|
||||
|
||||
Added:
|
||||
- Generalized water render feature
|
||||
* Screen Space Reflections (in preview)
|
||||
* Water displacement prepass (advanced custom uses for the time being)
|
||||
* Directional caustics option
|
||||
|
||||
- Public static C# parameter: WaterObject.PositionOffset. Water shading and buoyancy will be offset by this value, for use with floating-origin systems.
|
||||
- Fog integration for Buto 2022 (v7.7.3+)
|
||||
- Render queue -/+ buttons in material UI
|
||||
- Lava flow river material
|
||||
|
||||
Fixed:
|
||||
- Planar Reflections not composting correctly on Android when HDR was enabled
|
||||
- HDR information from reflection probes not correctly being used in the water material, making emissive surfaces appear dim.
|
||||
- Shader compile error when building for Android when using VR and OpenGLES (workaround for returning Unity bug).
|
||||
|
||||
Changed:
|
||||
- Tiling parameters for Normals and Surface Foam now have an X & Y component. Allowing for width/length stretching.
|
||||
- Animation speed for texture-based effects now remain consistent when altering a tiling parameter.
|
||||
- "Floating Transform" component was renamed to "Align Transform To Waves", to clarify its functionality.
|
||||
- Surface Foam, normal map now also influences the Distortion parameter
|
||||
- Negative speed values are now allowed for Rivers
|
||||
- Buoyancy.SetCustomTime function deprecated. The static WaterObject.CustomTime parameter may now be used instead.
|
||||
- Dynamic effects (v1.1.0)
|
||||
* Created curvature is no longer influenced by reflection distortion parameters. Effects always create visual distortions.
|
||||
* Projected normals are now visible even when the Normals feature is disabled on the material.
|
||||
* Vertex displacement now also applies to water materials with Tessellation disabled.
|
||||
|
||||
Removed:
|
||||
- Obsolete buoyancy code functions
|
||||
- Support for code without the Mathematics package installed (it is required with URP anyway).
|
||||
|
||||
1.5.5
|
||||
|
||||
Fixed:
|
||||
- Shader error when using Curved World 2022, due to incorrect order of shader library compilation.
|
||||
- Water appearing completely black when Buto 2022 is installed (temporary fix until integration is available)
|
||||
|
||||
1.5.4
|
||||
|
||||
Fixed:
|
||||
- Material UI, the Dynamic Effects surface foam texture slot being linked to the regular Foam Mask slot.
|
||||
|
||||
1.5.3
|
||||
|
||||
Fixed:
|
||||
- Material UI, dropdown texture selection not working if the asset was installed as a package
|
||||
- Vertex color-based intersection foam not appearing if the "Disable Depth Texture" option was enabled.
|
||||
- Caustics not being visible if the "Disable Depth Texture" option was enabled.
|
||||
- Surface Foam added through vertex colors not contributing to river slopes
|
||||
|
||||
1.5.2
|
||||
|
||||
Added:
|
||||
- Material UI, dropdown menu next to foam/normal map texture slots, to quickly try out different textures.
|
||||
- River mode, parameters to control the minimum slope angle and falloff.
|
||||
- Translucency, parameter to control effect from direct light, simulates glacial or morene lakes.
|
||||
- Option to enable support for light cookies in the shader inspector
|
||||
|
||||
Changed:
|
||||
- Improved calculation of light intensity for sun reflection and translucency, now more accurately responds to color.
|
||||
|
||||
Fixed:
|
||||
- Box projected Reflection probes not appearing correctly on the water surface for orthographic cameras.
|
||||
- Caustics appearing in shadows underwater when using the Advanced shading mode (regression since v1.4.0)
|
||||
- Shader error when Light Probe Volumes was enabled in Unity 2023.1+
|
||||
|
||||
1.5.1
|
||||
Minimum supported version is now Unity 2021.3.16f1 (URP 12.1.6).
|
||||
|
||||
Added:
|
||||
- Planar Reflections UI, warning when using the default renderer. Added a button to automatically create and assign a new empty renderer.
|
||||
- Planar Reflections, option to enabled default fog for the render.
|
||||
- Frozen lake prefab material.
|
||||
- Extended support for the Rendering Debugger. Reflections, translucency and caustics can now also be inspected.
|
||||
|
||||
Changed:
|
||||
- Revised some demo scene content.
|
||||
- Fog density is now calculated per pixel, as opposed to per vertex (standard as of Unity 2021.2).
|
||||
|
||||
Fixed:
|
||||
- Water not rendering on Android VR if URP's "SH Evaluation" setting was set to 'Per vertex'.
|
||||
- Surface Foam tiling parameter not having any effect for foam drawn on slopes (regression since v1.5.0).
|
||||
- (Unity 2022.2+) Planar Reflections causing an error in URP's rendering loop when the scene hierarchy search functionality was used.
|
||||
- Planar Reflections, error thrown when using the Profiler and exiting Play mode.
|
||||
|
||||
1.5.0
|
||||
Verified compatibility with Unity 2023.1f1. This is the last update supporting Unity 2020.
|
||||
|
||||
Added:
|
||||
- Swamp water material
|
||||
- Improved refraction (Advanced shading mode only), taking the surface curvature more accurately into account + Exposed parameter to control chromatic aberration
|
||||
- Color absorption feature, darkens the underwater color based on its depth (Advanced shading mode only).
|
||||
- Surface Foam now dissipates based on a base amount of foam, and that added through waves
|
||||
* Base Amount parameter, previously controlled by the foam color alpha channel
|
||||
* Foam Distortion parameter, distorts the foam by the amount of vertical surface displacement (such as with waves).
|
||||
- Parameters to control the Tiling/Speed of the Normal Map and Surface Foam sub-layers.
|
||||
- Support for Light Layers in Unity 2022.2+
|
||||
- Global Illumination support when using Tessellation
|
||||
|
||||
Changed:
|
||||
- Material UI, corrected unwanted indentation in Unity 2022.2+ due to parameter locking functionality.
|
||||
- Translucency shading, Curvature Mask parameter now acts as a mask for surface slopes
|
||||
- Increased maximum allowed amount of tessellation subdivisions from 16 to 32 (internally still limited to 15 on Xbox One and PS5).
|
||||
- Water Mesh asset utility now has a "Bounds padding" value exposed. Previously used a fixed value of 4, to add artificial height to the mesh for improved culling.
|
||||
- Improved consistency of Distance Depth (fog) appearance between perspective- and orthographic cameras.
|
||||
- Caustics no longer appear on the skybox behind water geometry
|
||||
- Refraction is no longer forced to be disabled if the Normals feature is.
|
||||
- Distance Normals tiling parameter is now decoupled from the base normal tiling
|
||||
- Updated fog integration for Atmospheric Height Fog (3.0.0).
|
||||
- Shader error message is now thrown should a fog asset cause a Built-in RP shader library to be compiled into it.
|
||||
- Fog shading now also applies to backfaces of the geometry used
|
||||
|
||||
Fixed:
|
||||
- Inconsistent animation direction between Mesh UV and World Projected coordinate modes.
|
||||
- Static lightmapping not having any effect in Unity 2022.3+ (GI now no longer supported in 2020.3)
|
||||
- Normals being incorrect if World XZ Projected UV was used, yet the water plane was rotated on the Y-axis.
|
||||
- Caustics no longer disappear when lightmaps are applied (no light was available to control the effect's intensity)
|
||||
- Default Unity fog integration not taking effect, when automatic integration detection was enabled.
|
||||
- Scaling a Water Grid component caused it to not create geometry correctly, nor display the grid gizmo accurately.
|
||||
- Auto-setup function for DWP2 in help window not working if no Flat Water Data Provider component was present anywhere.
|
||||
- Preventing Enviro (1 & 3) and Atmospheric Height Fog from shading the water if their settings are un-initialized.
|
||||
- Incorrect wave normals when geometry had a rotation, causing reflections to look incorrect.
|
||||
- Pre-emptive shader error fixes in Unity 2023.2+, due to API changes.
|
||||
|
||||
Removed:
|
||||
- Surface Foam, Wave Mask Exponent parameter
|
||||
|
||||
1.4.0
|
||||
Converted water shader to a new 'scriptable shader' framework. Integrations, extensions and version-specific hooks are now automatically incorporated.
|
||||
|
||||
Added:
|
||||
- Material UI, added a "Toggle tooltips" button, which shows every parameter's tooltip below it.
|
||||
- Surface Foam slope parameter for River Mode. Controls how much foam is automatically drawn on slopes.
|
||||
- Waterfall foam texture.
|
||||
- Option to disable z-clipping of the water surface (Rendering tab).
|
||||
- Improved performance of Buoyancy API (roughly 20% faster).
|
||||
- Water Mesh + Water Grid inspector, option to preview the mesh as a wireframe in the scene view.
|
||||
- Options under "GameObject/3D Object/Water" to create a water object or grid.
|
||||
- Planar Reflection Renderer inspector, preview image of rendered reflection in the UI.
|
||||
- Planar Reflection Renderer, option to take the component's transform rotation into account. Making an upside-down/sideways reflection possible.
|
||||
|
||||
Changed:
|
||||
- Material UI, "Advanced" section renamed to "Rendering".
|
||||
- River slope normal map now uses the same import settings as the base normal map (reduces the amount of samplers used).
|
||||
- Re-authored foam/caustics textures to double their scaling size, reducing visible tiling artefacts.
|
||||
- Caustics are no longer disabled if the "Disable Depth Texture" is enabled. Instead, they draw on the water surface itself.
|
||||
- Integration for Dynamic Water Physics 2 is now based on the "NWH_DWP2" scripting define symbol. No longer required to unlock the component.
|
||||
- WaterMesh class, improvements to make parameter changes non-destructive:
|
||||
* Vertex noise is now consistent at any mesh scale
|
||||
* UV scale is no longer influenced by scale
|
||||
* No longer uses a fixed number of subdivisions, but rather a "vertex distance" value.
|
||||
|
||||
Fixed:
|
||||
- Warnings about obsolete code in Unity 2023.1+ regarding OpenGLES 2.0 checks (now completely unsupported).
|
||||
- Reflection distortion for Planar Reflections not being equally strong as for reflection probes.
|
||||
- Refraction artifacts visible for geometry in front of the water in orthographic projections.
|
||||
- Refraction no longer being visible when the Disable Depth Texture option was enabled.
|
||||
|
||||
Removed:
|
||||
- Public functions in Buoyancy class that were marked as obsolete since v1.1.4
|
||||
|
||||
1.3.1
|
||||
|
||||
Added:
|
||||
- Fog integration for Buto Volumetric Fog and Lighting
|
||||
|
||||
Changed:
|
||||
- Reduced the amount of shader variants by 22%, decreasing build times.
|
||||
- Updated fog integration for SC Post Effects (v2.3.2+)
|
||||
- Reduced the file size of the StreamWaves normal map file by half (no quality loss).
|
||||
|
||||
Fixed:
|
||||
- Wave tint parameter creating negative color values (it now merely brighten wave crest as intended).
|
||||
- Preemptive shader error fix for Unity 2023.1.0a26+
|
||||
- Materials not receiving shadows, or showing banding artefacts, when a single shadow cascade is used. (In Unity 2021.3.15+, or versions released after December 15th 2022)
|
||||
|
||||
1.3.0
|
||||
- If in use, this version must be updated alongside of the Underwater Rendering extension v1.0.7.
|
||||
- Retired support for Unity 2019
|
||||
|
||||
Materials must be converted to an updated format, a pop up will appear when selecting a water material to notify you. This process is automated.
|
||||
* Custom water materials may look incorrect (eg. certain features suddenly disabled) until the conversion is performed.
|
||||
|
||||
Added:
|
||||
- Material UI now supports multi-selection and Material Variants (in Unity 2022.1+).
|
||||
- Support for Forward+ rendering (in 2022.2+).
|
||||
- Distortion & Strength Multiplier parameters for point/spot light reflections.
|
||||
- A separate normal map texture can now be used for river slopes.
|
||||
|
||||
Changed:
|
||||
- Translucency shading now only takes effect within the water's fog.
|
||||
- Sun/Light specular reflection no longer assume the surface is flat, and will better work on curved surfaces.
|
||||
- Usage of a custom time value no longer requires modifying the shader code. Instead using the Buoyancy.SetCustomTime function automatically enables this.
|
||||
- URP version specific shader code is now solely based on the Unity editor version, rather than the URP package version (new standard as of 2022.1).
|
||||
- Help window now shows the compatibility state of the chosen graphics API.
|
||||
|
||||
Fixed:
|
||||
- Horizon color and Reflection Curvature Mask now behave the same for back faces as they do for front faces.
|
||||
- Caustics for point/spot lights not taking the water's fog density into account.
|
||||
|
||||
1.2.0
|
||||
|
||||
Added:
|
||||
- Fog integration for Enviro 3
|
||||
- Planar Reflection Renderer, option to move the rendering bounds with the Transform
|
||||
|
||||
Fixed:
|
||||
- Refraction not affecting the skybox on sloped water surfaces
|
||||
- 'Assets/Create/Water mesh' action not directly creating the asset, unless the asset database was refreshed.
|
||||
- Planar Reflections, realtime changes to the Field of View or Orthographic camera properties not being applied.
|
||||
- Pre-emptive fixes for Unity 2022.2 beta
|
||||
|
||||
1.1.9
|
||||
|
||||
Added:
|
||||
- Planar Reflection Renderer, API to add/remove specific water objects
|
||||
|
||||
Changed:
|
||||
- Updated fog integration for COZY Weather
|
||||
- The distance normals texture now uses the same import settings as the regular normal map (eg. filtering settings)
|
||||
|
||||
Fixed:
|
||||
- Horizon color appearing as a sharp circle on Mobile at large distances
|
||||
- Underwater reflection not appearing entirely correct (regression since v1.1.8)
|
||||
- Edge fading canceling out translucency shading when viewed from underwater
|
||||
|
||||
1.1.8b
|
||||
|
||||
Hotfixes:
|
||||
- Underwater reflections not showing objects above the water surface
|
||||
- Build error caused by keyword stripping under certain conditions
|
||||
|
||||
1.1.8
|
||||
Minimum supported version is now Unity 2020.3.1 and URP 10.3.2
|
||||
|
||||
Added:
|
||||
- Fog integration for COZY Weather.
|
||||
- Sharp and Stream waves normal map.
|
||||
- River mode, slope threshold parameter.
|
||||
|
||||
Changed:
|
||||
- Updated smooth waves normal map to show less repetition.
|
||||
- Alpha channels of deep/shallow colors no longer control opacity, but water depth instead. Clear water is now made possible.
|
||||
- Simple shading now also masks out objects above the water for refraction.
|
||||
- Advanced shading now also refracts the fog gradient (requires more calculations, hence limited to this mode).
|
||||
- Reflections are now laid over translucency shading. Added a parameter to control this behaviour.
|
||||
- Optimized wave shader calculations for vertex animations.
|
||||
- Double-clicking a water mesh in an inspector now properly selects it, rather than the OS trying to open the file.
|
||||
|
||||
Fixed:
|
||||
- Planar Reflection with Underwater Rendering causing a black/white image when used together.
|
||||
- Blue vertex color painting not affecting horizontal wave movements.
|
||||
- Horizontal displacement created by waves not affecting UV's. Normal map now also moves back and forth.
|
||||
|
||||
1.1.7
|
||||
|
||||
Added:
|
||||
- Support for spot/point light shadows in Unity 2021.1+/URP v12+ (requires the "Receive shadows" option to be enabled).
|
||||
|
||||
Changed:
|
||||
- Caustics effect is now influenced by the sun light's intensity. Spot/point lights will create a localized caustics effect.
|
||||
- Improved translucency shading for point/spot lights, now visually behaves the same as it does for a directional light.
|
||||
- Improved light reflection for rivers, now takes the mesh's curvature into account.
|
||||
- Lighting no longer applies to the reflected image, since it is already lit. Added parameter to control this behavior.
|
||||
- Warning is now displayed in the material UI if the render queue set is illegal.
|
||||
|
||||
Fixed:
|
||||
- Specular reflection for point lights still being calculated when Light Reflection feature was disabled.
|
||||
- Shadow mask used for the sun reflection/translucency did not take shadow fading into account.
|
||||
* The "Receive shadows" must be now be enabled to mask these effect. Shadow strength can still be 0.
|
||||
|
||||
1.1.6
|
||||
|
||||
Added:
|
||||
- Planar Reflection Renderer, option to enable shadows in the reflection render.
|
||||
|
||||
Fixed:
|
||||
- StylizedWaterDataProvider script breaking since DWP2 v2.5.1, due to API changes (now the minimum required version)
|
||||
|
||||
1.1.5
|
||||
Minimum supported version is now 2019.4.15 LTS and URP 7.5.3. Verified compatibility with 2021.2.0
|
||||
|
||||
If in use, this version must be updated alongside of the Underwater Rendering extension v1.0.4.
|
||||
|
||||
Added:
|
||||
- Support for lightmaps and realtime GI
|
||||
|
||||
Changed:
|
||||
- Floating Transform component now has a "Dynamic material" checkbox. If set, wave settings are fetched each frame.
|
||||
- Sample positions on Floating Transform component now correctly work with prefab overrides.
|
||||
- Water Grid component will now regenerate the water tile mesh if it is missing. Allowing it to be used in prefabs.
|
||||
- Intersection Foam and Edge Fade effects now fade out when the camera sits extremely close on the water surface (excluded for rivers).
|
||||
* This avoids them being visible through the waves, causing a horizontal line.
|
||||
* Can cause slight visual warping, but this isn't noticeable for animated water
|
||||
- Green vertex color channel now controls the depth color gradient, rather than Opacity. This allows all depth-based effects to be controlled through vertex colors
|
||||
* This behaviour still controls opacity when river mode is used.
|
||||
|
||||
Fixed:
|
||||
- Terrain appearing black/red in planar reflections when using more than 4 layers.
|
||||
- "Screen position out of view frustum" errors being thrown when using Planar Reflections with an orthographic camera aimed completely straight.
|
||||
- Sun reflection blowing out when using Gamma color space and HDR
|
||||
- Unused shader variants not being stripped when Tessellation was being used, causing longer build times on older Unity versions.
|
||||
|
||||
1.1.4
|
||||
|
||||
Added:
|
||||
- WaterObject.Find function. Attempts to find the WaterObject above or below the given position.
|
||||
* Floating Transform component now has an "Auto-find" option
|
||||
- Buoyancy.Raycast function. Given a position and direction, finds the intersection point with the water
|
||||
- Planar Reflections, maximum LOD quality setting. Can be used to limit reflected objects to LOD1 or LOD2
|
||||
- Caustics distortion parameter. Offsets the caustics based on the normal map.
|
||||
|
||||
Changed:
|
||||
- Planar Reflections, standard fog no longer renders into to the reflection. This can cause artifacts where it "bleeds" over partially culled geometry
|
||||
|
||||
Fixed:
|
||||
- Azure fog library file not being found (GUID was changed)
|
||||
|
||||
1.1.3
|
||||
|
||||
Added:
|
||||
- Vertical depth parameter, controls the density of the water based on viewing angle
|
||||
- Realistic water material (ocean-esque)
|
||||
|
||||
Changed:
|
||||
- Water meshes created through the utility or Water Grid component now have some height. Avoids premature culling when using high waves.
|
||||
- Water Mesh utility can now automatically apply changes when parameters are modified.
|
||||
- Setup actions under the Window menu now support Undo/redo actions
|
||||
- Improved blending of normal maps for the Advanced shading mode
|
||||
- Wave normals now distort caustics, creating a more believable effect
|
||||
- Translucency shading now takes the surface curvature into account (controllable through new parameter)
|
||||
- UI: translucency moved to the Lighting/Shading tab
|
||||
|
||||
Fixed:
|
||||
- Water depth not rendering correctly when using an orthographic camera and OpenGL
|
||||
- WaterMesh.Create function not taking the chosen shape into account, always creating a rectangle
|
||||
- Integration for Dynamic Water Physics 2 no longer working since v2.4.2 (now the minimum required version)
|
||||
- Refraction and reflection distortion appearing much stronger for orthographic camera's
|
||||
|
||||
1.1.2
|
||||
This version includes some changes required for the Underwater Rendering extension
|
||||
|
||||
Added:
|
||||
- Tessellation support (preview feature). Can be enabled under the "Advanced" tab.
|
||||
- Added menu item to auto-setup Planar Reflections or create a Water Grid
|
||||
- Hard-coded file paths for third-party fog libraries are now automatically rewritten
|
||||
- Fog can now be globally disabled for the water through script (see "Third party integrations" section in docs)
|
||||
- Support for reflection probe blending and box projection. Requires 2021.2.0b1+, will break in an alpha version
|
||||
- (Pre-emptive) Support for rendering debug window in 2021.2.0b1
|
||||
|
||||
Changed:
|
||||
- Menu item "Help/Stylized Water 2" moved to "Window/Stylized Water 2/Hub"
|
||||
- Improved refraction, this now takes the surface curvature into account. Maximum allowed strength increased to x3
|
||||
|
||||
Fixed:
|
||||
- Fog integration for SC Post Effects and Atmospheric Height Fog (v2.0.0+)
|
||||
|
||||
1.1.1
|
||||
|
||||
Hotfix for build-blocking error in some cases. Shader variants for features not installed are now stripped during the build process
|
||||
|
||||
1.1.0
|
||||
|
||||
Added:
|
||||
- Diorama example scene
|
||||
- Exposed parameter to control the size of point/spot light specular reflections
|
||||
|
||||
Changed:
|
||||
- Translucency shading will now also work if lighting is disabled
|
||||
- Intersection- and surface foam and now appear correct when using the Gamma color-space
|
||||
- Surface foam can now be painted using the Alpha channel of the painted color. Previously the Blue channel was used only if River Mode was enabled.
|
||||
- Planar Reflection Renderer component now shows a warning if reflection were globally disabled by an external script
|
||||
|
||||
Fixed:
|
||||
- Scripting build error on tvOS due to VR code being stripped for the platform
|
||||
- When river mode is enabled, a second layer of foam on slopes wasn't visible.
|
||||
- Planar Reflection Renderer component needing to be toggled when using multiple instances
|
||||
- Buoyancy not being in sync when animation speed was higher than x1
|
||||
|
||||
1.0.9
|
||||
|
||||
Added:
|
||||
- Support for SC Post Effects Pack fog rendering (activated through the Help window)
|
||||
|
||||
Changed:
|
||||
- Material UI now has a help toggle button, with quick links to documentation
|
||||
- Buoyancy.SampleWaves function now has a boolean argument, to indicate if the material's wave parameters are being changed at runtime. Version without this has been marked as obsolete.
|
||||
- Floating Transform component now supports multi-selection
|
||||
|
||||
Fixed:
|
||||
- Planar reflections failing to render if the water mesh was positioned further away than its size
|
||||
- Warning about obsolete API in Unity 2021.2+ due to URP changes, package will now import without any interuptions
|
||||
- Shader error when Enviro fog was enabled, due to a conflicting function name
|
||||
|
||||
1.0.8
|
||||
|
||||
Added:
|
||||
- Distance normals feature, blends in a second normal map, based on a start/end distance.
|
||||
- Distance fade parameter for waves. Waves can smoothly fade out between a start/end distance, to avoid tiling artifacts when viewed from afar.
|
||||
- Planar Reflections, option to specify the renderer to be used for reflection. This allows a set up where certain render features aren't being applied to the reflection
|
||||
|
||||
Changed:
|
||||
- Planar Reflections inspector now shows a warning and quick-fix button if the bounds need to be recalculated.
|
||||
- Material section headers now also have tooltips
|
||||
- Water Grid improvements, now only recreates tiles if the rows/colums value was changed
|
||||
|
||||
Fixed:
|
||||
- Issues with DWP2 integration since its latest update
|
||||
|
||||
1.0.7
|
||||
|
||||
Added:
|
||||
- Planar Reflections, option to include skybox.
|
||||
|
||||
Changed:
|
||||
- Greatly improved caustics shading. No longer depends on the normal map for distortion.
|
||||
- Normal map now has a speed multiplier, rather than being bound to the wave animation speed. If any custom materials were made, these likely have to be adjusted
|
||||
- Updated default filepath for Boxophobic's Atmospheric Height Fog. This requires to reconfigure the fog integration through the Help window.
|
||||
- Removed "MainColor" attribute from shader's deep color, to avoid Unity giving it a white color value for new materials
|
||||
- Floating Transform, if roll strength is 0, the component will no longer modify the transform's orientation
|
||||
|
||||
Fixed:
|
||||
- Objects above/in front of the water are no longer being refracted. Requires some additional legwork, so is limited to the Advanced shading mode.
|
||||
- (Preliminary) Error about experimental API in Unity 2021.2+
|
||||
|
||||
1.0.6
|
||||
|
||||
Added:
|
||||
- River mode, forces animations to flow in the vertical UV direction and draws surface foam on slopes (with configurable stretching and speed).
|
||||
- Waterfall splash particle effect
|
||||
- Data provider script for Dynamic Water Physics 2 is now part of the package (can be unlocked through the Help window if installed)
|
||||
- Curvature mask parameter for environment reflections, allows for more true-to-nature reflections
|
||||
|
||||
Changed:
|
||||
- Water hole shader can now also be used with Curved World 2020
|
||||
|
||||
Fixed:
|
||||
- Planar reflections, reflected objects being sorting in reverse in some cases
|
||||
- Mobile, animations appearing stepped on some devices when using Vulkan rendering
|
||||
- (Preliminary) Error in URP 11, due to changes in shader code
|
||||
|
||||
1.0.5
|
||||
|
||||
Added:
|
||||
- Particle effects, composed out of flipbooks with normal maps:
|
||||
* Big splash
|
||||
* Stationary ripples
|
||||
* Trail
|
||||
* Collision effect (eg. boat bows)
|
||||
* Splash ring (eg. footsteps)
|
||||
* Waterfall mist
|
||||
* Splash upwards
|
||||
- Water Grid component, can create a grid of water objects and follow a specific transform.
|
||||
|
||||
Fixed:
|
||||
- Material turning black if normal map was enabled, yet no normal map was assigned.
|
||||
- Intersection texture was using mesh UV, even when UV source was set to "World XZ Projected".
|
||||
|
||||
Changed:
|
||||
- Waves no longer displace along the mesh's normal when "World XZ projected" UV is used, which was incorrect behaviour
|
||||
- Sparkles are no longer based on sun direction, this way they stay a consistent size in dynamically lit scenes. Instead they fade out when the sun approaches the horizon.
|
||||
- When using Flat Shading, refraction and caustics still use the normal map, instead of the flat face normals.
|
||||
- Planar Reflections render scale now takes render scale configured in URP settings into account
|
||||
- Improved Rough Waves and Sea Foam textures
|
||||
|
||||
1.0.4
|
||||
|
||||
Added:
|
||||
- CanTouchWater function to Buoyancy class: Checks if a position is below the maximum possible wave height. Can be used as a fast broad-phase check, before actually using the more expensive SampleWaves function
|
||||
- Context menu option to Transform component to add Floating Transform component
|
||||
|
||||
Fixed:
|
||||
- Error in material UI when no pipeline asset was assigned in Graphics Settings
|
||||
- Floating Transform, sample points not being saved if object was a prefab
|
||||
|
||||
Changed:
|
||||
- Revised demo content
|
||||
- Floating Transform no longer animates when editing a prefab using the component
|
||||
- Minor UI improvements
|
||||
|
||||
1.0.3
|
||||
|
||||
Added:
|
||||
- Water Object script, as a general means of identifying and finding water meshes between systems, this is now attached to all prefabs
|
||||
- Planar reflections renderer, enables mirror-like reflections from specific layers
|
||||
|
||||
Changed:
|
||||
- Buoyancy sample positions of Floating Transform can now be manipulated in the scene view
|
||||
|
||||
Fixed:
|
||||
- Error when assigning material to Floating Transform component, or not being able to
|
||||
|
||||
1.0.2
|
||||
Verified compatibility with Wavemaker
|
||||
|
||||
Added:
|
||||
- Support for Boxophobic's Atmospheric Height Fog (can be enabled through the Help window)
|
||||
|
||||
Changed:
|
||||
- Shader now correctly takes the mesh's vertex normal into account, making it suitable for use with spheres and rivers
|
||||
|
||||
1.0.1
|
||||
Verified compatibility with Oculus Quest (see compatibility section of documentation, some caveats apply due to an OpenGLES bug)
|
||||
|
||||
Fixed:
|
||||
- Hard visible transition in translucency effect when exponent was set to 1
|
||||
- Back faces not visible when culling was set to "Double-sided" and depth texture was enabled
|
||||
|
||||
1.0.0
|
||||
Initial release (Nov 3 2020)
|
14
Assets/StylizedWater2/CHANGELOG.md.meta
Normal file
@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f07fbdad38458814a87e9b627e287ccb
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/CHANGELOG.md
|
||||
uploadId: 679956
|
6
Assets/StylizedWater2/Documentation.url
Normal file
@ -0,0 +1,6 @@
|
||||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,2
|
||||
[InternetShortcut]
|
||||
IDList=
|
||||
URL=http://staggart.xyz/unity/stylized-water-2/sws-2-docs/
|
||||
HotKey=0
|
14
Assets/StylizedWater2/Documentation.url.meta
Normal file
@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69fb6414614e3ae498bcab4065b96842
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Documentation.url
|
||||
uploadId: 679956
|
8
Assets/StylizedWater2/DynamicEffects.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 951df8029121e074bbefef031df17676
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
30
Assets/StylizedWater2/DynamicEffects/CHANGELOG.md
Normal file
@ -0,0 +1,30 @@
|
||||
1.1.1
|
||||
|
||||
Changed:
|
||||
- Implemented proper error handling for Unity 6.
|
||||
|
||||
Fixed:
|
||||
- Indirect lighting and reflections being black in demo scene in Unity 2023.2+.
|
||||
|
||||
1.1.0
|
||||
Minimum required version of Stylized Water 2 is now v1.6.0
|
||||
|
||||
Added:
|
||||
- Option on render feature to disable high precision rendering. Uses half the memory, but induces banding artefacts.
|
||||
- Material toggle to remap displacement to allow negative values.
|
||||
|
||||
Changed:
|
||||
- Overall improvement to effects (all prefabs have been adjusted, custom effects may now need to have their Displacement strength toned down).
|
||||
- Improved rendering and calculations of normals. Now uses half the amount of VRAM
|
||||
- Particle effects now use a Quad mesh, instead of a Horizontal Billboard. This ensures their scale stays consistent.
|
||||
|
||||
Fixed:
|
||||
- Edges on trails (corner verts)
|
||||
|
||||
1.0.1
|
||||
|
||||
Added:
|
||||
- Demo scene, UI sliders to control the render range and resolution
|
||||
|
||||
Fixed:
|
||||
- DemoController script throwing an error on some platforms (likely due to localization).
|
10
Assets/StylizedWater2/DynamicEffects/CHANGELOG.md.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f2f739ec3384659b02b3b50734684e2
|
||||
timeCreated: 1698133570
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/DynamicEffects/CHANGELOG.md
|
||||
uploadId: 679964
|
6
Assets/StylizedWater2/DynamicEffects/Documentation.url
Normal file
@ -0,0 +1,6 @@
|
||||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,2
|
||||
[InternetShortcut]
|
||||
IDList=
|
||||
URL=http://staggart.xyz/unity/stylized-water-2/sws-2-docs/
|
||||
HotKey=0
|
14
Assets/StylizedWater2/DynamicEffects/Documentation.url.meta
Normal file
@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f1fe06414e2703746aba660a616e5daf
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/DynamicEffects/Documentation.url
|
||||
uploadId: 679964
|
8
Assets/StylizedWater2/Editor.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e638e145f4b49f746adf0d639da49894
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
468
Assets/StylizedWater2/Editor/AssetInfo.cs
Normal file
@ -0,0 +1,468 @@
|
||||
//Stylized Water 2
|
||||
//Staggart Creations (http://staggart.xyz)
|
||||
//Copyright protected under Unity Asset Store EULA
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using UnityEditor;
|
||||
using UnityEditor.PackageManager;
|
||||
using UnityEditor.PackageManager.Requests;
|
||||
using PackageInfo = UnityEditor.PackageManager.PackageInfo;
|
||||
using UnityEngine;
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
public class AssetInfo
|
||||
{
|
||||
private const string THIS_FILE_GUID = "d5972a1c9cddd9941aec37a3343647aa";
|
||||
|
||||
public const string ASSET_NAME = "Stylized Water 2";
|
||||
public const string ASSET_ID = "170386";
|
||||
public const string ASSET_ABRV = "SW2";
|
||||
|
||||
public const string INSTALLED_VERSION = "1.6.8";
|
||||
|
||||
public const int SHADER_GENERATOR_VERSION_MAJOR = 1;
|
||||
public const int SHADER_GENERATOR_MINOR = 2;
|
||||
public const int SHADER_GENERATOR_PATCH = 1;
|
||||
|
||||
public const string MIN_UNITY_VERSION = "2021.3.16f1";
|
||||
public const string MIN_URP_VERSION = "12.1.6";
|
||||
|
||||
public const string DOC_URL = "http://staggart.xyz/unity/stylized-water-2/sws-2-docs/";
|
||||
public const string FORUM_URL = "https://forum.unity.com/threads/999132/";
|
||||
public const string EMAIL_URL = "mailto:contact@staggart.xyz?subject=Stylized Water 2";
|
||||
public const string DISCORD_INVITE_URL = "https://discord.gg/GNjEaJc8gw";
|
||||
|
||||
public static bool supportedVersion = true;
|
||||
public static bool compatibleVersion = true;
|
||||
public static bool outdatedVersion = false;
|
||||
|
||||
public static bool alphaVersion = false;
|
||||
|
||||
#if !URP //Enabled when com.unity.render-pipelines.universal is below MIN_URP_VERSION
|
||||
[InitializeOnLoad]
|
||||
sealed class PackageInstaller : Editor
|
||||
{
|
||||
[InitializeOnLoadMethod]
|
||||
public static void Initialize()
|
||||
{
|
||||
GetLatestCompatibleURPVersion();
|
||||
|
||||
if (EditorUtility.DisplayDialog(ASSET_NAME + " v" + INSTALLED_VERSION, "This package requires the Universal Render Pipeline " + MIN_URP_VERSION + " or newer, would you like to install or update it now?", "OK", "Later"))
|
||||
{
|
||||
Debug.Log("Universal Render Pipeline <b>v" + lastestURPVersion + "</b> will start installing in a moment. Please refer to the URP documentation for set up instructions");
|
||||
Debug.Log("After installing and setting up URP, you must Re-import the Shaders folder!");
|
||||
|
||||
InstallURP();
|
||||
}
|
||||
}
|
||||
|
||||
private static PackageInfo urpPackage;
|
||||
|
||||
private static string lastestURPVersion;
|
||||
|
||||
#if SWS_DEV
|
||||
[MenuItem("SWS/Get latest URP version")]
|
||||
#endif
|
||||
private static void GetLatestCompatibleURPVersion()
|
||||
{
|
||||
if(urpPackage == null) urpPackage = GetURPPackage();
|
||||
if(urpPackage == null) return;
|
||||
|
||||
lastestURPVersion = urpPackage.versions.latestCompatible;
|
||||
|
||||
#if SWS_DEV
|
||||
Debug.Log("Latest compatible URP version: " + lastestURPVersion);
|
||||
#endif
|
||||
}
|
||||
|
||||
private static void InstallURP()
|
||||
{
|
||||
if(urpPackage == null) urpPackage = GetURPPackage();
|
||||
if(urpPackage == null) return;
|
||||
|
||||
lastestURPVersion = urpPackage.versions.latestCompatible;
|
||||
|
||||
AddRequest addRequest = Client.Add(URP_PACKAGE_ID + "@" + lastestURPVersion);
|
||||
|
||||
//Update Core and Shader Graph packages as well, doesn't always happen automatically
|
||||
for (int i = 0; i < urpPackage.dependencies.Length; i++)
|
||||
{
|
||||
#if SWS_DEV
|
||||
Debug.Log("Updating URP dependency <i>" + urpPackage.dependencies[i].name + "</i> to " + urpPackage.dependencies[i].version);
|
||||
#endif
|
||||
addRequest = Client.Add(urpPackage.dependencies[i].name + "@" + urpPackage.dependencies[i].version);
|
||||
}
|
||||
|
||||
//Wait until finished
|
||||
while(!addRequest.IsCompleted || addRequest.Status == StatusCode.InProgress) { }
|
||||
|
||||
WaterShaderImporter.ReimportAll();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public const string URP_PACKAGE_ID = "com.unity.render-pipelines.universal";
|
||||
|
||||
public static PackageInfo GetURPPackage()
|
||||
{
|
||||
SearchRequest request = Client.Search(URP_PACKAGE_ID);
|
||||
|
||||
while (request.Status == StatusCode.InProgress) { /* Waiting... */ }
|
||||
|
||||
if (request.Status == StatusCode.Failure)
|
||||
{
|
||||
Debug.LogError("Failed to retrieve URP package from Package Manager...");
|
||||
return null;
|
||||
}
|
||||
|
||||
return request.Result[0];
|
||||
}
|
||||
|
||||
//Sorry, as much as I hate to intrude on an entire project, this is the only way in Unity to track importing or updating an asset
|
||||
public class ImportOrUpdateAsset : AssetPostprocessor
|
||||
{
|
||||
private static bool OldShadersPresent()
|
||||
{
|
||||
return Shader.Find("Universal Render Pipeline/FX/Stylized Water 2") || Shader.Find("Hidden/StylizedWater2/Deleted");
|
||||
}
|
||||
|
||||
private void OnPreprocessAsset()
|
||||
{
|
||||
var oldShaders = false;
|
||||
//Importing/updating the Stylized Water 2 asset
|
||||
if (assetPath.EndsWith("StylizedWater2/Editor/AssetInfo.cs") || assetPath.EndsWith("sc.stylizedwater2/Editor/AssetInfo.cs"))
|
||||
{
|
||||
oldShaders = OldShadersPresent();
|
||||
}
|
||||
//These files change every version, so will trigger when updating or importing the first time
|
||||
if (
|
||||
//Importing the Underwater Rendering extension
|
||||
assetPath.EndsWith("StylizedWater2/Runtime/Underwater/UnderwaterRenderer.cs"))
|
||||
//Any further extensions...
|
||||
{
|
||||
OnImportExtension("Underwater Rendering");
|
||||
|
||||
oldShaders = OldShadersPresent();
|
||||
}
|
||||
|
||||
if (assetPath.EndsWith("StylizedWater2/Runtime/DynamicEffects/WaterDynamicEffectsRenderFeature.cs"))
|
||||
{
|
||||
OnImportExtension("Dynamic Effects");
|
||||
}
|
||||
|
||||
if (oldShaders)
|
||||
{
|
||||
//Old non-templated shader(s) still present.
|
||||
if (EditorUtility.DisplayDialog(AssetInfo.ASSET_NAME, "Updating to v1.4.0+. Obsolete shader files were detected." +
|
||||
"\n\n" +
|
||||
"The water shader(s) are a now C# generated, thus has moved to a different file." +
|
||||
"\n\n" +
|
||||
"Materials in your project using the old shader must switch to it." +
|
||||
"\n\n" +
|
||||
"This process is automatic. The obsolete files will also be deleted." +
|
||||
"\n\n" +
|
||||
"Rest assured, no settings or functionality will be lost!", "OK", "Cancel"))
|
||||
{
|
||||
UpgradeMaterials();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void OnImportExtension(string name)
|
||||
{
|
||||
Debug.Log($"[Stylized Water 2] {name} extension installed/deleted or updated. Reimporting water shader(s) to toggle integration.");
|
||||
|
||||
//Re-import any .watershader files, since these depend on the installation state of extensions
|
||||
WaterShaderImporter.ReimportAll();
|
||||
}
|
||||
}
|
||||
|
||||
#if SWS_DEV
|
||||
[MenuItem("SWS/Upgrading/Upgrade materials to 1.4.0+")]
|
||||
#endif
|
||||
private static void UpgradeMaterials()
|
||||
{
|
||||
Shader oldShader = Shader.Find("Universal Render Pipeline/FX/Stylized Water 2");
|
||||
Shader oldShaderTess = Shader.Find("Universal Render Pipeline/FX/Stylized Water 2 (Tessellation)");
|
||||
|
||||
Shader newShader = Shader.Find("Stylized Water 2/Standard");
|
||||
Shader newShaderTess = Shader.Find("Stylized Water 2/Standard (Tessellation)");
|
||||
|
||||
int upgradedMaterialCount = 0;
|
||||
|
||||
//Possible the script imported before the water shader even did
|
||||
//Or the water shader was already deleted, yet this function is triggered by an old underwater-rendering shader.
|
||||
if (newShader != null || oldShader != null)
|
||||
{
|
||||
string[] materials = AssetDatabase.FindAssets("t: Material");
|
||||
|
||||
int totalMaterials = materials.Length;
|
||||
|
||||
for (int i = 0; i < totalMaterials; i++)
|
||||
{
|
||||
Material mat = AssetDatabase.LoadAssetAtPath<Material>(AssetDatabase.GUIDToAssetPath(materials[i]));
|
||||
|
||||
EditorUtility.DisplayProgressBar(ASSET_NAME, $"Checking \"{mat.name}\" ({i}/{totalMaterials})", (float)i / (float)totalMaterials);
|
||||
|
||||
if (mat.shader == oldShader)
|
||||
{
|
||||
int queue = mat.renderQueue;
|
||||
mat.shader = newShader;
|
||||
mat.renderQueue = queue;
|
||||
EditorUtility.SetDirty(mat);
|
||||
upgradedMaterialCount++;
|
||||
}
|
||||
|
||||
if (mat.shader == oldShaderTess)
|
||||
{
|
||||
int queue = mat.renderQueue;
|
||||
mat.shader = newShaderTess;
|
||||
mat.renderQueue = queue;
|
||||
|
||||
EditorUtility.SetDirty(mat);
|
||||
upgradedMaterialCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorUtility.ClearProgressBar();
|
||||
|
||||
List<string> deletedFiles = new List<string>();
|
||||
//Delete old files
|
||||
{
|
||||
void DeleteFile(string path)
|
||||
{
|
||||
if (path != string.Empty)
|
||||
{
|
||||
deletedFiles.Add(path);
|
||||
AssetDatabase.DeleteAsset(path);
|
||||
}
|
||||
}
|
||||
|
||||
DeleteFile(AssetDatabase.GetAssetPath(oldShader));
|
||||
DeleteFile(AssetDatabase.GetAssetPath(oldShaderTess));
|
||||
|
||||
//UnderwaterMask.shader
|
||||
DeleteFile(AssetDatabase.GUIDToAssetPath("85caab243c23a1e489cd0bdcaf742560"));
|
||||
|
||||
//UnderwaterShading.shader
|
||||
DeleteFile(AssetDatabase.GUIDToAssetPath("33652c9d694d8004bb649164aafc9ecc"));
|
||||
|
||||
//Waterline.shader
|
||||
DeleteFile(AssetDatabase.GUIDToAssetPath("aef8d53c098c94044b72ea6bda9bb6bc"));
|
||||
|
||||
//UnderwaterPost.shader
|
||||
DeleteFile(AssetDatabase.GUIDToAssetPath("7b53b35c69174ce092d2712e3db77f0e"));
|
||||
}
|
||||
|
||||
if (upgradedMaterialCount > 0 || deletedFiles.Count > 0)
|
||||
{
|
||||
if (EditorUtility.DisplayDialog(AssetInfo.ASSET_NAME, $"Converted {upgradedMaterialCount} materials to use the new water shader." +
|
||||
$"\n\nObsolete shader files ({deletedFiles.Count}) deleted:\n\n" +
|
||||
String.Join(Environment.NewLine, deletedFiles),
|
||||
"OK")) { }
|
||||
}
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
|
||||
Debug.Log("<b>[Stylized Water 2]</b> Upgrade of materials and project complete!");
|
||||
}
|
||||
|
||||
public static bool MeetsMinimumVersion(string versionMinimum)
|
||||
{
|
||||
Version curVersion = new Version(INSTALLED_VERSION);
|
||||
Version minVersion = new Version(versionMinimum);
|
||||
|
||||
return curVersion >= minVersion;
|
||||
}
|
||||
|
||||
public static void OpenAssetStore(string url = null)
|
||||
{
|
||||
if (url == string.Empty) url = "https://assetstore.unity.com/packages/slug/" + ASSET_ID;
|
||||
|
||||
Application.OpenURL(url + "?aid=1011l7Uk8&pubref=sw2editor");
|
||||
}
|
||||
|
||||
public static void OpenReviewsPage()
|
||||
{
|
||||
Application.OpenURL($"https://assetstore.unity.com/packages/slug/{ASSET_ID}?aid=1011l7Uk8&pubref=sw2editor#reviews");
|
||||
}
|
||||
|
||||
public static void OpenInPackageManager()
|
||||
{
|
||||
Application.OpenURL("com.unity3d.kharma:content/" + ASSET_ID);
|
||||
}
|
||||
|
||||
public static void OpenForumPage()
|
||||
{
|
||||
Application.OpenURL(FORUM_URL + "/page-999");
|
||||
}
|
||||
|
||||
public static string GetRootFolder()
|
||||
{
|
||||
//Get script path
|
||||
string scriptFilePath = AssetDatabase.GUIDToAssetPath(THIS_FILE_GUID);
|
||||
|
||||
//Truncate to get relative path
|
||||
string rootFolder = scriptFilePath.Replace("Editor/AssetInfo.cs", string.Empty);
|
||||
|
||||
#if SWS_DEV
|
||||
//Debug.Log("<b>Package root</b> " + rootFolder);
|
||||
#endif
|
||||
|
||||
return rootFolder;
|
||||
}
|
||||
|
||||
public static class VersionChecking
|
||||
{
|
||||
[InitializeOnLoadMethod]
|
||||
static void Initialize()
|
||||
{
|
||||
if (CHECK_PERFORMED == false)
|
||||
{
|
||||
CheckForUpdate(false);
|
||||
CHECK_PERFORMED = true;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool CHECK_PERFORMED
|
||||
{
|
||||
get => SessionState.GetBool("SW2_VERSION_CHECK_PERFORMED", false);
|
||||
set => SessionState.SetBool("SW2_VERSION_CHECK_PERFORMED", value);
|
||||
}
|
||||
|
||||
public static string LATEST_VERSION
|
||||
{
|
||||
get => SessionState.GetString("SW2_LATEST_VERSION", INSTALLED_VERSION);
|
||||
set => SessionState.SetString("SW2_LATEST_VERSION", value);
|
||||
}
|
||||
public static bool UPDATE_AVAILABLE => new Version(LATEST_VERSION) > new Version(INSTALLED_VERSION);
|
||||
|
||||
public static string GetUnityVersion()
|
||||
{
|
||||
string version = UnityEditorInternal.InternalEditorUtility.GetFullUnityVersion();
|
||||
|
||||
//Remove GUID in parenthesis
|
||||
return version.Substring(0, version.LastIndexOf(" ("));
|
||||
}
|
||||
|
||||
public static void CheckUnityVersion()
|
||||
{
|
||||
outdatedVersion = false;
|
||||
supportedVersion = true;
|
||||
compatibleVersion = true;
|
||||
|
||||
#if !UNITY_2020_3_OR_NEWER
|
||||
compatibleVersion = false;
|
||||
#endif
|
||||
|
||||
#if !UNITY_2021_3_OR_NEWER
|
||||
outdatedVersion = true;
|
||||
#endif
|
||||
|
||||
#if UNITY_6000_0_OR_NEWER
|
||||
supportedVersion = false;
|
||||
#endif
|
||||
|
||||
string versionName = GetUnityVersion();
|
||||
alphaVersion = versionName.Contains("f") == false;
|
||||
}
|
||||
|
||||
public static string apiResult;
|
||||
private static bool showPopup;
|
||||
|
||||
public enum VersionStatus
|
||||
{
|
||||
UpToDate,
|
||||
Outdated
|
||||
}
|
||||
|
||||
public enum QueryStatus
|
||||
{
|
||||
Fetching,
|
||||
Completed,
|
||||
Failed
|
||||
}
|
||||
public static QueryStatus queryStatus = QueryStatus.Completed;
|
||||
|
||||
#if SWS_DEV
|
||||
[MenuItem("SWS/Check for update")]
|
||||
#endif
|
||||
public static void GetLatestVersionPopup()
|
||||
{
|
||||
CheckForUpdate(true);
|
||||
}
|
||||
|
||||
private static int VersionStringToInt(string input)
|
||||
{
|
||||
//Remove all non-alphanumeric characters from version
|
||||
input = input.Replace(".", string.Empty);
|
||||
input = input.Replace(" BETA", string.Empty);
|
||||
return int.Parse(input, System.Globalization.NumberStyles.Any);
|
||||
}
|
||||
|
||||
public static void CheckForUpdate(bool showPopup = false)
|
||||
{
|
||||
VersionChecking.showPopup = showPopup;
|
||||
|
||||
queryStatus = QueryStatus.Fetching;
|
||||
|
||||
var url = $"https://api.assetstore.unity3d.com/package/latest-version/{ASSET_ID}";
|
||||
|
||||
using (System.Net.WebClient webClient = new System.Net.WebClient())
|
||||
{
|
||||
webClient.DownloadStringCompleted += OnRetrievedAPIContent;
|
||||
webClient.DownloadStringAsync(new System.Uri(url), apiResult);
|
||||
}
|
||||
}
|
||||
|
||||
private class AssetStoreItem
|
||||
{
|
||||
public string name;
|
||||
public string version;
|
||||
}
|
||||
|
||||
private static void OnRetrievedAPIContent(object sender, DownloadStringCompletedEventArgs e)
|
||||
{
|
||||
if (e.Error == null && !e.Cancelled)
|
||||
{
|
||||
string result = e.Result;
|
||||
|
||||
AssetStoreItem asset = (AssetStoreItem)JsonUtility.FromJson(result, typeof(AssetStoreItem));
|
||||
|
||||
LATEST_VERSION = asset.version;
|
||||
|
||||
#if SWS_DEV
|
||||
Debug.Log("<b>PackageVersionCheck</b> Update available = " + UPDATE_AVAILABLE + " (Installed:" + INSTALLED_VERSION + ") (Remote:" + LATEST_VERSION + ")");
|
||||
#endif
|
||||
|
||||
queryStatus = QueryStatus.Completed;
|
||||
|
||||
if (VersionChecking.showPopup)
|
||||
{
|
||||
if (UPDATE_AVAILABLE)
|
||||
{
|
||||
if (EditorUtility.DisplayDialog(ASSET_NAME + ", version " + INSTALLED_VERSION, "An updated version is available: " + LATEST_VERSION, "Open Package Manager", "Close"))
|
||||
{
|
||||
OpenInPackageManager();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (EditorUtility.DisplayDialog(ASSET_NAME + ", version " + INSTALLED_VERSION, "Installed version is up-to-date!", "Close")) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[" + ASSET_NAME + "] Contacting update server failed: " + e.Error.Message);
|
||||
queryStatus = QueryStatus.Failed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
18
Assets/StylizedWater2/Editor/AssetInfo.cs.meta
Normal file
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5972a1c9cddd9941aec37a3343647aa
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/AssetInfo.cs
|
||||
uploadId: 679956
|
8
Assets/StylizedWater2/Editor/DynamicEffects.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d67e42c2794c3248a994f3b22be266b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,128 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
#if URP
|
||||
using UnityEngine.Rendering.Universal;
|
||||
#endif
|
||||
|
||||
namespace StylizedWater2.DynamicEffects
|
||||
{
|
||||
[CustomEditor(typeof(DynamicEffect))]
|
||||
[CanEditMultipleObjects]
|
||||
public class DynamicEffectInspector : Editor
|
||||
{
|
||||
private SerializedProperty renderer;
|
||||
|
||||
private SerializedProperty sortingLayer;
|
||||
|
||||
private SerializedProperty displacementScale;
|
||||
private SerializedProperty foamAmount;
|
||||
private SerializedProperty normalStrength;
|
||||
|
||||
#if URP
|
||||
private bool renderFeaturePresent;
|
||||
private bool renderFeatureEnabled;
|
||||
private WaterDynamicEffectsRenderFeature renderFeature;
|
||||
private Editor renderFeatureEditor;
|
||||
#endif
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
renderer = serializedObject.FindProperty("renderer");
|
||||
|
||||
sortingLayer = serializedObject.FindProperty("sortingLayer");
|
||||
|
||||
displacementScale = serializedObject.FindProperty("displacementScale");
|
||||
foamAmount = serializedObject.FindProperty("foamAmount");
|
||||
normalStrength = serializedObject.FindProperty("normalStrength");
|
||||
|
||||
#if URP
|
||||
renderFeaturePresent = PipelineUtilities.RenderFeatureAdded<WaterDynamicEffectsRenderFeature>();
|
||||
renderFeatureEnabled = PipelineUtilities.IsRenderFeatureEnabled<WaterDynamicEffectsRenderFeature>();
|
||||
renderFeature = PipelineUtilities.GetRenderFeature<WaterDynamicEffectsRenderFeature>() as WaterDynamicEffectsRenderFeature;
|
||||
#endif
|
||||
}
|
||||
|
||||
private void DrawNotifications()
|
||||
{
|
||||
#if URP
|
||||
UI.DrawNotification( !AssetInfo.MeetsMinimumVersion(WaterDynamicEffectsRenderFeature.MinBaseVersion), "Version mismatch, requires Stylized Water 2 v" + WaterDynamicEffectsRenderFeature.MinBaseVersion +".\n\nUpdate to avoid any issues or resolve (shader) errors", "Update", () => AssetInfo.OpenInPackageManager(), MessageType.Error);
|
||||
|
||||
UI.DrawNotification(UniversalRenderPipeline.asset == null, "The Universal Render Pipeline is not active", MessageType.Error);
|
||||
|
||||
using (new EditorGUI.DisabledGroupScope(Application.isPlaying))
|
||||
{
|
||||
UI.DrawNotification(!renderFeaturePresent, "The Dynamic Effects render feature hasn't be added to the default renderer", "Add", () =>
|
||||
{
|
||||
PipelineUtilities.AddRenderFeature<WaterDynamicEffectsRenderFeature>();
|
||||
renderFeaturePresent = true;
|
||||
renderFeature = PipelineUtilities.GetRenderFeature<WaterDynamicEffectsRenderFeature>() as WaterDynamicEffectsRenderFeature;
|
||||
}, MessageType.Error);
|
||||
}
|
||||
if(Application.isPlaying && !renderFeaturePresent) EditorGUILayout.HelpBox("Exit play mode to perform this action", MessageType.Warning);
|
||||
|
||||
UI.DrawNotification(renderFeaturePresent && !renderFeatureEnabled, "The Dynamic Effects render feature is disabled", "Enable", () =>
|
||||
{
|
||||
PipelineUtilities.ToggleRenderFeature<WaterDynamicEffectsRenderFeature>(true);
|
||||
renderFeatureEnabled = true;
|
||||
}, MessageType.Warning);
|
||||
#else
|
||||
UI.DrawNotification("The Universal Render Pipeline package is not installed!", MessageType.Error);
|
||||
#endif
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
EditorGUILayout.LabelField($"{AssetInfo.ASSET_NAME }: Dynamic Effects v{WaterDynamicEffectsRenderFeature.Version}", EditorStyles.centeredGreyMiniLabel);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
DrawNotifications();
|
||||
|
||||
serializedObject.Update();
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.PropertyField(renderer);
|
||||
|
||||
if (renderer.objectReferenceValue)
|
||||
{
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
{
|
||||
EditorGUILayout.PrefixLabel(new GUIContent(sortingLayer.displayName, sortingLayer.tooltip));
|
||||
|
||||
if (GUILayout.Button("-", EditorStyles.miniButtonLeft, GUILayout.Width(20)))
|
||||
{
|
||||
sortingLayer.intValue--;
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(sortingLayer, GUIContent.none, GUILayout.MaxWidth(32));
|
||||
|
||||
if (GUILayout.Button("+", EditorStyles.miniButtonRight, GUILayout.Width(20)))
|
||||
{
|
||||
sortingLayer.intValue++;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(displacementScale);
|
||||
EditorGUILayout.PropertyField(foamAmount);
|
||||
EditorGUILayout.PropertyField(normalStrength);
|
||||
}
|
||||
else
|
||||
{
|
||||
UI.DrawNotification("A renderer must be assigned", MessageType.Error);
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
DynamicEffect script = (DynamicEffect)target;
|
||||
script.UpdateProperties();
|
||||
}
|
||||
|
||||
UI.DrawFooter();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a5120fcd0004d968e3743c9037e7b9e
|
||||
timeCreated: 1687595852
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Editor/DynamicEffects/DynamicEffectInspector.cs
|
||||
uploadId: 679964
|
@ -0,0 +1,44 @@
|
||||
using StylizedWater2.DynamicEffects;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
#if URP
|
||||
partial class MaterialUI : ShaderGUI
|
||||
{
|
||||
private bool dynamicEffectsInitialized;
|
||||
|
||||
private bool deRenderFeaturePresent;
|
||||
private bool deRenderFeatureEnabled;
|
||||
|
||||
partial void DrawDynamicEffectsUI()
|
||||
{
|
||||
if (!dynamicEffectsInitialized)
|
||||
{
|
||||
deRenderFeaturePresent = PipelineUtilities.GetRenderFeature<WaterDynamicEffectsRenderFeature>();
|
||||
if(deRenderFeaturePresent) deRenderFeatureEnabled = PipelineUtilities.IsRenderFeatureEnabled<WaterDynamicEffectsRenderFeature>();
|
||||
|
||||
dynamicEffectsInitialized = true;
|
||||
}
|
||||
|
||||
using (new EditorGUI.DisabledGroupScope(Application.isPlaying))
|
||||
{
|
||||
UI.DrawNotification(!deRenderFeaturePresent, "The Dynamic Effects extension is installed, but the render feature hasn't been setup on the default renderer", "Add", () =>
|
||||
{
|
||||
PipelineUtilities.AddRenderFeature<WaterDynamicEffectsRenderFeature>(name:"Stylized Water 2: Dynamic Effects");
|
||||
deRenderFeaturePresent = true;
|
||||
deRenderFeatureEnabled = true;
|
||||
}, MessageType.Error);
|
||||
}
|
||||
if(Application.isPlaying && !deRenderFeaturePresent) EditorGUILayout.HelpBox("Exit play mode to perform this action", MessageType.Warning);
|
||||
|
||||
UI.DrawNotification(deRenderFeaturePresent && !deRenderFeatureEnabled, "The Dynamic Effects render feature is disabled", "Enable", () =>
|
||||
{
|
||||
PipelineUtilities.ToggleRenderFeature<WaterDynamicEffectsRenderFeature>(true);
|
||||
deRenderFeatureEnabled = true;
|
||||
}, MessageType.Warning);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 275e4867d5bf49a2897ecc3c45d916ff
|
||||
timeCreated: 1693473616
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Editor/DynamicEffects/MaterialUI.DynamicEffects.cs
|
||||
uploadId: 679964
|
@ -0,0 +1,283 @@
|
||||
#if URP
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.Rendering.Universal;
|
||||
|
||||
namespace StylizedWater2.DynamicEffects
|
||||
{
|
||||
[CustomEditor(typeof(WaterDynamicEffectsRenderFeature))]
|
||||
public class RenderFeatureEditor : Editor
|
||||
{
|
||||
private SerializedProperty settings;
|
||||
|
||||
private SerializedProperty renderRange;
|
||||
private SerializedProperty fadePercentage;
|
||||
|
||||
private SerializedProperty texelsPerUnit;
|
||||
private SerializedProperty maxResolution;
|
||||
private SerializedProperty highPrecision;
|
||||
|
||||
private SerializedProperty enableDisplacement;
|
||||
private SerializedProperty enableNormals;
|
||||
private SerializedProperty halfResolutionNormals;
|
||||
private SerializedProperty normalMipmaps;
|
||||
|
||||
private SerializedProperty ignoreSceneView;
|
||||
|
||||
private SerializedProperty displacementNormalShader;
|
||||
|
||||
[MenuItem("Window/Stylized Water 2/Set up Dynamic Effects", false, 3000)]
|
||||
private static void SetupRenderers()
|
||||
{
|
||||
if (PipelineUtilities.RenderFeatureMissing<WaterDynamicEffectsRenderFeature>(out ScriptableRendererData[] renderers))
|
||||
{
|
||||
string[] rendererNames = new string[renderers.Length];
|
||||
for (int i = 0; i < rendererNames.Length; i++)
|
||||
{
|
||||
rendererNames[i] = "• " + renderers[i].name;
|
||||
}
|
||||
|
||||
if (EditorUtility.DisplayDialog("Dynamic Effects", $"The Dynamic Effects render feature hasn't been added to the following renderers:\n\n" +
|
||||
String.Join(Environment.NewLine, rendererNames) +
|
||||
$"\n\nThis is required for rendering to take effect.", "Setup", "Ignore"))
|
||||
{
|
||||
PipelineUtilities.SetupRenderFeature<WaterDynamicEffectsRenderFeature>(name:"Stylized Water 2: Dynamic Effects");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorUtility.DisplayDialog(AssetInfo.ASSET_NAME, "The Dynamic Effects render feature has already been added to your default renderers", "Ok");
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem("Window/Analysis/Dynamic Effects debugger", false, 0)]
|
||||
private static void OpenDebugger()
|
||||
{
|
||||
DynamicEffectsBufferDebugger.Open();
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
settings = serializedObject.FindProperty("settings");
|
||||
|
||||
renderRange = settings.FindPropertyRelative("renderRange");
|
||||
fadePercentage = settings.FindPropertyRelative("fadePercentage");
|
||||
|
||||
texelsPerUnit = settings.FindPropertyRelative("texelsPerUnit");
|
||||
maxResolution = settings.FindPropertyRelative("maxResolution");
|
||||
highPrecision = settings.FindPropertyRelative("highPrecision");
|
||||
|
||||
enableDisplacement = settings.FindPropertyRelative("enableDisplacement");
|
||||
enableNormals = settings.FindPropertyRelative("enableNormals");
|
||||
halfResolutionNormals = settings.FindPropertyRelative("halfResolutionNormals");
|
||||
normalMipmaps = settings.FindPropertyRelative("normalMipmaps");
|
||||
|
||||
ignoreSceneView = settings.FindPropertyRelative("ignoreSceneView");
|
||||
|
||||
displacementNormalShader = serializedObject.FindProperty("displacementNormalShader");
|
||||
|
||||
if (target.name == "NewWaterDynamicEffectsRenderFeature") target.name = "Stylized Water 2: Dynamic Effects";
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.LabelField($"Version {WaterDynamicEffectsRenderFeature.Version}", EditorStyles.miniLabel);
|
||||
|
||||
if (GUILayout.Button(new GUIContent(" Documentation", EditorGUIUtility.FindTexture("_Help"))))
|
||||
{
|
||||
Application.OpenURL("https://staggart.xyz/unity/stylized-water-2/sw2-dynamic-effects-docs/");
|
||||
}
|
||||
if (GUILayout.Button(new GUIContent(" Debugger", EditorGUIUtility.IconContent("Profiler.Rendering").image, "Inspect the render buffer output")))
|
||||
{
|
||||
OpenDebugger();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.Space();
|
||||
|
||||
#if UNITY_6000_0_OR_NEWER && URP
|
||||
if (GraphicsSettings.GetRenderPipelineSettings<RenderGraphSettings>().enableRenderCompatibilityMode == false)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Using Render Graph in Unity 6+ is not supported." +
|
||||
"\n\nBackwards compatibility mode must be enabled.", MessageType.Error);
|
||||
|
||||
GUILayout.Space(-32);
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Button(new GUIContent("Enable", EditorGUIUtility.IconContent("d_tab_next").image), GUILayout.Width(60)))
|
||||
{
|
||||
GraphicsSettings.GetRenderPipelineSettings<RenderGraphSettings>().enableRenderCompatibilityMode = true;
|
||||
|
||||
EditorUtility.DisplayDialog($"Dynamic Effects v{WaterDynamicEffectsRenderFeature.Version}",
|
||||
"Please note that this option will be removed in a future Unity version, this version of the asset will no longer be functional then." +
|
||||
"\n\n" +
|
||||
"A license upgrade for Unity 6+ support may be available on the asset store, please check the documentation for current information.", "OK");
|
||||
}
|
||||
GUILayout.Space(8);
|
||||
}
|
||||
GUILayout.Space(11);
|
||||
}
|
||||
#endif
|
||||
|
||||
serializedObject.Update();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.PropertyField(renderRange);
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(fadePercentage, new GUIContent("Fade range (%)", fadePercentage.tooltip));
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(texelsPerUnit);
|
||||
EditorGUILayout.PropertyField(maxResolution);
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(EditorGUIUtility.labelWidth);
|
||||
|
||||
EditorGUILayout.HelpBox($"Current resolution: {WaterDynamicEffectsRenderFeature.CalculateResolution(renderRange.floatValue, texelsPerUnit.intValue, maxResolution.intValue)}px", MessageType.None);
|
||||
}
|
||||
EditorGUILayout.PropertyField(highPrecision);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(enableDisplacement);
|
||||
|
||||
EditorGUILayout.PropertyField(enableNormals);
|
||||
using (new EditorGUI.DisabledGroupScope(enableNormals.boolValue == false))
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(normalMipmaps);
|
||||
EditorGUILayout.PropertyField(halfResolutionNormals);
|
||||
EditorGUI.indentLevel--;
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(ignoreSceneView);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
//base.OnInspectorGUI();
|
||||
|
||||
if (displacementNormalShader.objectReferenceValue == null)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Internal shader not referenced!", MessageType.Error);
|
||||
if (GUILayout.Button("Find & assign"))
|
||||
{
|
||||
displacementNormalShader.objectReferenceValue = Shader.Find("Hidden/StylizedWater2/DisplacementToNormals");
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
}
|
||||
|
||||
UI.DrawFooter();
|
||||
}
|
||||
}
|
||||
|
||||
public class DynamicEffectsBufferDebugger : EditorWindow
|
||||
{
|
||||
private const int m_width = 550;
|
||||
private const int m_height = 300;
|
||||
|
||||
#if SWS_DEV
|
||||
[MenuItem("SWS/Debug/Dynamic Effects Buffers")]
|
||||
#endif
|
||||
public static void Open()
|
||||
{
|
||||
DynamicEffectsBufferDebugger window = GetWindow<DynamicEffectsBufferDebugger>(false);
|
||||
window.titleContent = new GUIContent("Dynamic Effects Debugger", Resources.Load<Texture>("dynamic-effect-icon-256px"));
|
||||
|
||||
window.autoRepaintOnSceneChange = true;
|
||||
window.minSize = new Vector2(m_width, m_height);
|
||||
//window.maxSize = new Vector2(m_width, m_height);
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private float width = 300f;
|
||||
private Vector2 scrollPos;
|
||||
|
||||
private ColorWriteMask colorMask = ColorWriteMask.All;
|
||||
private int colorChannel = 1;
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
Repaint();
|
||||
|
||||
width = (Mathf.Min(this.position.height, this.position.width) * 0.8f) - 10f;
|
||||
scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
|
||||
|
||||
RenderTexture interactionData = Shader.GetGlobalTexture("_WaterDynamicEffectsBuffer") as RenderTexture;
|
||||
RenderTexture interactionNormals = Shader.GetGlobalTexture("_WaterDynamicEffectsNormals") as RenderTexture;
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
using (new EditorGUILayout.VerticalScope())
|
||||
{
|
||||
DrawTexture("Data", interactionData);
|
||||
}
|
||||
|
||||
using (new EditorGUILayout.VerticalScope())
|
||||
{
|
||||
DrawTexture("Normals", interactionNormals);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
}
|
||||
|
||||
private void DrawTexture(string label, Texture texture)
|
||||
{
|
||||
if (!texture) return;
|
||||
|
||||
EditorGUILayout.LabelField($"{label} ({texture.width}px @ {(UnityEngine.Profiling.Profiler.GetRuntimeMemorySizeLong(texture) / 1024f / 1024f).ToString("F2")}mb)", EditorStyles.boldLabel);
|
||||
|
||||
Rect rect = EditorGUILayout.GetControlRect();
|
||||
|
||||
Rect position = EditorGUI.PrefixLabel(rect, GUIUtility.GetControlID(FocusType.Passive), GUIContent.none);
|
||||
position.width = width;
|
||||
|
||||
//colorChannel = EditorGUI.Popup(position, "Channel mask", colorChannel, new string[] { "RGB", "R", "G", "B", "A" });
|
||||
colorChannel = (int)GUI.Toolbar(position, colorChannel, new GUIContent[] { new GUIContent("RGBA"), new GUIContent("RGB"), new GUIContent("R"), new GUIContent("G"), new GUIContent("B"), new GUIContent("A") });
|
||||
|
||||
switch (colorChannel)
|
||||
{
|
||||
case 1: colorMask = ColorWriteMask.All;
|
||||
break;
|
||||
case 2: colorMask = ColorWriteMask.Red;
|
||||
break;
|
||||
case 3: colorMask = ColorWriteMask.Green;
|
||||
break;
|
||||
case 4: colorMask = ColorWriteMask.Blue;
|
||||
break;
|
||||
case 5: colorMask = ColorWriteMask.Alpha;
|
||||
break;
|
||||
}
|
||||
|
||||
rect.y += 17f;
|
||||
rect.height = width;
|
||||
rect.width = width;
|
||||
|
||||
if (colorChannel == 0) //RGBA
|
||||
{
|
||||
EditorGUI.DrawTextureTransparent(rect, texture, ScaleMode.ScaleToFit, 1f);
|
||||
}
|
||||
else if (colorMask == ColorWriteMask.Alpha)
|
||||
{
|
||||
EditorGUI.DrawTextureAlpha(rect, texture, ScaleMode.ScaleToFit, 1f, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUI.DrawPreviewTexture(rect, texture, null, ScaleMode.ScaleToFit, 1f, 0, colorMask);
|
||||
}
|
||||
GUILayout.Space(rect.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14f65f2f73cd492cb3613df6895e8b1c
|
||||
timeCreated: 1686941926
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Editor/DynamicEffects/RenderFeatureEditor.cs
|
||||
uploadId: 679964
|
803
Assets/StylizedWater2/Editor/HelpWindow.cs
Normal file
18
Assets/StylizedWater2/Editor/HelpWindow.cs.meta
Normal file
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9423877ce002b024984ae85461230da7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/HelpWindow.cs
|
||||
uploadId: 679956
|
8
Assets/StylizedWater2/Editor/Inspectors.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0cca1d35defda8b4b89b999963251e1a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
262
Assets/StylizedWater2/Editor/Inspectors/AlignToWavesInspector.cs
Normal file
@ -0,0 +1,262 @@
|
||||
//Stylized Water 2
|
||||
//Staggart Creations (http://staggart.xyz)
|
||||
//Copyright protected under Unity Asset Store EULA
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
#if UNITY_2021_2_OR_NEWER
|
||||
using PrefabStageUtility = UnityEditor.SceneManagement.PrefabStageUtility;
|
||||
#else
|
||||
using PrefabStageUtility = UnityEditor.Experimental.SceneManagement.PrefabStageUtility;
|
||||
#endif
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
[CanEditMultipleObjects]
|
||||
[CustomEditor(typeof(AlignToWaves))]
|
||||
public class AlignToWavesInspector : Editor
|
||||
{
|
||||
AlignToWaves script;
|
||||
|
||||
SerializedProperty waterObject;
|
||||
SerializedProperty autoFind;
|
||||
SerializedProperty dynamicMaterial;
|
||||
SerializedProperty waterLevelSource;
|
||||
SerializedProperty waterLevel;
|
||||
SerializedProperty childTransform;
|
||||
|
||||
SerializedProperty heightOffset;
|
||||
SerializedProperty rollAmount;
|
||||
|
||||
SerializedProperty samples;
|
||||
|
||||
private bool editSamples;
|
||||
private bool isRiver;
|
||||
private bool wavesEnabled;
|
||||
|
||||
private string proSkinPrefix => EditorGUIUtility.isProSkin ? "d_" : "";
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
script = (AlignToWaves)target;
|
||||
|
||||
waterObject = serializedObject.FindProperty("waterObject");
|
||||
autoFind = serializedObject.FindProperty("autoFind");
|
||||
dynamicMaterial = serializedObject.FindProperty("dynamicMaterial");
|
||||
waterLevelSource = serializedObject.FindProperty("waterLevelSource");
|
||||
waterLevel = serializedObject.FindProperty("waterLevel");
|
||||
childTransform = serializedObject.FindProperty("childTransform");
|
||||
heightOffset = serializedObject.FindProperty("heightOffset");
|
||||
rollAmount = serializedObject.FindProperty("rollAmount");
|
||||
samples = serializedObject.FindProperty("samples");
|
||||
|
||||
//Auto fetch if there is only one water body in the scene
|
||||
if (waterObject.objectReferenceValue == null && WaterObject.Instances.Count == 1)
|
||||
{
|
||||
serializedObject.Update();
|
||||
waterObject.objectReferenceValue = WaterObject.Instances[0];
|
||||
EditorUtility.SetDirty(target);
|
||||
serializedObject.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
|
||||
ValidateMaterial();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
AlignToWaves.Disable = false;
|
||||
Tools.hidden = false;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
UI.DrawHeader();
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(EditorGUIUtility.labelWidth);
|
||||
AlignToWaves.EnableInEditor =
|
||||
GUILayout.Toggle(AlignToWaves.EnableInEditor, new GUIContent(" Run in edit-mode (global)", EditorGUIUtility.IconContent(
|
||||
(AlignToWaves.EnableInEditor ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
serializedObject.Update();
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.PropertyField(waterObject);
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(autoFind);
|
||||
EditorGUILayout.PropertyField(dynamicMaterial);
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
UI.DrawNotification(isRiver, "Material has river mode enabled, buoyancy only works for flat water bodies", MessageType.Error);
|
||||
UI.DrawNotification(!wavesEnabled && !isRiver, "Material used on the water object does not have waves enabled.", MessageType.Error);
|
||||
|
||||
if (script.waterObject && script.waterObject.material)
|
||||
{
|
||||
UI.DrawNotification((script.waterObject.material.GetFloat("_WorldSpaceUV") == 0f), "Material must use world-projected UV", "Change", ()=> script.waterObject.material.SetFloat("_WorldSpaceUV", 1f), MessageType.Error);
|
||||
}
|
||||
|
||||
if(!autoFind.boolValue && waterObject.objectReferenceValue == null)
|
||||
{
|
||||
UI.DrawNotification("A water object must be assigned!", MessageType.Error);
|
||||
}
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.PrefixLabel("Water level source");
|
||||
waterLevelSource.intValue = GUILayout.Toolbar(waterLevelSource.intValue, new GUIContent[] { new GUIContent("Fixed Value"), new GUIContent("Water Object") });
|
||||
}
|
||||
if (waterLevelSource.intValue == (int)AlignToWaves.WaterLevelSource.FixedValue) EditorGUILayout.PropertyField(waterLevel);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(heightOffset);
|
||||
EditorGUILayout.PropertyField(rollAmount);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Sample positions", EditorStyles.boldLabel);
|
||||
|
||||
if (targets.Length > 1)
|
||||
{
|
||||
EditorGUILayout.HelpBox("Cannot be modified for a multi-selection", MessageType.Info);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (samples.arraySize > 0)
|
||||
{
|
||||
editSamples =
|
||||
GUILayout.Toggle(editSamples,
|
||||
new GUIContent(" Edit samples", EditorGUIUtility.IconContent("sv_icon_dot0_pix16_gizmo").image),
|
||||
"Button", GUILayout.MaxWidth(125f), GUILayout.MaxHeight(30f));
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.HelpBox("No sample positions added. The transform's pivot position is used", MessageType.None);
|
||||
}
|
||||
|
||||
for (int i = 0; i < samples.arraySize; i++)
|
||||
{
|
||||
SerializedProperty param = samples.GetArrayElementAtIndex(i);
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.PropertyField(param, true);
|
||||
|
||||
if (GUILayout.Button(new GUIContent("",
|
||||
EditorGUIUtility.IconContent(proSkinPrefix + "TreeEditor.Trash").image, "Delete item"), GUILayout.MaxWidth(30f)))
|
||||
{
|
||||
samples.DeleteArrayElementAtIndex(i);
|
||||
selectedSampleIndex = -1;
|
||||
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
if (GUILayout.Button(new GUIContent("Add", EditorGUIUtility.IconContent(proSkinPrefix + "Toolbar Plus").image, "Add new sample point")))
|
||||
{
|
||||
samples.InsertArrayElementAtIndex(samples.arraySize);
|
||||
selectedSampleIndex = samples.arraySize - 1;
|
||||
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(childTransform);
|
||||
if (childTransform.objectReferenceValue == null && samples.arraySize > 0)
|
||||
UI.DrawNotification("Assign a transform to rotate/scale the sample positions with");
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
ValidateMaterial();
|
||||
}
|
||||
|
||||
UI.DrawFooter();
|
||||
}
|
||||
|
||||
private void ValidateMaterial()
|
||||
{
|
||||
if (script.waterObject && script.waterObject.material)
|
||||
{
|
||||
if (script.waterObject.material != script.waterObject.meshRenderer.sharedMaterial) script.waterObject.material = script.waterObject.meshRenderer.sharedMaterial;
|
||||
|
||||
wavesEnabled = WaveParameters.WavesEnabled(script.waterObject.material);
|
||||
isRiver = script.waterObject.material.IsKeywordEnabled("_RIVER");
|
||||
}
|
||||
}
|
||||
|
||||
private int selectedSampleIndex;
|
||||
Vector3 sampleWorldPos;
|
||||
Vector3 prevSampleWorldPos;
|
||||
|
||||
private void OnSceneGUI()
|
||||
{
|
||||
if (!script) return;
|
||||
|
||||
AlignToWaves.Disable = PrefabStageUtility.GetCurrentPrefabStage() != null || editSamples;
|
||||
|
||||
if (editSamples)
|
||||
{
|
||||
//Mute default controls
|
||||
Tools.hidden = true;
|
||||
|
||||
Handles.color = new Color(0.66f, 0.66f, 0.66f, 1);
|
||||
|
||||
for (int i = 0; i < script.samples.Count; i++)
|
||||
{
|
||||
sampleWorldPos = script.ConvertToWorldSpace(script.samples[i]);
|
||||
|
||||
float size = HandleUtility.GetHandleSize(sampleWorldPos) * 0.25f;
|
||||
if (Handles.Button(sampleWorldPos, Quaternion.identity, size, size, Handles.SphereHandleCap))
|
||||
{
|
||||
selectedSampleIndex = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedSampleIndex > -1)
|
||||
{
|
||||
sampleWorldPos = script.ConvertToWorldSpace(script.samples[selectedSampleIndex]);
|
||||
prevSampleWorldPos = sampleWorldPos;
|
||||
|
||||
sampleWorldPos = Handles.PositionHandle(sampleWorldPos, script.childTransform ? script.childTransform.rotation : script.transform.rotation );
|
||||
script.samples[selectedSampleIndex] = script.ConvertToLocalSpace(sampleWorldPos);
|
||||
|
||||
//If moved
|
||||
if (sampleWorldPos != prevSampleWorldPos)
|
||||
{
|
||||
prevSampleWorldPos = sampleWorldPos;
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
selectedSampleIndex = -1;
|
||||
Tools.hidden = false;
|
||||
|
||||
if (script.samples == null) return;
|
||||
|
||||
Handles.color = new Color(1,1,1, 0.25f);
|
||||
for (int i = 0; i < script.samples.Count; i++)
|
||||
{
|
||||
sampleWorldPos = script.ConvertToWorldSpace(script.samples[i]);
|
||||
Handles.SphereHandleCap(0, sampleWorldPos, SceneView.lastActiveSceneView.camera.transform.rotation, HandleUtility.GetHandleSize(sampleWorldPos) * 0.25f, EventType.Repaint);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6551d287f84686b47a644eabc2efd2c8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {fileID: 148978298399363526, guid: 0000000000000000d000000000000000, type: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/Inspectors/AlignToWavesInspector.cs
|
||||
uploadId: 679956
|
@ -0,0 +1,350 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using UnityEngine.XR;
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
[CustomEditor(typeof(PlanarReflectionRenderer))]
|
||||
public class PlanarReflectionRendererInspector : Editor
|
||||
{
|
||||
private PlanarReflectionRenderer renderer;
|
||||
|
||||
//Rendering
|
||||
private SerializedProperty rotatable;
|
||||
private SerializedProperty cullingMask;
|
||||
private SerializedProperty rendererIndex;
|
||||
private SerializedProperty offset;
|
||||
private SerializedProperty includeSkybox;
|
||||
private SerializedProperty enableFog;
|
||||
|
||||
//Quality
|
||||
private SerializedProperty renderShadows;
|
||||
private SerializedProperty renderRange;
|
||||
private SerializedProperty renderScale;
|
||||
private SerializedProperty maximumLODLevel;
|
||||
|
||||
private SerializedProperty waterObjects;
|
||||
private SerializedProperty moveWithTransform;
|
||||
|
||||
private Bounds curBounds;
|
||||
private bool waterLayerError;
|
||||
|
||||
private bool previewReflection
|
||||
{
|
||||
get => EditorPrefs.GetBool("SWS2_PREVIEW_REFLECTION_ENABLED", true);
|
||||
set => EditorPrefs.SetBool("SWS2_PREVIEW_REFLECTION_ENABLED", value);
|
||||
}
|
||||
private RenderTexture previewTexture;
|
||||
|
||||
#if URP
|
||||
private void OnEnable()
|
||||
{
|
||||
PipelineUtilities.RefreshRendererList();
|
||||
|
||||
renderer = (PlanarReflectionRenderer)target;
|
||||
|
||||
rotatable = serializedObject.FindProperty("rotatable");
|
||||
cullingMask = serializedObject.FindProperty("cullingMask");
|
||||
rendererIndex = serializedObject.FindProperty("rendererIndex");
|
||||
offset = serializedObject.FindProperty("offset");
|
||||
includeSkybox = serializedObject.FindProperty("includeSkybox");
|
||||
enableFog = serializedObject.FindProperty("enableFog");
|
||||
renderShadows = serializedObject.FindProperty("renderShadows");
|
||||
renderRange = serializedObject.FindProperty("renderRange");
|
||||
renderScale = serializedObject.FindProperty("renderScale");
|
||||
maximumLODLevel = serializedObject.FindProperty("maximumLODLevel");
|
||||
waterObjects = serializedObject.FindProperty("waterObjects");
|
||||
moveWithTransform = serializedObject.FindProperty("moveWithTransform");
|
||||
|
||||
if (renderer.waterObjects.Count == 0 && WaterObject.Instances.Count == 1)
|
||||
{
|
||||
renderer.waterObjects.Add(WaterObject.Instances[0]);
|
||||
renderer.RecalculateBounds();
|
||||
renderer.EnableMaterialReflectionSampling();
|
||||
|
||||
EditorUtility.SetDirty(target);
|
||||
serializedObject.ApplyModifiedPropertiesWithoutUndo();
|
||||
}
|
||||
|
||||
ValidateWaterObjectLayer();
|
||||
|
||||
curBounds = renderer.CalculateBounds();
|
||||
|
||||
RenderPipelineManager.endCameraRendering += OnEndCameraRendering;
|
||||
}
|
||||
|
||||
private Camera currentCamera;
|
||||
private string currentCameraName;
|
||||
private bool waterObjectsVisible;
|
||||
|
||||
private void OnEndCameraRendering(ScriptableRenderContext context, Camera camera)
|
||||
{
|
||||
if (!previewReflection) return;
|
||||
|
||||
if (PlanarReflectionRenderer.InvalidContext(camera)) return;
|
||||
|
||||
currentCamera = camera;
|
||||
|
||||
waterObjectsVisible = renderer.WaterObjectsVisible(currentCamera);
|
||||
|
||||
previewTexture = renderer.TryGetReflectionTexture(currentCamera);
|
||||
currentCameraName = currentCamera.name;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
RenderPipelineManager.endCameraRendering -= OnEndCameraRendering;
|
||||
}
|
||||
#endif
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
#if !URP
|
||||
UI.DrawNotification("The Universal Render Pipeline package v" + AssetInfo.MIN_URP_VERSION + " or newer is not installed", MessageType.Error);
|
||||
#else
|
||||
UI.DrawHeader();
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(EditorGUIUtility.labelWidth);
|
||||
previewReflection =
|
||||
GUILayout.Toggle(previewReflection, new GUIContent(" Preview reflection", EditorGUIUtility.IconContent(
|
||||
(previewReflection ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
|
||||
}
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(EditorGUIUtility.labelWidth);
|
||||
EditorGUILayout.LabelField("Status: " + (waterObjectsVisible && currentCamera ? $"Rendering (camera: {currentCamera.name})" : "Not rendering (water not in view for any camera)"), EditorStyles.miniLabel);
|
||||
}
|
||||
|
||||
UI.DrawNotification(PipelineUtilities.VREnabled(), "Not supported with VR rendering", MessageType.Error);
|
||||
|
||||
UI.DrawNotification(PlanarReflectionRenderer.AllowReflections == false, "Reflections have been globally disabled by an external script", MessageType.Warning);
|
||||
|
||||
serializedObject.Update();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.LabelField("Rendering", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
UI.DrawRendererProperty(rendererIndex);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
renderer.SetRendererIndex(rendererIndex.intValue);
|
||||
}
|
||||
|
||||
//Default renderer
|
||||
if (rendererIndex.intValue == 0)
|
||||
{
|
||||
UI.DrawNotification("\n" +
|
||||
"Using the default renderer for reflections is strongly discouraged." +
|
||||
"\n\nMost (if not all) render features, such as third-party post processing effects, will also render for the reflection." +
|
||||
"\n\nThis can lead to rendering artefacts and negatively impacts overall performance." +
|
||||
"\n", MessageType.Warning);
|
||||
|
||||
//If there are no other renderers to assign, suggest to auto-create one
|
||||
UI.DrawNotification(PipelineUtilities.rendererIndexList.Length <= 2, "It is highly recommend to create a separate empty renderer", "Create and assign", CreateRenderer, MessageType.None);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(cullingMask);
|
||||
|
||||
EditorGUILayout.PropertyField(includeSkybox);
|
||||
EditorGUILayout.PropertyField(enableFog);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(rotatable);
|
||||
EditorGUILayout.PropertyField(offset);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Quality", EditorStyles.boldLabel);
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(renderShadows);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
renderer.ToggleShadows(renderShadows.boolValue);
|
||||
}
|
||||
EditorGUILayout.PropertyField(renderRange);
|
||||
EditorGUILayout.PropertyField(renderScale);
|
||||
EditorGUILayout.PropertyField(maximumLODLevel);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Target water objects", EditorStyles.boldLabel);
|
||||
EditorGUILayout.PropertyField(moveWithTransform, new GUIContent("Move bounds with transform", moveWithTransform.tooltip));
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
EditorGUILayout.PropertyField(waterObjects);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
curBounds = renderer.CalculateBounds();
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.FlexibleSpace();
|
||||
if(GUILayout.Button(new GUIContent("Auto-find", "Assigns all active water objects currently in the scene"), EditorStyles.miniButton))
|
||||
{
|
||||
renderer.waterObjects = new List<WaterObject>(WaterObject.Instances);
|
||||
|
||||
renderer.RecalculateBounds();
|
||||
curBounds = renderer.bounds;
|
||||
renderer.EnableMaterialReflectionSampling();
|
||||
|
||||
ValidateWaterObjectLayer();
|
||||
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
if(GUILayout.Button("Clear", EditorStyles.miniButton))
|
||||
{
|
||||
renderer.ToggleMaterialReflectionSampling(false);
|
||||
renderer.waterObjects.Clear();
|
||||
renderer.RecalculateBounds();
|
||||
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
|
||||
if (renderer.waterObjects != null)
|
||||
{
|
||||
UI.DrawNotification(renderer.waterObjects.Count == 0, "Assign at least one Water Object", MessageType.Info);
|
||||
|
||||
if (renderer.waterObjects.Count > 0)
|
||||
{
|
||||
UI.DrawNotification(curBounds.size != renderer.bounds.size || (moveWithTransform.boolValue == false && curBounds.center != renderer.bounds.center), "Water objects have changed or moved, bounds needs to be recalculated", "Recalculate",() => RecalculateBounds(), MessageType.Error);
|
||||
}
|
||||
|
||||
UI.DrawNotification(waterLayerError, "One or more Water Objects aren't on the \"Water\" layer.\n\nThis causes recursive reflections", "Fix", () => SetObjectsOnWaterLayer(), MessageType.Error);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
UI.DrawFooter();
|
||||
}
|
||||
|
||||
#if URP
|
||||
|
||||
private void CreateRenderer()
|
||||
{
|
||||
int index = -1;
|
||||
string path = "";
|
||||
|
||||
PipelineUtilities.CreateAndAssignNewRenderer(out index, out path);
|
||||
|
||||
if (index >= 0)
|
||||
{
|
||||
rendererIndex.intValue = index;
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
serializedObject.Update();
|
||||
|
||||
renderer.SetRendererIndex(rendererIndex.intValue);
|
||||
|
||||
if (path != string.Empty)
|
||||
{
|
||||
Debug.Log("New renderer created at path <i>" + path + "</i>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HasPreviewGUI()
|
||||
{
|
||||
return previewReflection && previewTexture;
|
||||
}
|
||||
|
||||
public override bool RequiresConstantRepaint()
|
||||
{
|
||||
return HasPreviewGUI();
|
||||
}
|
||||
|
||||
public override GUIContent GetPreviewTitle()
|
||||
{
|
||||
return currentCamera ? new GUIContent(currentCameraName + " reflection") : new GUIContent("Reflection");
|
||||
}
|
||||
|
||||
public override void OnPreviewSettings()
|
||||
{
|
||||
if (HasPreviewGUI() == false) return;
|
||||
|
||||
GUILayout.Label($"Resolution ({previewTexture.width}x{previewTexture.height})");
|
||||
}
|
||||
|
||||
private bool drawAlpha;
|
||||
|
||||
public override void OnPreviewGUI(Rect r, GUIStyle background)
|
||||
{
|
||||
if (drawAlpha)
|
||||
{
|
||||
EditorGUI.DrawTextureAlpha(r, previewTexture, ScaleMode.ScaleToFit);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.DrawTexture(r, previewTexture, ScaleMode.ScaleToFit, false);
|
||||
}
|
||||
|
||||
Rect btnRect = r;
|
||||
btnRect.x += 10f;
|
||||
btnRect.y += 10f;
|
||||
btnRect.width = 150f;
|
||||
btnRect.height = 20f;
|
||||
|
||||
drawAlpha = GUI.Toggle(btnRect, drawAlpha, new GUIContent(" Alpha channel"));
|
||||
}
|
||||
|
||||
private void ValidateWaterObjectLayer()
|
||||
{
|
||||
if (renderer.waterObjects == null) return;
|
||||
|
||||
waterLayerError = false;
|
||||
int layerID = LayerMask.NameToLayer("Water");
|
||||
|
||||
foreach (WaterObject obj in renderer.waterObjects)
|
||||
{
|
||||
//Is not on "Water" layer?
|
||||
if (obj.gameObject.layer != layerID)
|
||||
{
|
||||
waterLayerError = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetObjectsOnWaterLayer()
|
||||
{
|
||||
int layerID = LayerMask.NameToLayer("Water");
|
||||
|
||||
foreach (WaterObject obj in renderer.waterObjects)
|
||||
{
|
||||
//Is not on "Water" layer?
|
||||
if (obj.gameObject.layer != layerID)
|
||||
{
|
||||
obj.gameObject.layer = layerID;
|
||||
EditorUtility.SetDirty(obj);
|
||||
}
|
||||
}
|
||||
|
||||
waterLayerError = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
private void RecalculateBounds()
|
||||
{
|
||||
#if URP
|
||||
renderer.RecalculateBounds();
|
||||
curBounds = renderer.bounds;
|
||||
EditorUtility.SetDirty(target);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e169bca08efce694eab8006b53ed91c1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/Inspectors/PlanarReflectionRendererInspector.cs
|
||||
uploadId: 679956
|
@ -0,0 +1,70 @@
|
||||
#if URP
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
[CustomEditor(typeof(StylizedWaterRenderFeature))]
|
||||
public class RenderFeatureEditor : Editor
|
||||
{
|
||||
private SerializedProperty screenSpaceReflectionSettings;
|
||||
|
||||
private SerializedProperty directionalCaustics;
|
||||
|
||||
private SerializedProperty displacementPrePassSettings;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
screenSpaceReflectionSettings = serializedObject.FindProperty("screenSpaceReflectionSettings");
|
||||
|
||||
directionalCaustics = serializedObject.FindProperty("directionalCaustics");
|
||||
|
||||
displacementPrePassSettings = serializedObject.FindProperty("displacementPrePassSettings");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.LabelField($"Version {AssetInfo.INSTALLED_VERSION}", EditorStyles.miniLabel);
|
||||
|
||||
if (GUILayout.Button(new GUIContent(" Documentation", EditorGUIUtility.FindTexture("_Help"))))
|
||||
{
|
||||
Application.OpenURL(AssetInfo.DOC_URL);
|
||||
}
|
||||
}
|
||||
EditorGUILayout.Space();
|
||||
|
||||
UI.DrawRenderGraphError();
|
||||
|
||||
serializedObject.Update();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.PropertyField(directionalCaustics);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(screenSpaceReflectionSettings);
|
||||
if(screenSpaceReflectionSettings.isExpanded) EditorGUILayout.HelpBox("This feature is available for preview, no configurable settings are available yet", MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(displacementPrePassSettings);
|
||||
if (displacementPrePassSettings.isExpanded)
|
||||
{
|
||||
EditorGUILayout.HelpBox("This will pre-render all the water geometry's height (including any displacement effects) into a buffer. Allowing other shaders to access this information." +
|
||||
"\n\nSee the Displacement.hlsl shader library for the API, or use the \"Sample Water Height\" Sub-graph in Shader Graph." +
|
||||
"\n\nThis is for advanced users, there is currently no functionality in Stylized Water 2 that makes use of this.", MessageType.Info);
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
UI.DrawFooter();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1e12468f8ea4290a886e4706e800a98
|
||||
timeCreated: 1701084026
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/Inspectors/RenderFeatureEditor.cs
|
||||
uploadId: 679956
|
113
Assets/StylizedWater2/Editor/Inspectors/WaterGridInspector.cs
Normal file
@ -0,0 +1,113 @@
|
||||
//Stylized Water 2
|
||||
//Staggart Creations (http://staggart.xyz)
|
||||
//Copyright protected under Unity Asset Store EULA
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
[CustomEditor(typeof(WaterGrid))]
|
||||
public class CreateWaterGridInspector : Editor
|
||||
{
|
||||
private WaterGrid script;
|
||||
|
||||
private SerializedProperty material;
|
||||
private SerializedProperty followSceneCamera;
|
||||
private SerializedProperty autoAssignCamera;
|
||||
private SerializedProperty followTarget;
|
||||
|
||||
private SerializedProperty scale;
|
||||
private SerializedProperty vertexDistance;
|
||||
private SerializedProperty rowsColumns;
|
||||
|
||||
private int vertexCount;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
script = (WaterGrid) target;
|
||||
script.m_rowsColumns = script.rowsColumns;
|
||||
|
||||
material = serializedObject.FindProperty("material");
|
||||
followSceneCamera = serializedObject.FindProperty("followSceneCamera");
|
||||
autoAssignCamera = serializedObject.FindProperty("autoAssignCamera");
|
||||
followTarget = serializedObject.FindProperty("followTarget");
|
||||
|
||||
scale = serializedObject.FindProperty("scale");
|
||||
vertexDistance = serializedObject.FindProperty("vertexDistance");
|
||||
rowsColumns = serializedObject.FindProperty("rowsColumns");
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
UI.DrawHeader();
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(EditorGUIUtility.labelWidth);
|
||||
WaterGrid.DisplayGrid = GUILayout.Toggle(WaterGrid.DisplayGrid , new GUIContent(" Display Grid", EditorGUIUtility.IconContent((WaterGrid.DisplayGrid ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
|
||||
WaterGrid.DisplayWireframe = GUILayout.Toggle(WaterGrid.DisplayWireframe, new GUIContent(" Show Wireframe", EditorGUIUtility.IconContent((WaterGrid.DisplayWireframe ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
|
||||
}
|
||||
|
||||
serializedObject.Update();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.LabelField("Appearance", EditorStyles.boldLabel);
|
||||
EditorGUILayout.PropertyField(material);
|
||||
if(material.objectReferenceValue == null) EditorGUILayout.HelpBox("A material must be assigned", MessageType.Error);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Movement", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.PropertyField(followSceneCamera);
|
||||
using (new EditorGUI.DisabledScope(autoAssignCamera.boolValue))
|
||||
{
|
||||
EditorGUILayout.PropertyField(followTarget);
|
||||
}
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(autoAssignCamera);
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Grid geometry", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.PropertyField(scale, GUILayout.MaxWidth(EditorGUIUtility.labelWidth + 95f));
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.PrefixLabel(rowsColumns.displayName);
|
||||
using (new EditorGUI.DisabledScope(rowsColumns.intValue <= 0))
|
||||
{
|
||||
if (GUILayout.Button("-", EditorStyles.miniButtonLeft, GUILayout.Width(25f)))
|
||||
{
|
||||
rowsColumns.intValue--;
|
||||
}
|
||||
}
|
||||
EditorGUILayout.PropertyField(rowsColumns, GUIContent.none, GUILayout.MaxWidth(40f));
|
||||
if (GUILayout.Button("+", EditorStyles.miniButtonRight, GUILayout.Width(25f)))
|
||||
{
|
||||
rowsColumns.intValue++;
|
||||
}
|
||||
EditorGUILayout.LabelField($"= {rowsColumns.intValue * rowsColumns.intValue} tiles", EditorStyles.miniLabel);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(vertexDistance, new GUIContent("Min. vertex distance", vertexDistance.tooltip));
|
||||
vertexCount = Mathf.FloorToInt(((scale.floatValue / rowsColumns.intValue) / vertexDistance.floatValue) * ((scale.floatValue / rowsColumns.intValue) / vertexDistance.floatValue));
|
||||
//EditorGUILayout.HelpBox($"Vertex count: {vertexCount}", MessageType.None);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
//Executed here since objects can't be destroyed from OnValidate
|
||||
script.Recreate();
|
||||
}
|
||||
|
||||
UI.DrawFooter();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55b547e4881242f4af120838d3e9e6d6
|
||||
timeCreated: 1680100927
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/Inspectors/WaterGridInspector.cs
|
||||
uploadId: 679956
|
138
Assets/StylizedWater2/Editor/Inspectors/WaterObjectInspector.cs
Normal file
@ -0,0 +1,138 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
#if URP
|
||||
using UnityEngine.Rendering.Universal;
|
||||
#endif
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
[CustomEditor(typeof(WaterObject))]
|
||||
[CanEditMultipleObjects]
|
||||
public class WaterObjectInspector : Editor
|
||||
{
|
||||
private WaterObject component;
|
||||
|
||||
private SerializedProperty material;
|
||||
private SerializedProperty meshFilter;
|
||||
private SerializedProperty meshRenderer;
|
||||
|
||||
private bool depthTextureRequired;
|
||||
private bool opaqueTextureRequired;
|
||||
|
||||
private bool showInstances
|
||||
{
|
||||
get => SessionState.GetBool("WATEROBJECT_SHOW_INSTANCES", false);
|
||||
set => SessionState.SetBool("WATEROBJECT_SHOW_INSTANCES", value);
|
||||
}
|
||||
|
||||
private Texture icon;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
component = (WaterObject)target;
|
||||
|
||||
icon = Resources.Load<Texture>("water-object-icon");
|
||||
|
||||
material = serializedObject.FindProperty("material");
|
||||
meshFilter = serializedObject.FindProperty("meshFilter");
|
||||
meshRenderer = serializedObject.FindProperty("meshRenderer");
|
||||
|
||||
CheckMaterial();
|
||||
}
|
||||
|
||||
private void CheckMaterial()
|
||||
{
|
||||
#if URP
|
||||
if (UniversalRenderPipeline.asset == null || component.material == null) return;
|
||||
|
||||
depthTextureRequired = UniversalRenderPipeline.asset.supportsCameraDepthTexture == false && component.material.GetFloat("_DisableDepthTexture") == 0f;
|
||||
opaqueTextureRequired = UniversalRenderPipeline.asset.supportsCameraOpaqueTexture == false && component.material.GetFloat("_RefractionOn") == 1f;
|
||||
#endif
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
#if URP
|
||||
if (UniversalRenderPipeline.asset)
|
||||
{
|
||||
UI.DrawNotification(
|
||||
depthTextureRequired,
|
||||
"Depth texture is disabled, but is required for the water material",
|
||||
"Enable",
|
||||
() =>
|
||||
{
|
||||
StylizedWaterEditor.EnableDepthTexture();
|
||||
CheckMaterial();
|
||||
},
|
||||
MessageType.Error);
|
||||
|
||||
UI.DrawNotification(
|
||||
opaqueTextureRequired,
|
||||
"Opaque texture is disabled, but is required for the water material",
|
||||
"Enable",
|
||||
() =>
|
||||
{
|
||||
StylizedWaterEditor.EnableOpaqueTexture();
|
||||
CheckMaterial();
|
||||
},
|
||||
MessageType.Error);
|
||||
}
|
||||
#endif
|
||||
|
||||
EditorGUILayout.HelpBox("This component provides a means for other scripts to identify and find water bodies", MessageType.None);
|
||||
|
||||
EditorGUILayout.LabelField("References (Read only)", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUI.BeginDisabledGroup(true);
|
||||
{
|
||||
EditorGUILayout.PropertyField(material);
|
||||
EditorGUILayout.PropertyField(meshFilter);
|
||||
EditorGUILayout.PropertyField(meshRenderer);
|
||||
}
|
||||
EditorGUI.EndDisabledGroup();
|
||||
|
||||
//In case the material was changed on the attached Mesh Renderer, reflect the change
|
||||
foreach (Object currentTarget in targets)
|
||||
{
|
||||
WaterObject water = (WaterObject)currentTarget;
|
||||
water.FetchWaterMaterial();
|
||||
}
|
||||
|
||||
if (WaterObject.Instances.Count > 1)
|
||||
{
|
||||
EditorGUILayout.Space();
|
||||
|
||||
showInstances = EditorGUILayout.BeginFoldoutHeaderGroup(showInstances, $"Instances ({WaterObject.Instances.Count})");
|
||||
|
||||
if (showInstances)
|
||||
{
|
||||
this.Repaint();
|
||||
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.textArea))
|
||||
{
|
||||
foreach (WaterObject obj in WaterObject.Instances)
|
||||
{
|
||||
var rect = EditorGUILayout.BeginHorizontal(EditorStyles.miniLabel);
|
||||
|
||||
if (rect.Contains(Event.current.mousePosition))
|
||||
{
|
||||
EditorGUIUtility.AddCursorRect(new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y, 27, 27), MouseCursor.Link);
|
||||
EditorGUI.DrawRect(rect, Color.gray * (EditorGUIUtility.isProSkin ? 0.66f : 0.20f));
|
||||
}
|
||||
|
||||
if (GUILayout.Button(new GUIContent(" " + obj.name, icon), EditorStyles.miniLabel, GUILayout.Height(20f)))
|
||||
{
|
||||
EditorGUIUtility.PingObject(obj);
|
||||
Selection.activeGameObject = obj.gameObject;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24c4c7f693f04a3893891169c1f864d8
|
||||
timeCreated: 1685014300
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/Inspectors/WaterObjectInspector.cs
|
||||
uploadId: 679956
|
@ -0,0 +1,342 @@
|
||||
//Stylized Water 2
|
||||
//Staggart Creations (http://staggart.xyz)
|
||||
//Copyright protected under Unity Asset Store EULA
|
||||
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
|
||||
#if UNITY_2020_2_OR_NEWER
|
||||
using UnityEditor.AssetImporters;
|
||||
#else
|
||||
using UnityEditor.Experimental.AssetImporters;
|
||||
#endif
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
[CustomEditor(typeof(WaterShaderImporter))]
|
||||
[CanEditMultipleObjects]
|
||||
public class WaterShaderImporterEditor : ScriptedImporterEditor
|
||||
{
|
||||
private WaterShaderImporter importer;
|
||||
|
||||
private SerializedProperty template;
|
||||
|
||||
private SerializedProperty settings;
|
||||
|
||||
private SerializedProperty shaderName;
|
||||
private SerializedProperty hidden;
|
||||
private SerializedProperty type;
|
||||
|
||||
private SerializedProperty autoIntegration;
|
||||
private SerializedProperty fogIntegration;
|
||||
|
||||
private SerializedProperty lightCookies;
|
||||
|
||||
private SerializedProperty customIncludeDirectives;
|
||||
|
||||
private bool underwaterRenderingInstalled;
|
||||
private bool dynamicEffectsInstalled;
|
||||
private ShaderConfigurator.Fog.Integration firstIntegration;
|
||||
private bool curvedWorldInstalled;
|
||||
|
||||
private bool showDependencies;
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
underwaterRenderingInstalled = StylizedWaterEditor.UnderwaterRenderingInstalled();
|
||||
dynamicEffectsInstalled = StylizedWaterEditor.DynamicEffectsInstalled();
|
||||
firstIntegration = ShaderConfigurator.Fog.GetFirstInstalled();
|
||||
curvedWorldInstalled = StylizedWaterEditor.CurvedWorldInstalled(out var _);
|
||||
|
||||
importer = (WaterShaderImporter)target;
|
||||
|
||||
template = serializedObject.FindProperty("template");
|
||||
|
||||
settings = serializedObject.FindProperty("settings");
|
||||
//settings.isExpanded = true;
|
||||
|
||||
shaderName = settings.FindPropertyRelative("shaderName");
|
||||
hidden = settings.FindPropertyRelative("hidden");
|
||||
type = settings.FindPropertyRelative("type");
|
||||
|
||||
lightCookies = settings.FindPropertyRelative("lightCookies");
|
||||
|
||||
autoIntegration = settings.FindPropertyRelative("autoIntegration");
|
||||
fogIntegration = settings.FindPropertyRelative("fogIntegration");
|
||||
|
||||
customIncludeDirectives = settings.FindPropertyRelative("customIncludeDirectives");
|
||||
}
|
||||
|
||||
public override bool HasPreviewGUI()
|
||||
{
|
||||
//Hide the useless sphere preview :)
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
//base.OnInspectorGUI();
|
||||
Color defaultColor = GUI.contentColor;
|
||||
|
||||
UI.DrawHeader();
|
||||
|
||||
Shader shader = AssetDatabase.LoadAssetAtPath<Shader>(importer.assetPath);
|
||||
if (shader == null)
|
||||
{
|
||||
UI.DrawNotification("Shader failed to compile, try to manually recompile it now.", MessageType.Error);
|
||||
}
|
||||
|
||||
if (GUILayout.Button(new GUIContent(" Recompile", EditorGUIUtility.IconContent("RotateTool").image), GUILayout.MinHeight(30f)))
|
||||
{
|
||||
importer.SaveAndReimport();
|
||||
return;
|
||||
}
|
||||
|
||||
GUILayout.Space(-2f);
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
using (new EditorGUI.DisabledGroupScope(shader == null))
|
||||
{
|
||||
if (GUILayout.Button(new GUIContent(" Show Generated Code", EditorGUIUtility.IconContent("align_horizontally_left_active").image), EditorStyles.miniButtonLeft, GUILayout.Height(28f)))
|
||||
{
|
||||
GenericMenu menu = new GenericMenu();
|
||||
|
||||
menu.AddItem(new GUIContent("With tessellation"), false, () => OpenGeneratedCode(true));
|
||||
menu.AddItem(new GUIContent("Without tessellation"), false, () => OpenGeneratedCode(false));
|
||||
|
||||
menu.ShowAsContext();
|
||||
}
|
||||
if (GUILayout.Button(new GUIContent("Clear cache", "Unity's shader compiler will cache the compiled shader, and internally use that." +
|
||||
"\n\nThis may result in seemingly false-positive shader errors. Such as in the case of importing the shader, before the URP shader libraries are." +
|
||||
"\n\nClearing the cache gives the compiler a kick, and makes the shader properly represent the current state of the project/dependencies."), EditorStyles.miniButtonRight, GUILayout.Height(28f)))
|
||||
{
|
||||
importer.ClearCache();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
serializedObject.Update();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.PropertyField(template);
|
||||
|
||||
if (template.objectReferenceValue == null) EditorGUILayout.HelpBox("• Template is assumed to be in the contents of the file itself", MessageType.None);
|
||||
//EditorGUILayout.LabelField(importer.GetTemplatePath(), EditorStyles.miniLabel);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Settings", EditorStyles.boldLabel);
|
||||
EditorGUILayout.PropertyField(shaderName);
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.PropertyField(hidden);
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
EditorGUILayout.PropertyField(type);
|
||||
|
||||
if (type.intValue == (int)WaterShaderImporter.WaterShaderSettings.ShaderType.WaterSurface)
|
||||
{
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Integrations", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.PropertyField(autoIntegration, new GUIContent("Automatic detection", autoIntegration.tooltip));
|
||||
if (autoIntegration.boolValue)
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.LabelField("Fog post-processing", GUILayout.MaxWidth(EditorGUIUtility.labelWidth));
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope(EditorStyles.textField))
|
||||
{
|
||||
GUI.contentColor = Color.green;
|
||||
EditorGUILayout.LabelField(firstIntegration.name);
|
||||
|
||||
GUI.contentColor = defaultColor;
|
||||
}
|
||||
}
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUILayout.LabelField("Curved World 2020", GUILayout.MaxWidth(EditorGUIUtility.labelWidth));
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope(EditorStyles.textField))
|
||||
{
|
||||
if (curvedWorldInstalled)
|
||||
{
|
||||
GUI.contentColor = Color.green;
|
||||
EditorGUILayout.LabelField("Installed");
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.contentColor = new Color(1f, 0.65f, 0f);
|
||||
EditorGUILayout.LabelField("(Not installed)");
|
||||
}
|
||||
|
||||
GUI.contentColor = defaultColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorGUILayout.PropertyField(fogIntegration);
|
||||
}
|
||||
if (curvedWorldInstalled) EditorGUILayout.HelpBox("Curved World integration must be activated through Window->Amazing Assets->Curved Word (Activator tab)", MessageType.Info);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Functionality support", EditorStyles.boldLabel);
|
||||
|
||||
EditorGUILayout.PropertyField(lightCookies);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Extensions", EditorStyles.boldLabel);
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.LabelField("Underwater Rendering", GUILayout.MaxWidth(EditorGUIUtility.labelWidth));
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope(EditorStyles.textField))
|
||||
{
|
||||
if (underwaterRenderingInstalled)
|
||||
{
|
||||
GUI.contentColor = Color.green;
|
||||
EditorGUILayout.LabelField("Installed");
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.contentColor = new Color(1f, 0.65f, 0f);
|
||||
EditorGUILayout.LabelField("(Not installed)");
|
||||
}
|
||||
|
||||
GUI.contentColor = defaultColor;
|
||||
}
|
||||
}
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
EditorGUILayout.LabelField("Dynamic Effects", GUILayout.MaxWidth(EditorGUIUtility.labelWidth));
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope(EditorStyles.textField))
|
||||
{
|
||||
if (dynamicEffectsInstalled)
|
||||
{
|
||||
GUI.contentColor = Color.green;
|
||||
EditorGUILayout.LabelField("Installed");
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.contentColor = new Color(1f, 0.65f, 0f);
|
||||
EditorGUILayout.LabelField("(Not installed)");
|
||||
}
|
||||
|
||||
GUI.contentColor = defaultColor;
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(customIncludeDirectives);
|
||||
if (customIncludeDirectives.isExpanded)
|
||||
{
|
||||
EditorGUILayout.HelpBox("These are defined in a HLSLINCLUDE block and apply to all passes" +
|
||||
"\nMay be used to insert custom code.", MessageType.Info);
|
||||
}
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
//Force the parameter to a matching value.
|
||||
//This way, if the "auto-integration" option is used, the .meta file will be changed when using the shader in a package, spanning different projects.
|
||||
//When switching a different project, the file will be seen as changed and will be re-imported, in turn applying the project-specific integration.
|
||||
if (autoIntegration.boolValue)
|
||||
{
|
||||
fogIntegration.intValue = (int)firstIntegration.asset;
|
||||
}
|
||||
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
this.ApplyRevertGUI();
|
||||
|
||||
showDependencies = EditorGUILayout.BeginFoldoutHeaderGroup(showDependencies, $"Dependencies ({importer.dependencies.Count})");
|
||||
|
||||
if (showDependencies)
|
||||
{
|
||||
this.Repaint();
|
||||
|
||||
using (new EditorGUILayout.VerticalScope(EditorStyles.textArea))
|
||||
{
|
||||
foreach (string dependency in importer.dependencies)
|
||||
{
|
||||
var rect = EditorGUILayout.BeginHorizontal(EditorStyles.miniLabel);
|
||||
|
||||
if (rect.Contains(Event.current.mousePosition))
|
||||
{
|
||||
EditorGUIUtility.AddCursorRect(new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y, 27, 27), MouseCursor.Link);
|
||||
EditorGUI.DrawRect(rect, Color.gray * (EditorGUIUtility.isProSkin ? 0.66f : 0.20f));
|
||||
}
|
||||
|
||||
if (GUILayout.Button(dependency == string.Empty ? new GUIContent(" (Missing)", EditorGUIUtility.IconContent("console.warnicon.sml").image) : new GUIContent(" " + dependency, EditorGUIUtility.IconContent("TextAsset Icon").image),
|
||||
EditorStyles.miniLabel, GUILayout.Height(20f)))
|
||||
{
|
||||
if (dependency != string.Empty)
|
||||
{
|
||||
TextAsset file = AssetDatabase.LoadAssetAtPath<TextAsset>(dependency);
|
||||
|
||||
EditorGUIUtility.PingObject(file);
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.HelpBox("Should any of these files be modified/moved/deleted, this shader will also re-import", MessageType.Info);
|
||||
}
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
|
||||
UI.DrawFooter();
|
||||
|
||||
if (shader)
|
||||
{
|
||||
UI.DrawNotification(ShaderUtil.ShaderHasError(shader), "Errors may be false-positives due to caching", "Clear cache", () => importer.ClearCache(true), MessageType.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGeneratedCode(bool tessellation)
|
||||
{
|
||||
importer = (WaterShaderImporter)target;
|
||||
|
||||
string filePath = $"{Application.dataPath.Replace("Assets", string.Empty)}Temp/{importer.settings.shaderName}(Generated Code).shader";
|
||||
|
||||
string code = ShaderConfigurator.TemplateParser.CreateShaderCode(importer.GetTemplatePath(), importer, tessellation);
|
||||
File.WriteAllText(filePath, code);
|
||||
|
||||
if (!File.Exists(filePath))
|
||||
{
|
||||
Debug.LogError(string.Format("Path {0} doesn't exists", filePath));
|
||||
return;
|
||||
}
|
||||
|
||||
string externalScriptEditor = ScriptEditorUtility.GetExternalScriptEditor();
|
||||
if (externalScriptEditor != "internal")
|
||||
{
|
||||
InternalEditorUtility.OpenFileAtLineExternal(filePath, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.OpenURL("file://" + filePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81c37dbe6c244dcca9bde0e9c0f64171
|
||||
timeCreated: 1691138447
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/Inspectors/WaterShaderImporterEditor.cs
|
||||
uploadId: 679956
|
1744
Assets/StylizedWater2/Editor/MaterialUI.cs
Normal file
18
Assets/StylizedWater2/Editor/MaterialUI.cs.meta
Normal file
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab427f26bc4a58a4d982a32fcf593b66
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/MaterialUI.cs
|
||||
uploadId: 679956
|
8
Assets/StylizedWater2/Editor/Resources.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ecd413b7759fff4189c174b3151ea3b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb8516ebec013a7429bcfb2a85deb612
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 9.7 KiB |
@ -0,0 +1,139 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9853b2780ac1bc49a300a188b57db58
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: -1
|
||||
aniso: -1
|
||||
mipBias: -100
|
||||
wrapU: -1
|
||||
wrapV: -1
|
||||
wrapW: -1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Editor/Resources/DynamicEffects/dynamic-effect-icon-256px.png
|
||||
uploadId: 679964
|
BIN
Assets/StylizedWater2/Editor/Resources/water-object-icon.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
@ -0,0 +1,154 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83548767ebe1791409159648329da97d
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/Resources/water-object-icon.png
|
||||
uploadId: 679956
|
BIN
Assets/StylizedWater2/Editor/Resources/water-shader-icon.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
@ -0,0 +1,154 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b93d3698aa42dd4382e180b61a3f224
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/Resources/water-shader-icon.png
|
||||
uploadId: 679956
|
892
Assets/StylizedWater2/Editor/ShaderConfigurator.cs
Normal file
18
Assets/StylizedWater2/Editor/ShaderConfigurator.cs.meta
Normal file
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 026e0b49a81c6b047b5b159b73908933
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/ShaderConfigurator.cs
|
||||
uploadId: 679956
|
261
Assets/StylizedWater2/Editor/StylizedWaterEditor.cs
Normal file
@ -0,0 +1,261 @@
|
||||
//Stylized Water 2
|
||||
//Staggart Creations (http://staggart.xyz)
|
||||
//Copyright protected under Unity Asset Store EULA
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
#if URP
|
||||
using UnityEngine.Rendering.Universal;
|
||||
#if UNITY_2021_2_OR_NEWER
|
||||
using ForwardRendererData = UnityEngine.Rendering.Universal.UniversalRendererData;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
public class StylizedWaterEditor : Editor
|
||||
{
|
||||
#if URP
|
||||
[MenuItem("GameObject/3D Object/Water/Object", false, 0)]
|
||||
public static void CreateWaterObject()
|
||||
{
|
||||
Material mat = AssetDatabase.LoadAssetAtPath<Material>(AssetDatabase.GUIDToAssetPath("fbb04271505a76f40b984e38071e86f3"));
|
||||
Mesh mesh = AssetDatabase.LoadAssetAtPath<Mesh>(AssetDatabase.GUIDToAssetPath("1e01d80fdc2155d4692276500db33fc9"));
|
||||
|
||||
WaterObject obj = WaterObject.New(mat, mesh);
|
||||
|
||||
//Position in view
|
||||
if (SceneView.lastActiveSceneView)
|
||||
{
|
||||
obj.transform.position = SceneView.lastActiveSceneView.camera.transform.position + (SceneView.lastActiveSceneView.camera.transform.forward * (Mathf.Max(mesh.bounds.size.x, mesh.bounds.size.z)) * 0.5f);
|
||||
}
|
||||
|
||||
if (Selection.activeGameObject) obj.transform.parent = Selection.activeGameObject.transform;
|
||||
|
||||
Selection.activeObject = obj;
|
||||
|
||||
if(Application.isPlaying == false) EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/3D Object/Water/Grid", false, 1)]
|
||||
[MenuItem("Window/Stylized Water 2/Create water grid", false, 2001)]
|
||||
public static void CreateWaterGrid()
|
||||
{
|
||||
GameObject obj = new GameObject("Water Grid", typeof(WaterGrid));
|
||||
Undo.RegisterCreatedObjectUndo(obj, "Created Water Grid");
|
||||
|
||||
obj.layer = LayerMask.NameToLayer("Water");
|
||||
|
||||
WaterGrid grid = obj.GetComponent<WaterGrid>();
|
||||
grid.Recreate();
|
||||
|
||||
if (Selection.activeGameObject) obj.transform.parent = Selection.activeGameObject.transform;
|
||||
|
||||
Selection.activeObject = obj;
|
||||
|
||||
//Position in view
|
||||
if (SceneView.lastActiveSceneView)
|
||||
{
|
||||
Vector3 position = SceneView.lastActiveSceneView.camera.transform.position + (SceneView.lastActiveSceneView.camera.transform.forward * grid.scale * 0.5f);
|
||||
position.y = 0f;
|
||||
|
||||
grid.transform.position = position;
|
||||
}
|
||||
|
||||
if(Application.isPlaying == false) EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
}
|
||||
|
||||
[MenuItem("Window/Stylized Water 2/Set up render feature", false, 2000)]
|
||||
public static void SetupRenderFeature()
|
||||
{
|
||||
PipelineUtilities.SetupRenderFeature<StylizedWaterRenderFeature>("Stylized Water 2");
|
||||
}
|
||||
|
||||
[MenuItem("GameObject/3D Object/Water/Planar Reflections Renderer", false, 2)]
|
||||
[MenuItem("Window/Stylized Water 2/Set up planar reflections", false, 2001)]
|
||||
public static void CreatePlanarReflectionRenderer()
|
||||
{
|
||||
GameObject obj = new GameObject("Planar Reflections Renderer", typeof(PlanarReflectionRenderer));
|
||||
Undo.RegisterCreatedObjectUndo(obj, "Created PlanarReflectionRenderer");
|
||||
PlanarReflectionRenderer r = obj.GetComponent<PlanarReflectionRenderer>();
|
||||
r.ApplyToAllWaterInstances();
|
||||
|
||||
Selection.activeObject = obj;
|
||||
|
||||
if(Application.isPlaying == false) EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
|
||||
}
|
||||
#endif
|
||||
|
||||
[MenuItem("Assets/Create/Water/Mesh")]
|
||||
private static void CreateWaterPlaneAsset()
|
||||
{
|
||||
ProjectWindowUtil.CreateAssetWithContent("New Watermesh.watermesh", "");
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/Transform/Align To Waves")]
|
||||
private static void AddAlignToWaves(MenuCommand cmd)
|
||||
{
|
||||
Transform t = (Transform)cmd.context;
|
||||
|
||||
if (!t.gameObject.GetComponent<AlignToWaves>())
|
||||
{
|
||||
AlignToWaves component = t.gameObject.AddComponent<AlignToWaves>();
|
||||
EditorUtility.SetDirty(t);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool UnderwaterRenderingInstalled()
|
||||
{
|
||||
//Checking for UnderwaterRenderer.cs meta file
|
||||
string path = AssetDatabase.GUIDToAssetPath("6a52edc7a3652d84784e10be859d5807");
|
||||
return AssetDatabase.LoadMainAssetAtPath(path);
|
||||
}
|
||||
|
||||
public static bool DynamicEffectsInstalled()
|
||||
{
|
||||
//Checking for the WaterDynamicEffectsRenderFeature.cs meta file
|
||||
string path = AssetDatabase.GUIDToAssetPath("48bd76fbc46e46fe9bc606bd3c30bd9b");
|
||||
return AssetDatabase.LoadMainAssetAtPath(path);
|
||||
}
|
||||
|
||||
public static void OpenGraphicsSettings()
|
||||
{
|
||||
SettingsService.OpenProjectSettings("Project/Graphics");
|
||||
}
|
||||
|
||||
public static void SelectForwardRenderer()
|
||||
{
|
||||
#if URP
|
||||
if (!UniversalRenderPipeline.asset) return;
|
||||
|
||||
System.Reflection.BindingFlags bindings = System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance;
|
||||
ScriptableRendererData[] m_rendererDataList = (ScriptableRendererData[])typeof(UniversalRenderPipelineAsset).GetField("m_RendererDataList", bindings).GetValue(UniversalRenderPipeline.asset);
|
||||
|
||||
ForwardRendererData main = m_rendererDataList[0] as ForwardRendererData;
|
||||
Selection.activeObject = main;
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void EnableDepthTexture()
|
||||
{
|
||||
#if URP
|
||||
if (!UniversalRenderPipeline.asset) return;
|
||||
|
||||
UniversalRenderPipeline.asset.supportsCameraDepthTexture = true;
|
||||
EditorUtility.SetDirty(UniversalRenderPipeline.asset);
|
||||
|
||||
if (PipelineUtilities.IsDepthTextureOptionDisabledAnywhere())
|
||||
{
|
||||
if (EditorUtility.DisplayDialog(AssetInfo.ASSET_NAME, "The Depth Texture option is still disabled on other pipeline assets (likely for other quality levels).\n\nWould you like to enable it on those as well?", "OK", "Cancel"))
|
||||
{
|
||||
PipelineUtilities.SetDepthTextureOnAllAssets(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void EnableOpaqueTexture()
|
||||
{
|
||||
#if URP
|
||||
if (!UniversalRenderPipeline.asset) return;
|
||||
|
||||
UniversalRenderPipeline.asset.supportsCameraOpaqueTexture = true;
|
||||
EditorUtility.SetDirty(UniversalRenderPipeline.asset);
|
||||
|
||||
if (PipelineUtilities.IsOpaqueTextureOptionDisabledAnywhere())
|
||||
{
|
||||
if (EditorUtility.DisplayDialog(AssetInfo.ASSET_NAME, "The Opaque Texture option is still disabled on other pipeline assets (likely for other quality levels).\n\nWould you like to enable it on those as well?", "OK", "Cancel"))
|
||||
{
|
||||
PipelineUtilities.SetOpaqueTextureOnAllAssets(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Configures the assigned water material to render as double-sided, which is required for underwater rendering
|
||||
/// </summary>
|
||||
public static void DisableCullingForMaterial(Material material)
|
||||
{
|
||||
if (!material) return;
|
||||
|
||||
material.SetInt("_Cull", (int)UnityEngine.Rendering.CullMode.Off);
|
||||
|
||||
EditorUtility.SetDirty(material);
|
||||
}
|
||||
|
||||
public static bool CurvedWorldInstalled(out string libraryPath)
|
||||
{
|
||||
//Checking for "CurvedWorldTransform.cginc"
|
||||
libraryPath = AssetDatabase.GUIDToAssetPath("208a98c9ab72b9f4bb8735c6a229e807");
|
||||
return libraryPath != string.Empty;
|
||||
}
|
||||
|
||||
#if NWH_DWP2
|
||||
public static bool DWP2Installed => true;
|
||||
#else
|
||||
public static bool DWP2Installed => false;
|
||||
#endif
|
||||
|
||||
public static T Find<T>() where T : Object
|
||||
{
|
||||
#if UNITY_2023_1_OR_NEWER
|
||||
return (T)Object.FindFirstObjectByType(typeof(T));
|
||||
#elif UNITY_2020_1_OR_NEWER
|
||||
return (T)Object.FindObjectOfType(typeof(T), false);
|
||||
#else
|
||||
return (T)Object.FindObjectOfType(typeof(T));
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void SetupForDWP2()
|
||||
{
|
||||
#if NWH_DWP2
|
||||
if (!EditorUtility.DisplayDialog("Dynamic Water Physics 2 -> Stylized Water 2",
|
||||
"This operation will look for a \"Flat Water Data Provider\" component and replace it with the \"Stylized Water Data Provider\" component",
|
||||
"OK", "Cancel"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
NWH.DWP2.WaterData.StylizedWaterDataProvider dataProvider = Find<NWH.DWP2.WaterData.StylizedWaterDataProvider>();
|
||||
NWH.DWP2.WaterData.FlatWaterDataProvider oldProvider = Find<NWH.DWP2.WaterData.FlatWaterDataProvider>();
|
||||
|
||||
if (dataProvider)
|
||||
{
|
||||
EditorUtility.DisplayDialog("Dynamic Water Physics 2 -> Stylized Water 2", "A \"Stylized Water Data Provider\" component was already found in the scene", "OK");
|
||||
|
||||
EditorGUIUtility.PingObject(dataProvider.gameObject);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(oldProvider == null)
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("Dynamic Water Physics 2 -> Stylized Water 2",
|
||||
"Could not find a \"Flat Water Data Provider\" component in the scene.\n\nIt's recommended to first set up DWP2 according to their manual.",
|
||||
"OK"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
NWH.DWP2.DefaultWater.Water waterScript = Find<NWH.DWP2.DefaultWater.Water>();
|
||||
if(waterScript) DestroyImmediate(waterScript);
|
||||
|
||||
if (oldProvider)
|
||||
{
|
||||
dataProvider = oldProvider.gameObject.AddComponent<NWH.DWP2.WaterData.StylizedWaterDataProvider>();
|
||||
oldProvider.gameObject.AddComponent<StylizedWater2.WaterObject>();
|
||||
|
||||
Selection.activeGameObject = oldProvider.gameObject;
|
||||
|
||||
DestroyImmediate(oldProvider);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
18
Assets/StylizedWater2/Editor/StylizedWaterEditor.cs.meta
Normal file
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23fe47c78f2c84d4db3765a2a5466f68
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/StylizedWaterEditor.cs
|
||||
uploadId: 679956
|
1059
Assets/StylizedWater2/Editor/UI.cs
Normal file
18
Assets/StylizedWater2/Editor/UI.cs.meta
Normal file
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3ec5d4ce2810a8428fc54db383a4386
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/UI.cs
|
||||
uploadId: 679956
|
216
Assets/StylizedWater2/Editor/WaterMeshImporter.cs
Normal file
@ -0,0 +1,216 @@
|
||||
//Stylized Water 2
|
||||
//Staggart Creations (http://staggart.xyz)
|
||||
//Copyright protected under Unity Asset Store EULA
|
||||
|
||||
#if UNITY_2020_2_OR_NEWER
|
||||
using UnityEditor.AssetImporters;
|
||||
#else
|
||||
using UnityEditor.Experimental.AssetImporters;
|
||||
#endif
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
[ScriptedImporter(3, FILE_EXTENSION)]
|
||||
public class WaterMeshImporter : ScriptedImporter
|
||||
{
|
||||
private const string FILE_EXTENSION = "watermesh";
|
||||
|
||||
[SerializeField] public WaterMesh waterMesh = new WaterMesh();
|
||||
|
||||
public override void OnImportAsset(AssetImportContext context)
|
||||
{
|
||||
waterMesh.Rebuild();
|
||||
|
||||
context.AddObjectToAsset("mesh", waterMesh.mesh);
|
||||
context.SetMainObject(waterMesh.mesh);
|
||||
}
|
||||
|
||||
//Handles correct behaviour when double-clicking a .watermesh asset assigned to a field
|
||||
//Otherwise the OS prompts to open it
|
||||
[UnityEditor.Callbacks.OnOpenAsset]
|
||||
public static bool OnOpenAsset(int instanceID, int line)
|
||||
{
|
||||
Object target = EditorUtility.InstanceIDToObject(instanceID);
|
||||
|
||||
if (target is Mesh)
|
||||
{
|
||||
var path = AssetDatabase.GetAssetPath(instanceID);
|
||||
|
||||
if (Path.GetExtension(path) != "." + FILE_EXTENSION) return false;
|
||||
|
||||
Selection.activeObject = target;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[CustomEditor(typeof(WaterMeshImporter))]
|
||||
public class WaterMeshImporterEditor: ScriptedImporterEditor
|
||||
{
|
||||
private SerializedProperty waterMesh;
|
||||
|
||||
private SerializedProperty shape;
|
||||
|
||||
private SerializedProperty scale;
|
||||
private SerializedProperty UVTiling;
|
||||
|
||||
private SerializedProperty vertexDistance;
|
||||
|
||||
private SerializedProperty noise;
|
||||
private SerializedProperty boundsPadding;
|
||||
|
||||
private WaterMeshImporter importer;
|
||||
|
||||
private bool autoApplyChanges;
|
||||
private bool previewInSceneView
|
||||
{
|
||||
get => EditorPrefs.GetBool("SWS2_PREVIEW_WATER_MESH_ENABLED", true);
|
||||
set => EditorPrefs.SetBool("SWS2_PREVIEW_WATER_MESH_ENABLED", value);
|
||||
}
|
||||
|
||||
public override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
importer = (WaterMeshImporter)target;
|
||||
|
||||
waterMesh = serializedObject.FindProperty("waterMesh");
|
||||
|
||||
shape = waterMesh.FindPropertyRelative("shape");
|
||||
scale = waterMesh.FindPropertyRelative("scale");
|
||||
UVTiling = waterMesh.FindPropertyRelative("UVTiling");
|
||||
vertexDistance = waterMesh.FindPropertyRelative("vertexDistance");
|
||||
noise = waterMesh.FindPropertyRelative("noise");
|
||||
boundsPadding = waterMesh.FindPropertyRelative("boundsPadding");
|
||||
|
||||
SceneView.duringSceneGui += OnSceneGUI;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
UI.DrawHeader();
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(EditorGUIUtility.labelWidth);
|
||||
previewInSceneView =
|
||||
GUILayout.Toggle(previewInSceneView, new GUIContent(" Preview in scene view", EditorGUIUtility.IconContent(
|
||||
(previewInSceneView ? "animationvisibilitytoggleon" : "animationvisibilitytoggleoff")).image), "Button");
|
||||
}
|
||||
if (previewInSceneView && WaterObject.Instances.Count > 0)
|
||||
{
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(EditorGUIUtility.labelWidth);
|
||||
EditorGUILayout.HelpBox($"Drawing on WaterObject instances in the scene ({WaterObject.Instances.Count})", MessageType.None);
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
serializedObject.Update();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
EditorGUILayout.PropertyField(shape);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(scale);
|
||||
EditorGUILayout.PropertyField(vertexDistance);
|
||||
|
||||
int subdivisions = Mathf.FloorToInt(scale.floatValue / vertexDistance.floatValue);
|
||||
int vertexCount = Mathf.FloorToInt(subdivisions * subdivisions);
|
||||
|
||||
using (new EditorGUILayout.HorizontalScope())
|
||||
{
|
||||
GUILayout.Space(EditorGUIUtility.labelWidth);
|
||||
|
||||
EditorGUILayout.HelpBox($"Vertex count: {vertexCount:N1}", MessageType.None);
|
||||
}
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.PropertyField(UVTiling);
|
||||
EditorGUILayout.PropertyField(noise);
|
||||
EditorGUILayout.PropertyField(boundsPadding);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
autoApplyChanges = EditorGUILayout.Toggle("Auto-apply changes", autoApplyChanges);
|
||||
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
|
||||
if (autoApplyChanges && HasModified())
|
||||
{
|
||||
#if UNITY_2022_2_OR_NEWER
|
||||
this.SaveChanges();
|
||||
#else
|
||||
this.ApplyAndImport();
|
||||
#endif
|
||||
|
||||
importer = (WaterMeshImporter)target;
|
||||
}
|
||||
}
|
||||
|
||||
this.ApplyRevertGUI();
|
||||
|
||||
UI.DrawFooter();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
SceneView.duringSceneGui -= OnSceneGUI;
|
||||
}
|
||||
|
||||
private Material mat;
|
||||
private void OnSceneGUI(SceneView obj)
|
||||
{
|
||||
if (!previewInSceneView)
|
||||
{
|
||||
GL.wireframe = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mat)
|
||||
{
|
||||
mat = new Material(Shader.Find("Unlit/Color"));
|
||||
mat.color = new Color(0,0,0, 0.25f);
|
||||
mat.mainTexture = Texture2D.whiteTexture;
|
||||
}
|
||||
mat.SetPass(0);
|
||||
|
||||
if (importer.waterMesh.mesh)
|
||||
{
|
||||
GL.wireframe = true;
|
||||
if (WaterObject.Instances.Count > 0)
|
||||
{
|
||||
foreach (WaterObject waterObject in WaterObject.Instances)
|
||||
{
|
||||
Graphics.DrawMeshNow(importer.waterMesh.mesh, waterObject.transform.localToWorldMatrix);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SceneView.lastActiveSceneView)
|
||||
{
|
||||
//Position in view
|
||||
Vector3 position = SceneView.lastActiveSceneView.camera.transform.position + (SceneView.lastActiveSceneView.camera.transform.forward * importer.waterMesh.scale * 0.5f);
|
||||
|
||||
Graphics.DrawMeshNow(importer.waterMesh.mesh, position, Quaternion.identity);
|
||||
}
|
||||
}
|
||||
GL.wireframe = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
18
Assets/StylizedWater2/Editor/WaterMeshImporter.cs.meta
Normal file
@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b8903faabaa4d64bbf306b8787d2d67
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/WaterMeshImporter.cs
|
||||
uploadId: 679956
|
327
Assets/StylizedWater2/Editor/WaterShaderImporter.cs
Normal file
@ -0,0 +1,327 @@
|
||||
//Stylized Water 2
|
||||
//Staggart Creations (http://staggart.xyz)
|
||||
//Copyright protected under Unity Asset Store EULA
|
||||
|
||||
#if UNITY_2020_2_OR_NEWER
|
||||
using UnityEditor.AssetImporters;
|
||||
#else
|
||||
using UnityEditor.Experimental.AssetImporters;
|
||||
#endif
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEditorInternal;
|
||||
using UnityEngine;
|
||||
using Debug = UnityEngine.Debug;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace StylizedWater2
|
||||
{
|
||||
[ScriptedImporterAttribute(AssetInfo.SHADER_GENERATOR_VERSION_MAJOR + AssetInfo.SHADER_GENERATOR_MINOR + AssetInfo.SHADER_GENERATOR_PATCH, TARGET_FILE_EXTENSION, 2)]
|
||||
public class WaterShaderImporter : ScriptedImporter
|
||||
{
|
||||
private const string TARGET_FILE_EXTENSION = "watershader";
|
||||
private const string ICON_NAME = "water-shader-icon";
|
||||
|
||||
[Tooltip("Rather than storing the template in this file, it can be sourced from an external text file" +
|
||||
"\nUse this if you intent to duplicate this asset, and need only minor modifications to its import settings")]
|
||||
[SerializeField] public LazyLoadReference<Object> template;
|
||||
|
||||
[Space]
|
||||
|
||||
public WaterShaderSettings settings;
|
||||
|
||||
/// <summary>
|
||||
/// File paths of any file this shader depends on. This list will be populated with any "#include" paths present in the template
|
||||
/// Registering these as dependencies is required to trigger the shader to recompile when these files are changed
|
||||
/// </summary>
|
||||
//[NonSerialized] //Want to keep these serialized. Will differ per-project, which also causes the file to appear as changed for every project when updating the asset (this triggers a re-import)
|
||||
public List<string> dependencies = new List<string>();
|
||||
|
||||
private bool HasExternalTemplate()
|
||||
{
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
return template.isSet;
|
||||
#else
|
||||
return template.asset;
|
||||
#endif
|
||||
}
|
||||
|
||||
public string GetTemplatePath()
|
||||
{
|
||||
return HasExternalTemplate() ? AssetDatabase.GetAssetPath(template.asset) : assetPath;
|
||||
}
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
if(settings.shaderName == string.Empty) settings.shaderName = $"{Application.productName} ({DateTime.Now.Ticks})";
|
||||
}
|
||||
|
||||
public override void OnImportAsset(AssetImportContext context)
|
||||
{
|
||||
Shader shader = AssetDatabase.LoadAssetAtPath<Shader>(context.assetPath);
|
||||
//if (shader != null) ShaderUtil.ClearShaderMessages(shader);
|
||||
|
||||
string templatePath = GetTemplatePath();
|
||||
|
||||
if (templatePath == string.Empty)
|
||||
{
|
||||
Debug.LogError("Failed to import water shader, template file path is null. It possibly hasn't been imported first?", shader);
|
||||
return;
|
||||
}
|
||||
|
||||
#if SWS_DEV
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
#endif
|
||||
|
||||
string[] lines = File.ReadAllLines(templatePath);
|
||||
|
||||
if (lines.Length == 0)
|
||||
{
|
||||
Debug.LogError("Failed to generated water shader. Template or file content is empty (or wasn't yet imported)...");
|
||||
return;
|
||||
}
|
||||
|
||||
dependencies.Clear();
|
||||
|
||||
string templateContents = ShaderConfigurator.TemplateParser.CreateShaderCode(context.assetPath, ref lines, this, false);
|
||||
|
||||
bool asyncCompilation = ShaderUtil.allowAsyncCompilation;
|
||||
|
||||
if (settings.type == WaterShaderSettings.ShaderType.WaterSurface)
|
||||
{
|
||||
//Force async compilation, if this is disabled the editor may crash because compilation take long enough to stall the GPU (DX3D11 Swapchain error)
|
||||
ShaderUtil.allowAsyncCompilation = true;
|
||||
}
|
||||
|
||||
Shader shaderAsset = ShaderUtil.CreateShaderAsset(templateContents, true);
|
||||
ShaderUtil.RegisterShader(shaderAsset);
|
||||
|
||||
Texture2D thumbnail = Resources.Load<Texture2D>(ICON_NAME);
|
||||
if(!thumbnail) thumbnail = EditorGUIUtility.IconContent("ShaderImporter Icon").image as Texture2D;
|
||||
|
||||
context.AddObjectToAsset("MainAsset", shaderAsset, thumbnail);
|
||||
context.SetMainObject(shaderAsset);
|
||||
|
||||
//Do not attempt to create a tessellation variant for the underwater post-effect shaders
|
||||
if (settings.type == WaterShaderSettings.ShaderType.WaterSurface)
|
||||
{
|
||||
//Re-read the original template again
|
||||
lines = File.ReadAllLines(templatePath);
|
||||
templateContents = ShaderConfigurator.TemplateParser.CreateShaderCode(context.assetPath, ref lines, this, true);
|
||||
|
||||
Shader tessellation = ShaderUtil.CreateShaderAsset(templateContents, true);
|
||||
//ShaderUtil.RegisterShader(tessellation);
|
||||
|
||||
context.AddObjectToAsset("Tessellation", (Object)tessellation, thumbnail);
|
||||
}
|
||||
|
||||
//Set up dependency, so that changes to the template triggers shaders to regenerate
|
||||
if (HasExternalTemplate() && AssetDatabase.TryGetGUIDAndLocalFileIdentifier(template, out var guid, out long _))
|
||||
{
|
||||
//Note: this strictly only works when adding the file path!
|
||||
//context.DependsOnArtifact(guid);
|
||||
|
||||
dependencies.Insert(0, AssetDatabase.GUIDToAssetPath(guid));
|
||||
}
|
||||
|
||||
//Dependencies are populated during the template parsing phase.
|
||||
foreach (string dependency in dependencies)
|
||||
{
|
||||
context.DependsOnSourceAsset(dependency);
|
||||
}
|
||||
|
||||
ShaderUtil.allowAsyncCompilation = asyncCompilation;
|
||||
|
||||
#if SWS_DEV
|
||||
sw.Stop();
|
||||
//Debug.Log($"Imported \"{Path.GetFileNameWithoutExtension(assetPath)}\" water shader in {sw.Elapsed.Milliseconds}ms. With {dependencies.Count} dependencies.", shader);
|
||||
#endif
|
||||
}
|
||||
|
||||
public void ClearCache(bool recompile = false)
|
||||
{
|
||||
var objs = AssetDatabase.LoadAllAssetsAtPath(assetPath);
|
||||
|
||||
foreach (var obj in objs)
|
||||
{
|
||||
if (obj is Shader)
|
||||
{
|
||||
ShaderUtil.ClearShaderMessages((Shader)obj);
|
||||
ShaderUtil.ClearCachedData((Shader)obj);
|
||||
|
||||
if(recompile) AssetDatabase.ImportAsset(assetPath);
|
||||
|
||||
#if SWS_DEV
|
||||
Debug.Log($"Cleared cache for {obj.name}");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
public void RegisterDependency(string dependencyAssetPath)
|
||||
{
|
||||
if (dependencyAssetPath.StartsWith("Packages/") == false)
|
||||
{
|
||||
string guid = AssetDatabase.AssetPathToGUID(dependencyAssetPath);
|
||||
|
||||
if (guid == string.Empty)
|
||||
{
|
||||
//Also throws an error for things like '#include_library "SurfaceModifiers/SurfaceModifiers.hlsl"', which are wrapped in an #ifdef. That's a false positive
|
||||
//Debug.LogException(new Exception($"Tried to import \"{this.assetPath}\" with an missing dependency, supposedly at path: {dependencyAssetPath}."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//Tessellation variant pass may run, causing the same dependencies to be registered twice, hence check first
|
||||
if(dependencies.Contains(dependencyAssetPath) == false) dependencies.Add(dependencyAssetPath);
|
||||
}
|
||||
|
||||
//Handles correct behaviour when double-clicking a .watershader asset. Should open in the IDE
|
||||
[UnityEditor.Callbacks.OnOpenAsset]
|
||||
public static bool OnOpenAsset(int instanceID, int line)
|
||||
{
|
||||
Object target = EditorUtility.InstanceIDToObject(instanceID);
|
||||
|
||||
if (target is Shader)
|
||||
{
|
||||
var path = AssetDatabase.GetAssetPath(instanceID);
|
||||
|
||||
if (Path.GetExtension(path) != "." + TARGET_FILE_EXTENSION) return false;
|
||||
|
||||
string externalScriptEditor = ScriptEditorUtility.GetExternalScriptEditor();
|
||||
if (externalScriptEditor != "internal")
|
||||
{
|
||||
InternalEditorUtility.OpenFileAtLineExternal(path, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.OpenURL("file://" + path);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Directive
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
[InspectorName("(no prefix)")]
|
||||
custom,
|
||||
[InspectorName("#include")]
|
||||
include,
|
||||
[InspectorName("#pragma")]
|
||||
pragma,
|
||||
[InspectorName("#define")]
|
||||
define
|
||||
}
|
||||
public bool enabled = true;
|
||||
public Type type;
|
||||
public string value;
|
||||
|
||||
public Directive(Type _type, string _value)
|
||||
{
|
||||
this.type = _type;
|
||||
this.value = _value;
|
||||
}
|
||||
}
|
||||
|
||||
class WaterShaderAssetPostProcessor : AssetPostprocessor
|
||||
{
|
||||
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
|
||||
{
|
||||
RegisterShaders(importedAssets);
|
||||
}
|
||||
|
||||
//Register imported water shaders, so they work with Shader.Find() and show up in the shader selection menu
|
||||
private static void RegisterShaders(string[] paths)
|
||||
{
|
||||
foreach (var path in paths)
|
||||
{
|
||||
if (!path.EndsWith(WaterShaderImporter.TARGET_FILE_EXTENSION, StringComparison.InvariantCultureIgnoreCase))
|
||||
continue;
|
||||
|
||||
var mainObj = AssetDatabase.LoadMainAssetAtPath(path);
|
||||
if (mainObj is Shader)
|
||||
{
|
||||
if (mainObj.name == string.Empty) return;
|
||||
|
||||
//ShaderUtil.RegisterShader((Shader)mainObj);
|
||||
|
||||
#if SWS_DEV
|
||||
//Debug.Log($"Registered water shader \"{mainObj.name}\" on import", mainObj);
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string[] FindAllAssets()
|
||||
{
|
||||
DirectoryInfo directoryInfo = new DirectoryInfo(Application.dataPath);
|
||||
|
||||
FileInfo[] fileInfos = directoryInfo.GetFiles("*." + TARGET_FILE_EXTENSION, SearchOption.AllDirectories);
|
||||
|
||||
#if SWS_DEV
|
||||
Debug.Log($"{fileInfos.Length} .{TARGET_FILE_EXTENSION} assets found");
|
||||
#endif
|
||||
|
||||
string[] filePaths = new string[fileInfos.Length];
|
||||
|
||||
for (int i = 0; i < filePaths.Length; i++)
|
||||
{
|
||||
filePaths[i] = fileInfos[i].FullName.Replace(@"\", "/").Replace(Application.dataPath, "Assets");
|
||||
}
|
||||
|
||||
return filePaths;
|
||||
}
|
||||
|
||||
#if SWS_DEV
|
||||
[MenuItem("SWS/Reimport water shaders")]
|
||||
#endif
|
||||
public static void ReimportAll()
|
||||
{
|
||||
string[] filePaths = FindAllAssets();
|
||||
foreach (var filePath in filePaths)
|
||||
{
|
||||
#if SWS_DEV
|
||||
Debug.Log($"Reimporting: {filePath}");
|
||||
#endif
|
||||
AssetDatabase.ImportAsset(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class WaterShaderSettings
|
||||
{
|
||||
[Tooltip("How it will appear in the selection menu")]
|
||||
public string shaderName;
|
||||
[Tooltip("Hide the shader in the selection menu. Yet still make it findable with Shader.Find()")]
|
||||
public bool hidden;
|
||||
public enum ShaderType
|
||||
{
|
||||
WaterSurface,
|
||||
PostProcessing
|
||||
}
|
||||
public ShaderType type;
|
||||
|
||||
[Tooltip("Before compiling the shader, check whichever asset is present in the project and activate its integration")]
|
||||
public bool autoIntegration = true;
|
||||
public ShaderConfigurator.Fog.Assets fogIntegration = ShaderConfigurator.Fog.Assets.UnityFog;
|
||||
|
||||
[Tooltip("Add support for native light cookies. Disabled by default to allow for cookies to act as caustics projectors that ignore the water surface")]
|
||||
public bool lightCookies = false;
|
||||
|
||||
public List<Directive> customIncludeDirectives = new List<Directive>();
|
||||
}
|
||||
}
|
||||
}
|
10
Assets/StylizedWater2/Editor/WaterShaderImporter.cs.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 531a3ff0802e4acbaef16e2b9d97fd66
|
||||
timeCreated: 1678979614
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/WaterShaderImporter.cs
|
||||
uploadId: 679956
|
46
Assets/StylizedWater2/Editor/sc.stylizedwater2.editor.asmdef
Normal file
@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "sc.stylizedwater2.editor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:93226a8cd37f67d4a996a525146f6f09",
|
||||
"GUID:15fc0a57446b3144c949da3e2b9737a9",
|
||||
"GUID:4fd6538c1c56b409fb53fdf0183170ec",
|
||||
"GUID:df380645f10b7bc4b97d4f5eb6303d95",
|
||||
"GUID:3eae0364be2026648bf74846acb8a731",
|
||||
"GUID:e40ba710768534012815d3193fa296cb",
|
||||
"GUID:f9fe0089ec81f4079af78eb2287a6163",
|
||||
"GUID:75ecb28acc33857438e533566abcb3be"
|
||||
],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.unity.xr.management",
|
||||
"expression": "3.2.10",
|
||||
"define": "XR"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.render-pipelines.universal",
|
||||
"expression": "10.3.2",
|
||||
"define": "URP"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.visualeffectgraph",
|
||||
"expression": "10.3.2",
|
||||
"define": "VFX_GRAPH"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.splines",
|
||||
"expression": "2.0.0",
|
||||
"define": "SPLINES"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0d7a190570d98a42893c25d592fe760
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 170386
|
||||
packageName: Stylized Water 2
|
||||
packageVersion: 1.6.8
|
||||
assetPath: Assets/StylizedWater2/Editor/sc.stylizedwater2.editor.asmdef
|
||||
uploadId: 679956
|
8
Assets/StylizedWater2/Materials.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c77d4a61a64c59545bcffdd5e85ca032
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/StylizedWater2/Materials/DynamicEffects.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e63ef27a7a7fa6c4aa8019878c91f03a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,137 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-2360609270184863290
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 5
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_Default
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _Blend: 0
|
||||
- _BlendOp: 0
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _FoamStrength: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Height: 1
|
||||
- _HeightScale: 1
|
||||
- _Metallic: 0
|
||||
- _NormalStrength: 1
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _RemapDisplacement: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _MaskAnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d503ca33d1a0ac14bbc88ea83586fb12
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_Default.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,49 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_DirectionalRipples
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords:
|
||||
- _REMAPDISPLACEMENT_ON
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 3ad35bf2cc2e84a4488290e3f21a4d04, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 455f1bf1825a2bc4bbb7f0442b53ba2b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 2800000, guid: dae391cecad26f54d9b290c9cf9f5b19, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BlendOp: 0
|
||||
- _FoamStrength: 0
|
||||
- _Height: 0.26
|
||||
- _HeightScale: 1
|
||||
- _NormalStrength: 1
|
||||
- _RemapDisplacement: 1
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: -0.1, b: 0, a: 0}
|
||||
- _MaskAnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Params: {r: 0.1, g: 1, b: 5, a: 1}
|
||||
- _Speed: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0986837c153288a449c94df915c328f2
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_DirectionalRipples.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,44 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_FoamParticle
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: fdf3b141001fcc4409bab4a5885c4bc6, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 39c1e5fea43f415439e6cc3f2352d449, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BlendOp: 0
|
||||
- _FoamStrength: 2
|
||||
- _Height: 1
|
||||
- _NormalStrength: 1
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Params: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4bc1642bfbe8c242a808eb3bee56f37
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_FoamParticle.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,44 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_RippleParticle
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 455f1bf1825a2bc4bbb7f0442b53ba2b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BlendOp: 0
|
||||
- _FoamStrength: 0
|
||||
- _Height: 0.26
|
||||
- _HeightScale: 1
|
||||
- _NormalStrength: 1
|
||||
- _RemapDisplacement: 0
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _MaskAnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Params: {r: 0.1, g: 1, b: 5, a: 1}
|
||||
- _Speed: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ad5cff71f01f104a9f90f1cbb1cee2c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_RippleParticle.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,45 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_ShoreFoam
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 7776ff8afafe546479d38e6e6b97a5a9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: dfbc9164c9cbd584fb3aff57923ab5e5, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BlendOp: 4
|
||||
- _FoamStrength: 1
|
||||
- _Height: 1
|
||||
- _NormalStrength: 1
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Params: {r: 2, g: 1, b: 1, a: 1}
|
||||
- _Speed: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cd5e91f783b14745a9de2f46b171a0d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_ShoreFoam.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,50 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_ShoreWave
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: dfbc9164c9cbd584fb3aff57923ab5e5, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: dfbc9164c9cbd584fb3aff57923ab5e5, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BlendOp: 0
|
||||
- _DstFactor: 1
|
||||
- _FoamStrength: 1
|
||||
- _Height: 1
|
||||
- _HeightScale: 1
|
||||
- _NormalStrength: 1
|
||||
- _RemapDisplacement: 0
|
||||
- _SrcFactor: 3
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _MaskAnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Params: {r: 2, g: 1, b: 1, a: 1}
|
||||
- _Speed: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 554b647a885e46949b8c28e7eac0e5c5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_ShoreWave.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,47 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_TrailLine
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 39c1e5fea43f415439e6cc3f2352d449, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 39c1e5fea43f415439e6cc3f2352d449, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BlendOp: 0
|
||||
- _FoamStrength: 2
|
||||
- _Height: 1
|
||||
- _HeightScale: 1
|
||||
- _NormalStrength: 1
|
||||
- _RemapDisplacement: 0
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _MaskAnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Params: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 13d4f78fed89a9c418050fb994577259
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_TrailLine.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,38 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_Wake
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 56695d75e1592d343bedbb56c140fef7, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 56695d75e1592d343bedbb56c140fef7, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _BlendOp: 0
|
||||
- _FoamStrength: 1
|
||||
- _Height: 1
|
||||
- _NormalStrength: 1
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Params: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51fd2a844113a7d4bafc9effd3a9cdf8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_Wake.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,49 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_Whirlpool
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 5d23d242bc3c9e848895bb1fb8e29f5b, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 39c1e5fea43f415439e6cc3f2352d449, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BlendOp: 0
|
||||
- _DstFactor: 1
|
||||
- _FoamStrength: 2
|
||||
- _Height: 1
|
||||
- _HeightScale: 1
|
||||
- _NormalStrength: 1
|
||||
- _RemapDisplacement: 0
|
||||
- _SrcFactor: 3
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _MaskAnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Params: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ed0361c3ee9940418b75e72f005ae90
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_Whirlpool.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,45 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: DynamicEffect_WindGust
|
||||
m_Shader: {fileID: 4800000, guid: 4f20f4fd10294583adbf69be180bb68e, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: 76254df084e368e44ad45e161e2532ae, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 56695d75e1592d343bedbb56c140fef7, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MaskMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BlendOp: 0
|
||||
- _FoamStrength: 1
|
||||
- _Height: 1
|
||||
- _HeightScale: 1
|
||||
- _NormalStrength: 1
|
||||
m_Colors:
|
||||
- _AnimationSpeed: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Params: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a5e21b683817af4faf67b2faeaccf2c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/DynamicEffect_WindGust.mat
|
||||
uploadId: 679964
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95659e78b87aed44f8296c36964bdf9a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
After Width: | Height: | Size: 1.4 MiB |
@ -0,0 +1,154 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfbc9164c9cbd584fb3aff57923ab5e5
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: 3
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/Textures/BeachWave_output.png
|
||||
uploadId: 679964
|
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,154 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 455f1bf1825a2bc4bbb7f0442b53ba2b
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/Textures/CircularRipple_output.png
|
||||
uploadId: 679964
|
After Width: | Height: | Size: 189 KiB |
@ -0,0 +1,154 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ad35bf2cc2e84a4488290e3f21a4d04
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/Textures/DirectionalRipple_output.png
|
||||
uploadId: 679964
|
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,154 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dae391cecad26f54d9b290c9cf9f5b19
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/Textures/FeatheredMask.png
|
||||
uploadId: 679964
|
After Width: | Height: | Size: 1.1 MiB |
@ -0,0 +1,141 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7776ff8afafe546479d38e6e6b97a5a9
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/Textures/ShorelineFoam.png
|
||||
uploadId: 679964
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,154 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 39c1e5fea43f415439e6cc3f2352d449
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
cookieLightType: 1
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 2
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 257865
|
||||
packageName: Dynamic Effects for Stylized Water 2 (Extension)
|
||||
packageVersion: 1.1.1
|
||||
assetPath: Assets/StylizedWater2/Materials/DynamicEffects/Textures/Trail_output.png
|
||||
uploadId: 679964
|
After Width: | Height: | Size: 526 KiB |