Add some missing files

This commit is contained in:
Lucien 2026-05-11 15:05:54 +02:00
parent be46d7e8e0
commit e85813e929
59 changed files with 144247 additions and 24 deletions

3
.gitignore vendored
View File

@ -13,4 +13,5 @@
!/Imports/Enviro - Sky and Weather !/Imports/Enviro - Sky and Weather
!/Imports/InnerDriveStudios !/Imports/InnerDriveStudios
!/Imports/Materials !/Imports/Materials
!/Imports/KriptoFX !/Imports/KriptoFX
!/Imports/InventaireV2

BIN
Imports/InventaireV2/EquipementFBack.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,104 @@
fileFormatVersion: 2
guid: aeae5f7812d2592428e449cfd32b73f2
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
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
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: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Imports/InventaireV2/EquipementFFace.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,104 @@
fileFormatVersion: 2
guid: 7aeefeb400411cd40ac532b24a234ab0
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
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
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: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Imports/InventaireV2/EquipementMBack.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 7a5edb3fd484a8147b4ddeb75e69fae8
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
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
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
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: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: e83ce004561470f4682fbdb39ba7a5b3
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Imports/InventaireV2/EquipementMFace.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 6bb318e8a9df07f4d95de07c5afced64
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
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
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: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
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: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: e11fa26ef38c93d44aa8d031b50a8603
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 45234985f7288d442ab8695e41d2aa07 guid: c595b57b5f73bb64abb0651b66d4cca1
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -0,0 +1,128 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-941702754598846404
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: EquipementFBack
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
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}
- _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
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _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}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -1,7 +1,8 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 7b9cff3111a0eb74bb0de47eeea2a6dd guid: ccf519436fc0ca744bfc99a65ad4d1b7
TextScriptImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 2100000
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:

View File

@ -7,8 +7,8 @@ Material:
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Trees_Mossy_Shder m_Name: Trees_Mossy
m_Shader: {fileID: -6465566751694194690, guid: a3dc99de062c73148972f81526b3702e, m_Shader: {fileID: -6465566751694194690, guid: 1036bd09ae008684cb00470dca0179ec,
type: 3} type: 3}
m_ValidKeywords: [] m_ValidKeywords: []
m_InvalidKeywords: [] m_InvalidKeywords: []

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: f26590dd271cf5c4b9942669e8aa7fe8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 250128d87c70a9a498a4777d0aaabaff
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: af10da65dfd0def4eb09932602827fc3 guid: bcd666ce5bb59784f896662728f8dfeb
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a0965c6ab0a3ec542b9a100690b7cfe1 guid: dae9d3892f0860c40bb7d25ede940d8f
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}

View File

@ -0,0 +1,121 @@
Shader "NatureManufacture Shaders/Grass/Advanced Grass Light"
{
Properties
{
_Cutoff( "Mask Clip Value", Float ) = 0.051
_HealthyColor("Healthy Color", Color) = (1,1,1,1)
_DryColor("Dry Color", Color) = (0.875,0.8280551,0.7270221,1)
_ColorNoiseSpread("Color Noise Spread", Float) = 15
_MainTex("MainTex", 2D) = "white" {}
_MetallicPower("Metallic Power", Range( 0 , 1)) = 0
_SmoothnessPower("Smoothness Power", Range( 0 , 2)) = 0
_NewNormal("Vertex Normal Multiply", Vector) = (0,0,0,0)
_InitialBend("Wind Initial Bend", Float) = 1
_Stiffness("Wind Stiffness", Float) = 1
_Drag("Wind Drag", Float) = 1
_ShiverDrag("Wind Shiver Drag", Float) = 0.05
_ShiverDirectionality("Wind Shiver Directionality", Range( 0 , 1)) = 0.5
_WindColorInfluence("Wind Color Influence", Vector) = (0,0,0,0)
_WindColorThreshold("Wind Color Threshold", Range( 0 , 10)) = 1
_WindNormalInfluence("Wind Normal Influence", Float) = 0
_CullFarDistance("CullFarDistance", Range( 0 , 10000)) = 5
_CullFarStart("CullFarStart", Range( 0 , 10000)) = 40
[Toggle]_BackFaceMirrorNormal("BackFace Mirror Normal", Float) = 1
[Toggle(_TOUCHREACTACTIVE_ON)] _TouchReactActive("TouchReactActive", Float) = 0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Geometry+0" }
Cull Off
CGPROGRAM
#include "UnityShaderVariables.cginc"
#pragma target 3.0
#pragma multi_compile_instancing
#pragma shader_feature _TOUCHREACTACTIVE_ON
#include "NMWind.cginc"
#include "NM_indirect.cginc"
#pragma vertex vert
#pragma multi_compile GPU_FRUSTUM_ON __
#pragma instancing_options procedural:setup
#pragma surface surf Standard keepalpha addshadow fullforwardshadows
struct Input
{
half ASEVFace : VFACE;
float3 worldPos;
half2 uv_texcoord;
float4 vertexColor : COLOR;
};
uniform half _BackFaceMirrorNormal;
uniform half4 _HealthyColor;
uniform half4 _DryColor;
uniform half _ColorNoiseSpread;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform half3 _WindColorInfluence;
uniform half _WindColorThreshold;
uniform half _MetallicPower;
uniform half _SmoothnessPower;
uniform float _Cutoff = 0.051;
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
float snoise( float2 v )
{
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
float2 i = floor( v + dot( v, C.yy ) );
float2 x0 = v - i + dot( i, C.xx );
float2 i1;
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
float4 x12 = x0.xyxy + C.xxzz;
x12.xy -= i1;
i = mod2D289( i );
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
m = m * m;
m = m * m;
float3 x = 2.0 * frac( p * C.www ) - 1.0;
float3 h = abs( x ) - 0.5;
float3 ox = floor( x + 0.5 );
float3 a0 = x - ox;
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
float3 g;
g.x = a0.x * x0.x + h.x * x0.y;
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
return 130.0 * dot( m, g );
}
void surf( Input i , inout SurfaceOutputStandard o )
{
float3 switchResult433 = (((i.ASEVFace>0)?(half3(0,0,1)):(half3(0,0,-1))));
o.Normal = lerp(float3( 0,0,1 ),switchResult433,_BackFaceMirrorNormal);
float3 ase_worldPos = i.worldPos;
float2 appendResult427 = (half2(ase_worldPos.x , ase_worldPos.z));
float simplePerlin2D430 = snoise( ( appendResult427 / _ColorNoiseSpread ) );
float4 lerpResult432 = lerp( _HealthyColor , _DryColor , simplePerlin2D430);
float2 uv0_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
half4 tex2DNode3 = tex2D( _MainTex, uv0_MainTex );
float clampResult424 = clamp( i.vertexColor.r , 0.0 , 1.0 );
float3 lerpResult443 = lerp( ( float3( 1,1,1 ) - _WindColorInfluence ) , ( float3( 1,1,1 ) + _WindColorInfluence ) , pow( clampResult424 , _WindColorThreshold ));
o.Albedo = ( ( lerpResult432 * tex2DNode3 ) * half4( lerpResult443 , 0.0 ) ).rgb;
o.Metallic = _MetallicPower;
o.Smoothness = _SmoothnessPower;
o.Alpha = 1;
//clip( ( ( 1.0 - saturate( ( ( distance( ase_worldPos , _WorldSpaceCameraPos ) - _CullFarStart ) / _CullFarDistance ) ) ) * tex2DNode3.a ) - _Cutoff );
clip( tex2DNode3.a - _Cutoff );
}
ENDCG
}
Fallback "Diffuse"
}

View File

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

View File

@ -0,0 +1,142 @@
Shader "NatureManufacture Shaders/Grass/Advanced Grass Specular"
{
Properties
{
_Cutoff( "Mask Clip Value", Float ) = 0.5
_HealthyColor("Healthy Color", Color) = (1,1,1,1)
_DryColor("Dry Color", Color) = (0.875,0.8280551,0.7270221,1)
_ColorNoiseSpread("Color Noise Spread", Float) = 15
_MainTex("MainTex", 2D) = "white" {}
[NoScaleOffset]_BumpMap("BumpMap", 2D) = "bump" {}
_BumpScale("BumpScale", Range( 0 , 2)) = 1
[NoScaleOffset]_AmbientOcclusionG("AO (G) Sm (A)", 2D) = "white" {}
_AmbientOcclusionPower("Ambient Occlusion Power", Range( 0 , 1)) = 0
_SmoothnessPower("Smoothness Power", Range( 0 , 2)) = 0
_Specular("Specular", Range( 0 , 1)) = 0
_NewNormal("Vertex Normal Multiply", Vector) = (0,0,0,0)
_InitialBend("Wind Initial Bend", Float) = 1
_Stiffness("Wind Stiffness", Float) = 1
_Drag("Wind Drag", Float) = 1
_ShiverDrag("Wind Shiver Drag", Float) = 0.05
_ShiverDirectionality("Wind Shiver Directionality", Range( 0 , 1)) = 0.5
_WindColorInfluence("Wind Color Influence", Vector) = (0,0,0,0)
_WindColorThreshold("Wind Color Threshold", Float) = 1
_WindNormalInfluence("Wind Normal Influence", Float) = 0
_CullFarDistance("CullFarDistance", Range( 0 , 10000)) = 5
_CullFarStart("CullFarStart", Range( 0 , 10000)) = 40
[Toggle]_BackFaceMirrorNormal("BackFace Mirror Normal", Float) = 0
[Toggle(_TOUCHREACTACTIVE_ON)] _TouchReactActive("TouchReactActive", Float) = 0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Geometry+0" }
Cull Off
CGPROGRAM
#include "UnityStandardUtils.cginc"
#include "UnityShaderVariables.cginc"
#pragma target 3.0
#pragma multi_compile_instancing
#pragma shader_feature _TOUCHREACTACTIVE_ON
#include "NM_indirect.cginc"
#include "NMWind.cginc"
#pragma instancing_options procedural:setup
#pragma multi_compile GPU_FRUSTUM_ON __
#pragma vertex vert
#pragma surface surf StandardSpecular keepalpha addshadow fullforwardshadows
struct Input
{
half2 uv_texcoord;
half ASEVFace : VFACE;
float3 worldPos;
float4 vertexColor : COLOR;
};
uniform half _BackFaceMirrorNormal;
uniform half _BumpScale;
uniform sampler2D _BumpMap;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform half4 _HealthyColor;
uniform half4 _DryColor;
uniform half _ColorNoiseSpread;
uniform half3 _WindColorInfluence;
uniform half _WindColorThreshold;
uniform half _Specular;
uniform sampler2D _AmbientOcclusionG;
uniform half _SmoothnessPower;
uniform half _AmbientOcclusionPower;
uniform float _Cutoff = 0.5;
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
float snoise( float2 v )
{
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
float2 i = floor( v + dot( v, C.yy ) );
float2 x0 = v - i + dot( i, C.xx );
float2 i1;
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
float4 x12 = x0.xyxy + C.xxzz;
x12.xy -= i1;
i = mod2D289( i );
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
m = m * m;
m = m * m;
float3 x = 2.0 * frac( p * C.www ) - 1.0;
float3 h = abs( x ) - 0.5;
float3 ox = floor( x + 0.5 );
float3 a0 = x - ox;
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
float3 g;
g.x = a0.x * x0.x + h.x * x0.y;
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
return 130.0 * dot( m, g );
}
void surf( Input i , inout SurfaceOutputStandardSpecular o )
{
float2 uv0_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
half3 tex2DNode4 = UnpackScaleNormal( tex2D( _BumpMap, uv0_MainTex ), _BumpScale );
float3 switchResult439 = (((i.ASEVFace>0)?(tex2DNode4):(( tex2DNode4 * float3( -1,-1,-1 ) ))));
o.Normal = lerp(tex2DNode4,switchResult439,_BackFaceMirrorNormal);
float3 ase_worldPos = i.worldPos;
float2 appendResult427 = (half2(ase_worldPos.x , ase_worldPos.z));
float simplePerlin2D432 = snoise( ( appendResult427 / _ColorNoiseSpread ) );
float4 lerpResult433 = lerp( _HealthyColor , _DryColor , simplePerlin2D432);
half4 tex2DNode3 = tex2D( _MainTex, uv0_MainTex );
float clampResult437 = clamp( i.vertexColor.r , 0.0 , 1.0 );
float3 lerpResult465 = lerp( ( float3( 1,1,1 ) - _WindColorInfluence ) , ( float3( 1,1,1 ) + _WindColorInfluence ) , pow( clampResult437 , _WindColorThreshold ));
float4 temp_output_355_0 = ( ( lerpResult433 * tex2DNode3 ) * half4( lerpResult465 , 0.0 ) );
o.Albedo = temp_output_355_0.rgb;
float4 clampResult420 = clamp( ( _Specular * ( temp_output_355_0 * float4( 0.3,0.3019608,0.3019608,0.3019608 ) ) ) , float4( 0,0,0,0 ) , float4( 0.5019608,0.5019608,0.5019608,0 ) );
o.Specular = clampResult420.rgb;
half4 tex2DNode98 = tex2D( _AmbientOcclusionG, uv0_MainTex );
o.Smoothness = ( tex2DNode98.a * _SmoothnessPower );
float clampResult150 = clamp( tex2DNode98.g , ( 1.0 - _AmbientOcclusionPower ) , 1.0 );
o.Occlusion = clampResult150;
o.Alpha = 1;
//clip( ( ( 1.0 - saturate( ( ( distance( ase_worldPos , _WorldSpaceCameraPos ) - _CullFarStart ) / _CullFarDistance ) ) ) * tex2DNode3.a ) - _Cutoff );
clip( tex2DNode3.a - _Cutoff );
}
ENDCG
}
Fallback "Diffuse"
}

View File

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

View File

@ -0,0 +1,133 @@
Shader "NatureManufacture Shaders/Grass/Advanced Grass Standard"
{
Properties
{
_Cutoff( "Mask Clip Value", Float ) = 0.051
_HealthyColor("Healthy Color", Color) = (1,1,1,1)
_DryColor("Dry Color", Color) = (0.875,0.8280551,0.7270221,1)
_ColorNoiseSpread("Color Noise Spread", Float) = 15
_MainTex("MainTex", 2D) = "white" {}
[NoScaleOffset]_BumpMap("BumpMap", 2D) = "bump" {}
_BumpScale("BumpScale", Range( 0 , 2)) = 1
[NoScaleOffset]_AmbientOcclusionG("AO (G) Sm (A)", 2D) = "white" {}
_AmbientOcclusionPower("Ambient Occlusion Power", Range( 0 , 1)) = 0
_Metallic("Metallic", Range( 0 , 1)) = 0
_SmoothnessPower("Smoothness Power", Range( 0 , 2)) = 0
_NewNormal("Vertex Normal Multiply", Vector) = (0,0,0,0)
_InitialBend("Wind Initial Bend", Float) = 1
_Stiffness("Wind Stiffness", Float) = 1
_Drag("Wind Drag", Float) = 1
_ShiverDrag("Wind Shiver Drag", Float) = 0.05
_ShiverDirectionality("Wind Shiver Directionality", Range( 0 , 1)) = 0.5
_WindColorInfluence("Wind Color Influence", Vector) = (0,0,0,0)
_WindColorThreshold("Wind Color Threshold", Range( 0 , 10)) = 1
_WindNormalInfluence("Wind Normal Influence", Float) = 0
_CullFarDistance("CullFarDistance", Range( 0 , 10000)) = 5
_CullFarStart("CullFarStart", Range( 0 , 10000)) = 40
[Toggle]_BackFaceMirrorNormal("BackFace Mirror Normal", Float) = 1
[Toggle(_TOUCHREACTACTIVE_ON)] _TouchReactActive("TouchReactActive", Float) = 0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Transparent" "Queue" = "Geometry+0" }
Cull Off
CGPROGRAM
#include "UnityStandardUtils.cginc"
#include "UnityShaderVariables.cginc"
#pragma target 3.0
#pragma multi_compile_instancing
#pragma shader_feature _TOUCHREACTACTIVE_ON
#include "NMWind.cginc"
#include "NM_indirect.cginc"
#pragma vertex vert
#pragma multi_compile GPU_FRUSTUM_ON __
#pragma instancing_options procedural:setup
#pragma surface surf Standard keepalpha addshadow fullforwardshadows
struct Input
{
half2 uv_texcoord;
half ASEVFace : VFACE;
float3 worldPos;
float4 vertexColor : COLOR;
};
uniform half _BackFaceMirrorNormal;
uniform half _BumpScale;
uniform sampler2D _BumpMap;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform half4 _HealthyColor;
uniform half4 _DryColor;
uniform half _ColorNoiseSpread;
uniform half3 _WindColorInfluence;
uniform half _WindColorThreshold;
uniform half _Metallic;
uniform sampler2D _AmbientOcclusionG;
uniform half _SmoothnessPower;
uniform half _AmbientOcclusionPower;
uniform float _Cutoff = 0.051;
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
float snoise( float2 v )
{
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
float2 i = floor( v + dot( v, C.yy ) );
float2 x0 = v - i + dot( i, C.xx );
float2 i1;
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
float4 x12 = x0.xyxy + C.xxzz;
x12.xy -= i1;
i = mod2D289( i );
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
m = m * m;
m = m * m;
float3 x = 2.0 * frac( p * C.www ) - 1.0;
float3 h = abs( x ) - 0.5;
float3 ox = floor( x + 0.5 );
float3 a0 = x - ox;
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
float3 g;
g.x = a0.x * x0.x + h.x * x0.y;
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
return 130.0 * dot( m, g );
}
void surf( Input i , inout SurfaceOutputStandard o )
{
float2 uv0_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
half3 tex2DNode4 = UnpackScaleNormal( tex2D( _BumpMap, uv0_MainTex ), _BumpScale );
float3 switchResult436 = (((i.ASEVFace>0)?(tex2DNode4):(( tex2DNode4 * float3( -1,-1,-1 ) ))));
o.Normal = lerp(tex2DNode4,switchResult436,_BackFaceMirrorNormal);
float3 ase_worldPos = i.worldPos;
float2 appendResult427 = (half2(ase_worldPos.x , ase_worldPos.z));
float simplePerlin2D430 = snoise( ( appendResult427 / _ColorNoiseSpread ) );
float4 lerpResult432 = lerp( _HealthyColor , _DryColor , simplePerlin2D430);
half4 tex2DNode3 = tex2D( _MainTex, uv0_MainTex );
float clampResult424 = clamp( i.vertexColor.r , 0.0 , 1.0 );
float3 lerpResult441 = lerp( ( float3( 1,1,1 ) - _WindColorInfluence ) , ( float3( 1,1,1 ) + _WindColorInfluence ) , pow( clampResult424 , _WindColorThreshold ));
o.Albedo = ( ( lerpResult432 * tex2DNode3 ) * half4( lerpResult441 , 0.0 ) ).rgb;
o.Metallic = _Metallic;
half4 tex2DNode98 = tex2D( _AmbientOcclusionG, uv0_MainTex );
o.Smoothness = ( tex2DNode98.a * _SmoothnessPower );
float clampResult150 = clamp( tex2DNode98.g , ( 1.0 - _AmbientOcclusionPower ) , 1.0 );
o.Occlusion = clampResult150;
o.Alpha = 1;
//clip( ( ( 1.0 - saturate( ( ( distance( ase_worldPos , _WorldSpaceCameraPos ) - _CullFarStart ) / _CullFarDistance ) ) ) * tex2DNode3.a ) - _Cutoff );
clip( tex2DNode3.a - _Cutoff );
}
ENDCG
}
Fallback "Diffuse"
}

View File

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

View File

@ -0,0 +1,69 @@
Shader "NatureManufacture Shaders/Trees/Cross Model Shader"
{
Properties
{
_Cutoff( "Mask Clip Value", Float ) = 0.65
_ColorAdjustment("Color Adjustment", Vector) = (1,1,1,0)
_MainTex("MainTex", 2D) = "white" {}
_HealthyColor("Healthy Color", Color) = (1,0.9735294,0.9338235,1)
_Smooothness("Smooothness", Float) = 0.3
_AO("AO", Float) = 1
[NoScaleOffset]_BumpMap("BumpMap", 2D) = "bump" {}
_BumpScale("BumpScale", Range( 0 , 3)) = 1
_InitialBend("Wind Initial Bend", Float) = 1
_Stiffness("Wind Stiffness", Float) = 1
_Drag("Wind Drag", Float) = 0.2
_NewNormal("Vertex Normal Multiply", Vector) = (0,0,0,0)
[Toggle(_TOUCHREACTACTIVE_ON)] _TouchReactActive("TouchReactActive", Float) = 0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "TransparentCutout" "Queue" = "AlphaTest+0" }
Cull Back
CGPROGRAM
#include "UnityStandardUtils.cginc"
#pragma target 3.0
#pragma multi_compile_instancing
#pragma shader_feature _TOUCHREACTACTIVE_ON
#include "NMWindNoShiver.cginc"
#include "NM_indirect.cginc"
#pragma vertex vert
#pragma instancing_options procedural:setup
#pragma multi_compile GPU_FRUSTUM_ON __
#pragma surface surf StandardSpecular keepalpha addshadow fullforwardshadows dithercrossfade
struct Input
{
float2 uv_texcoord;
};
uniform float _BumpScale;
uniform sampler2D _BumpMap;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform float4 _HealthyColor;
uniform float3 _ColorAdjustment;
uniform float _Smooothness;
uniform float _AO;
uniform float _Cutoff = 0.65;
void surf( Input i , inout SurfaceOutputStandardSpecular o )
{
float2 uv0_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
o.Normal = UnpackScaleNormal( tex2D( _BumpMap, uv0_MainTex ), _BumpScale );
float4 tex2DNode2 = tex2D( _MainTex, uv0_MainTex );
o.Albedo = ( ( tex2DNode2 * _HealthyColor ) * float4( _ColorAdjustment , 0.0 ) ).rgb;
float3 temp_cast_2 = (0.0).xxx;
o.Specular = temp_cast_2;
o.Smoothness = _Smooothness;
o.Occlusion = _AO;
o.Alpha = 1;
clip( tex2DNode2.a - _Cutoff );
}
ENDCG
}
Fallback "Diffuse"
}

View File

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

View File

@ -0,0 +1,265 @@
#define FLT_EPSILON 1.192092896e-07
#include "NMWindTouchRect.cginc"
sampler2D WIND_SETTINGS_TexNoise;
sampler2D WIND_SETTINGS_TexGust;
float _InitialBend;
float _Stiffness;
float _Drag;
float _ShiverDrag;
float _ShiverDirectionality;
float _WindNormalInfluence;
float4 _NewNormal;
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
float WIND_SETTINGS_FlexNoiseScale;
float WIND_SETTINGS_ShiverNoiseScale;
float WIND_SETTINGS_Turbulence;
float WIND_SETTINGS_GustSpeed;
float WIND_SETTINGS_GustScale;
float WIND_SETTINGS_GustWorldScale;
float4x4 WIND_SETTINGS_Points;
float4 WIND_SETTINGS_Points_Radius;
uniform half _CullFarStart = -1;
uniform half _CullFarDistance = -1;
float PositivePow(float base, float power)
{
return pow(max(abs(base), float(FLT_EPSILON)), power);
}
float AttenuateTrunk(float x, float s)
{
float r = (x / s);
return PositivePow(r, 1 / s);
}
float3 Rotate(float3 pivot, float3 position, float3 rotationAxis, float angle)
{
rotationAxis = normalize(rotationAxis);
float3 cpa = pivot + rotationAxis * dot(rotationAxis, position - pivot);
return cpa + ((position - cpa) * cos(angle) + cross(rotationAxis, (position - cpa)) * sin(angle));
}
struct WindData
{
float3 Direction;
float Strength;
float3 ShiverStrength;
float3 ShiverDirection;
float Gust;
};
float3 texNoise(float3 worldPos, float LOD)
{
return tex2Dlod(WIND_SETTINGS_TexNoise, float4(worldPos.xz, 0, LOD)).xyz - 0.5;
}
float texGust(float3 worldPos, float LOD)
{
return tex2Dlod(WIND_SETTINGS_TexGust, float4(worldPos.xz, 0, LOD)).x;
}
float4 PointDirection(float4 collumn, float radius)
{
float3 position = UNITY_MATRIX_M._m03_m13_m23;
float3 direction = position - collumn.rgb;
float3 norm = normalize(direction);
float leng = length(direction);
leng = clamp(leng / radius, 0, 1);
leng = lerp(collumn.a, 0, leng);
norm = norm * leng;
return float4(norm.rgb, leng);
}
float4 MatrixSplit(float4x4 mat, float column)
{
return float4(mat[0][column], mat[1][column], mat[2][column], mat[3][column]);
}
WindData GetAnalyticalWind(float3 WorldPosition, float3 PivotPosition, float drag, float shiverDrag, float initialBend, float4 time)
{
WindData result;
float4 newDirection = PointDirection(MatrixSplit(WIND_SETTINGS_Points, 0), WIND_SETTINGS_Points_Radius[0]);
newDirection += PointDirection(MatrixSplit(WIND_SETTINGS_Points, 1), WIND_SETTINGS_Points_Radius[1]);
newDirection += PointDirection(MatrixSplit(WIND_SETTINGS_Points, 2), WIND_SETTINGS_Points_Radius[2]);
newDirection += PointDirection(MatrixSplit(WIND_SETTINGS_Points, 3), WIND_SETTINGS_Points_Radius[3]);
float4 WIND_SETTINGS_WorldDirectionAndSpeednew = WIND_SETTINGS_WorldDirectionAndSpeed + newDirection;
float3 normalizedDir = normalize(WIND_SETTINGS_WorldDirectionAndSpeednew.xyz);
float3 worldOffset = float3(1, 0, 0) * WIND_SETTINGS_WorldDirectionAndSpeednew.w * time.y;
float3 gustWorldOffset = float3(1, 0, 0) * WIND_SETTINGS_GustSpeed * time.y;
// Trunk noise is base wind + gusts + noise
float3 trunk = float3(0, 0, 0);
if (WIND_SETTINGS_WorldDirectionAndSpeednew.w > 0.0 || WIND_SETTINGS_Turbulence > 0.0)
{
trunk = texNoise((PivotPosition - worldOffset) * WIND_SETTINGS_FlexNoiseScale, 3);
}
float gust = 0.0;
if (WIND_SETTINGS_GustSpeed > 0.0)
{
gust = texGust((PivotPosition - gustWorldOffset) * WIND_SETTINGS_GustWorldScale, 3);
gust = pow(gust, 2) * WIND_SETTINGS_GustScale;
}
float3 trunkNoise =
(
(normalizedDir * WIND_SETTINGS_WorldDirectionAndSpeednew.w)
+ (gust * normalizedDir * WIND_SETTINGS_GustSpeed)
+ (trunk * WIND_SETTINGS_Turbulence)
) * drag;
// Shiver Noise
float3 shiverNoise = texNoise((WorldPosition - worldOffset) * WIND_SETTINGS_ShiverNoiseScale, 0) * shiverDrag * WIND_SETTINGS_Turbulence;
float3 dir = trunkNoise;
float flex = length(trunkNoise) + initialBend;
float shiver = length(shiverNoise);
result.Direction = dir;
result.ShiverDirection = shiverNoise;
result.Strength = flex;
result.ShiverStrength = shiver + shiver * gust;
result.Gust = (gust * normalizedDir * WIND_SETTINGS_GustSpeed)
+ (trunk * WIND_SETTINGS_Turbulence);
return result;
}
void ApplyWindDisplacement(inout float3 positionWS,
inout WindData windData,
float3 normalWS,
float3 rootWP,
float stiffness,
float drag,
float shiverDrag,
float shiverDirectionality,
float initialBend,
float shiverMask,
float4 time)
{
WindData wind = GetAnalyticalWind(positionWS, rootWP, drag, shiverDrag, initialBend, time);
if (wind.Strength > 0.0)
{
float att = AttenuateTrunk(distance(positionWS, rootWP), stiffness);
float3 rotAxis = cross(float3(0, 1, 0), wind.Direction);
positionWS = Rotate(rootWP, positionWS, rotAxis, (wind.Strength) * 0.001 * att);
float3 shiverDirection = normalize(lerp(normalWS, normalize(wind.Direction + wind.ShiverDirection), shiverDirectionality));
positionWS += wind.ShiverStrength * shiverDirection * shiverMask;
}
windData = wind;
}
float4x4 GetObjectToWorldMatrix()
{
return unity_ObjectToWorld;
}
float4x4 GetWorldToObjectMatrix()
{
return unity_WorldToObject;
}
float3 TransformObjectToWorld(float3 positionOS)
{
return mul(GetObjectToWorldMatrix(), float4(positionOS, 1.0)).xyz;
}
float3 TransformObjectToWorldNormal(float3 normalOS)
{
#ifdef UNITY_ASSUME_UNIFORM_SCALING
return UnityObjectToWorldDir(normalOS);
#else
// Normal need to be multiply by inverse transpose
// mul(IT_M, norm) => mul(norm, I_M) => {dot(norm, I_M.col0), dot(norm, I_M.col1), dot(norm, I_M.col2)}
return normalize(mul(normalOS, (float3x3) GetWorldToObjectMatrix()));
#endif
}
float3 TransformWorldToObject(float3 positionWS)
{
return mul(GetWorldToObjectMatrix(), float4(positionWS, 1.0)).xyz;
}
void vert(inout appdata_full v)
{
float3 positionWS = TransformObjectToWorld(v.vertex.xyz);
float distanceToCamera = length(positionWS - _WorldSpaceCameraPos.xyz);
float cull = 1;
if(_CullFarStart>0)
cull = 1 - saturate((distanceToCamera -_CullFarStart) / _CullFarDistance);
float3 rootWP = mul(GetObjectToWorldMatrix(), float4(0, 0, 0, 1)).xyz;
float3 normalWS = TransformObjectToWorldNormal(v.normal);
WindData windData;
ApplyWindDisplacement(positionWS, windData, normalWS, rootWP, _Stiffness, _Drag, _ShiverDrag, _ShiverDirectionality, _InitialBend, v.color.a, _Time);
v.vertex.xyz = TransformWorldToObject(positionWS).xyz * cull;
if (_NewNormal.x != 0 || _NewNormal.y != 0 || _NewNormal.z != 0)
v.normal *= _NewNormal;
if (_WindNormalInfluence != 0)
v.normal.y += -_WindNormalInfluence + windData.ShiverStrength * (_WindNormalInfluence + _WindNormalInfluence);
v.color.r = windData.ShiverStrength;
//v.color.g = cull;
if (_TouchReactActive > 0)
v.vertex.xyz += TouchReactAdjustVertex(half4(v.vertex.xyz, 0.0).xyz);
}
void AdditionalWind(inout appdata_full v)
{
vert(v);
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 07e3b97e5e97f1c44b4c26960d9fb0a8
timeCreated: 1523437911
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,226 @@
#define FLT_EPSILON 1.192092896e-07
sampler2D WIND_SETTINGS_TexNoise;
sampler2D WIND_SETTINGS_TexGust;
float _InitialBend;
float _Stiffness;
float _Drag;
float4 _NewNormal;
float4 WIND_SETTINGS_WorldDirectionAndSpeed;
float WIND_SETTINGS_FlexNoiseScale;
float WIND_SETTINGS_Turbulence;
float WIND_SETTINGS_GustSpeed;
float WIND_SETTINGS_GustScale;
float WIND_SETTINGS_GustWorldScale;
float4x4 WIND_SETTINGS_Points;
float4 WIND_SETTINGS_Points_Radius;
float PositivePow(float base, float power)
{
return pow(max(abs(base), float(FLT_EPSILON)), power);
}
float AttenuateTrunk(float x, float s)
{
float r = (x / s);
return PositivePow(r, 1 / s);
}
float3 Rotate(float3 pivot, float3 position, float3 rotationAxis, float angle)
{
rotationAxis = normalize(rotationAxis);
float3 cpa = pivot + rotationAxis * dot(rotationAxis, position - pivot);
return cpa + ((position - cpa) * cos(angle) + cross(rotationAxis, (position - cpa)) * sin(angle));
}
struct WindData
{
float3 Direction;
float Strength;
float Gust;
};
float3 texNoise(float3 worldPos, float LOD)
{
return tex2Dlod(WIND_SETTINGS_TexNoise, float4(worldPos.xz, 0, LOD)).xyz - 0.5;
}
float texGust(float3 worldPos, float LOD)
{
return tex2Dlod(WIND_SETTINGS_TexGust, float4(worldPos.xz, 0, LOD)).x;
}
float4 PointDirection(float4 collumn, float radius)
{
float3 position = UNITY_MATRIX_M._m03_m13_m23;
float3 direction = position - collumn.rgb;
float3 norm = normalize(direction);
float leng = length(direction);
leng = clamp(leng / radius, 0, 1);
leng = lerp(collumn.a, 0, leng);
norm = norm * leng;
return float4(norm.rgb, leng);
}
float4 MatrixSplit(float4x4 mat, float column)
{
return float4(mat[0][column], mat[1][column], mat[2][column], mat[3][column]);
}
WindData GetAnalyticalWind(float3 WorldPosition, float3 PivotPosition, float drag, float initialBend, float4 time)
{
WindData result;
float4 newDirection = PointDirection(MatrixSplit(WIND_SETTINGS_Points, 0), WIND_SETTINGS_Points_Radius[0]);
newDirection += PointDirection(MatrixSplit(WIND_SETTINGS_Points, 1), WIND_SETTINGS_Points_Radius[1]);
newDirection += PointDirection(MatrixSplit(WIND_SETTINGS_Points, 2), WIND_SETTINGS_Points_Radius[2]);
newDirection += PointDirection(MatrixSplit(WIND_SETTINGS_Points, 3), WIND_SETTINGS_Points_Radius[3]);
float4 WIND_SETTINGS_WorldDirectionAndSpeednew = WIND_SETTINGS_WorldDirectionAndSpeed + newDirection;
float3 normalizedDir = normalize(WIND_SETTINGS_WorldDirectionAndSpeednew.xyz);
float3 worldOffset = float3(1, 0, 0) * WIND_SETTINGS_WorldDirectionAndSpeednew.w * time.y;
float3 gustWorldOffset = float3(1, 0, 0) * WIND_SETTINGS_GustSpeed * time.y;
// Trunk noise is base wind + gusts + noise
float3 trunk = float3(0, 0, 0);
if (WIND_SETTINGS_WorldDirectionAndSpeednew.w > 0.0 || WIND_SETTINGS_Turbulence > 0.0)
{
trunk = texNoise((PivotPosition - worldOffset) * WIND_SETTINGS_FlexNoiseScale, 3);
}
float gust = 0.0;
if (WIND_SETTINGS_GustSpeed > 0.0)
{
gust = texGust((PivotPosition - gustWorldOffset) * WIND_SETTINGS_GustWorldScale, 3);
gust = pow(gust, 2) * WIND_SETTINGS_GustScale;
}
float3 trunkNoise =
(
(normalizedDir * WIND_SETTINGS_WorldDirectionAndSpeednew.w)
+ (gust * normalizedDir * WIND_SETTINGS_GustSpeed)
+ (trunk * WIND_SETTINGS_Turbulence)
) * drag;
float3 dir = trunkNoise;
float flex = length(trunkNoise) + initialBend;
result.Direction = dir;
result.Strength = flex;
result.Gust = (gust * normalizedDir * WIND_SETTINGS_GustSpeed)
+ (trunk * WIND_SETTINGS_Turbulence);
return result;
}
void ApplyWindDisplacement(inout float3 positionWS,
inout WindData windData,
float3 normalWS,
float3 rootWP,
float stiffness,
float drag,
float initialBend,
float4 time)
{
WindData wind = GetAnalyticalWind(positionWS, rootWP, drag, initialBend, time);
if (wind.Strength > 0.0)
{
float att = AttenuateTrunk(distance(positionWS, rootWP), stiffness);
float3 rotAxis = cross(float3(0, 1, 0), wind.Direction);
positionWS = Rotate(rootWP, positionWS, rotAxis, (wind.Strength) * 0.001 * att);
}
windData = wind;
}
float4x4 GetObjectToWorldMatrix()
{
return unity_ObjectToWorld;
}
float4x4 GetWorldToObjectMatrix()
{
return unity_WorldToObject;
}
float3 TransformObjectToWorld(float3 positionOS)
{
return mul(GetObjectToWorldMatrix(), float4(positionOS, 1.0)).xyz;
}
float3 TransformObjectToWorldNormal(float3 normalOS)
{
#ifdef UNITY_ASSUME_UNIFORM_SCALING
return UnityObjectToWorldDir(normalOS);
#else
// Normal need to be multiply by inverse transpose
// mul(IT_M, norm) => mul(norm, I_M) => {dot(norm, I_M.col0), dot(norm, I_M.col1), dot(norm, I_M.col2)}
return normalize(mul(normalOS, (float3x3) GetWorldToObjectMatrix()));
#endif
}
float3 TransformWorldToObject(float3 positionWS)
{
return mul(GetWorldToObjectMatrix(), float4(positionWS, 1.0)).xyz;
}
void vert(inout appdata_full v)
{
float3 positionWS = TransformObjectToWorld(v.vertex.xyz);
float3 rootWP = mul(GetObjectToWorldMatrix(), float4(0, 0, 0, 1)).xyz;
float3 normalWS = TransformObjectToWorldNormal(v.normal);
WindData windData;
ApplyWindDisplacement(positionWS, windData, normalWS, rootWP, _Stiffness, _Drag, _InitialBend, _Time);
v.vertex.xyz = TransformWorldToObject(positionWS).xyz;
if (_NewNormal.x != 0 && _NewNormal.y != 0 && _NewNormal.z != 0)
v.normal *= _NewNormal;
}
void AdditionalWind(inout appdata_full v)
{
vert(v);
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 41a44dc6f4c76bf429bfb60cfaadc25e
timeCreated: 1526285641
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,18 @@
uniform half _TouchReactActive;
sampler2D _TouchReact_Buffer;
float4 _TouchReact_Pos;
float3 TouchReactAdjustVertex(float3 pos)
{
float3 worldPos = mul(unity_ObjectToWorld, float4(pos, 1));
float2 tbPos = saturate((float2(worldPos.x, -worldPos.z) - _TouchReact_Pos.xz) / _TouchReact_Pos.w);
float2 touchBend = tex2Dlod(_TouchReact_Buffer, float4(tbPos, 0, 0));
touchBend.y *= 1.0 - length(tbPos - 0.5) * 2;
if (touchBend.y > 0.01)
{
worldPos.y = min(worldPos.y, touchBend.x * 10000);
}
float3 changedLocalPos = mul(unity_WorldToObject, float4(worldPos, 1)).xyz;
return changedLocalPos - pos;
}

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -0,0 +1,36 @@
void InjectSetup_float(float3 A, out float3 Out)
{
Out = A;
}
#ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED
struct IndirectShaderData
{
float4x4 PositionMatrix;
float4x4 InversePositionMatrix;
float4 ControlData;
};
#if defined(SHADER_API_GLCORE) || defined(SHADER_API_D3D11) || defined(SHADER_API_GLES3) || defined(SHADER_API_METAL) || defined(SHADER_API_VULKAN) || defined(SHADER_API_PSSL) || defined(SHADER_API_XBOXONE)
uniform StructuredBuffer<IndirectShaderData> VisibleShaderDataBuffer;
#endif
#endif
void setupVSPro()
{
#ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED
#ifdef unity_ObjectToWorld
#undef unity_ObjectToWorld
#endif
#ifdef unity_WorldToObject
#undef unity_WorldToObject
#endif
unity_ObjectToWorld = VisibleShaderDataBuffer[unity_InstanceID].PositionMatrix;
unity_WorldToObject = VisibleShaderDataBuffer[unity_InstanceID].InversePositionMatrix;
#endif
}

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -0,0 +1,37 @@
#ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED
struct IndirectShaderData
{
float4x4 PositionMatrix;
float4x4 InversePositionMatrix;
float4 ControlData;
};
#if defined(SHADER_API_GLCORE) || defined(SHADER_API_D3D11) || defined(SHADER_API_GLES3) || defined(SHADER_API_METAL) || defined(SHADER_API_VULKAN) || defined(SHADER_API_PS4) || defined(SHADER_API_XBOXONE)
StructuredBuffer<IndirectShaderData> IndirectShaderDataBuffer;
StructuredBuffer<IndirectShaderData> VisibleShaderDataBuffer;
#endif
#endif
void setup()
{
#ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED
#ifdef GPU_FRUSTUM_ON
unity_ObjectToWorld = VisibleShaderDataBuffer[unity_InstanceID].PositionMatrix;
unity_WorldToObject = VisibleShaderDataBuffer[unity_InstanceID].InversePositionMatrix;
#else
unity_ObjectToWorld = IndirectShaderDataBuffer[unity_InstanceID].PositionMatrix;
unity_WorldToObject = IndirectShaderDataBuffer[unity_InstanceID].InversePositionMatrix;
#endif
#ifdef FAR_CULL_ON_PROCEDURAL_INSTANCING
#define transformPosition mul(unity_ObjectToWorld, float4(0,0,0,1)).xyz
#define distanceToCamera length(transformPosition - _WorldSpaceCameraPos.xyz)
float cull = 1.0 - saturate((distanceToCamera - _CullFarStart) / _CullFarDistance);
unity_ObjectToWorld = mul(unity_ObjectToWorld, float4x4(cull, 0, 0, 0, 0, cull, 0, 0, 0, 0, cull, 0, 0, 0, 0, 1));
#undef transformPosition
#undef distanceToCamera
#endif
#endif
}

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 735c6897e358b764fba39dc3ac6cc757
timeCreated: 1526544618
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,96 @@
Shader "NatureManufacture Shaders/Trees/Tree Bark Metalic"
{
Properties
{
_Color("Color", Color) = (1,1,1,0)
_MainTex("MainTex", 2D) = "white" {}
[NoScaleOffset]_BumpMap("BumpMap", 2D) = "bump" {}
_BumpScale("BumpScale", Range( 0 , 5)) = 1
[NoScaleOffset]_MetalicRAOGSmothnessA("Metalic (R) AO (G) Smothness (A)", 2D) = "white" {}
_MetallicPower("Metallic Power", Range( 0 , 2)) = 0
_AmbientOcclusionPower("Ambient Occlusion Power", Range( 0 , 1)) = 1
_SmoothnessPower("Smoothness Power", Range( 0 , 2)) = 0
_DetailMask("DetailMask", 2D) = "black" {}
_DetailAlbedoMap("DetailAlbedoMap", 2D) = "white" {}
[Toggle(_DETALUSEUV3_ON)] _DetalUseUV3("Detal Use UV3", Float) = 0
[NoScaleOffset]_DetailNormalMap("DetailNormalMap", 2D) = "bump" {}
_DetailNormalMapScale("DetailNormalMapScale", Range( 0 , 5)) = 1
[NoScaleOffset]_DetailMetalicRAOGSmothnessA("Detail Metalic (R) AO (G) Smothness (A) ", 2D) = "white" {}
_InitialBend("Wind Initial Bend", Float) = 1
_Stiffness("Wind Stiffness", Float) = 1
_Drag("Wind Drag", Float) = 1
[Toggle(_TOUCHREACTACTIVE_ON)] _TouchReactActive("TouchReactActive", Float) = 0
[HideInInspector] _texcoord3( "", 2D ) = "white" {}
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" }
Cull Back
CGPROGRAM
#include "UnityStandardUtils.cginc"
#pragma target 3.0
#pragma multi_compile_instancing
#pragma shader_feature _TOUCHREACTACTIVE_ON
#pragma shader_feature _DETALUSEUV3_ON
#include "NMWindNoShiver.cginc"
#include "NM_indirect.cginc"
#pragma vertex vert
#pragma instancing_options procedural:setup
#pragma multi_compile GPU_FRUSTUM_ON __
#pragma surface surf Standard keepalpha addshadow fullforwardshadows dithercrossfade
struct Input
{
float2 uv_texcoord;
float2 uv3_texcoord3;
};
uniform float _BumpScale;
uniform sampler2D _BumpMap;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform float _DetailNormalMapScale;
uniform sampler2D _DetailNormalMap;
uniform sampler2D _DetailAlbedoMap;
uniform float4 _DetailAlbedoMap_ST;
uniform float4 _DetailNormalMap_ST;
uniform sampler2D _DetailMask;
uniform float4 _DetailMask_ST;
uniform float4 _Color;
uniform sampler2D _MetalicRAOGSmothnessA;
uniform sampler2D _DetailMetalicRAOGSmothnessA;
uniform float _MetallicPower;
uniform float _SmoothnessPower;
uniform float _AmbientOcclusionPower;
void surf( Input i , inout SurfaceOutputStandard o )
{
float2 uv0_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
float2 uv0_DetailAlbedoMap = i.uv_texcoord * _DetailAlbedoMap_ST.xy + _DetailAlbedoMap_ST.zw;
float2 uv2_DetailNormalMap = i.uv3_texcoord3 * _DetailAlbedoMap_ST.xy + _DetailAlbedoMap_ST.zw;
#ifdef _DETALUSEUV3_ON
float2 staticSwitch280 = uv2_DetailNormalMap;
#else
float2 staticSwitch280 = uv0_DetailAlbedoMap;
#endif
float2 uv_DetailMask = i.uv_texcoord * _DetailMask_ST.xy + _DetailMask_ST.zw;
float4 tex2DNode25 = tex2D( _DetailMask, uv_DetailMask );
float3 lerpResult19 = lerp( UnpackScaleNormal( tex2D( _BumpMap, uv0_MainTex ), _BumpScale ) , UnpackScaleNormal( tex2D( _DetailNormalMap, staticSwitch280 ), _DetailNormalMapScale ) , tex2DNode25.a);
o.Normal = lerpResult19;
float4 lerpResult16 = lerp( tex2D( _MainTex, uv0_MainTex ) , tex2D( _DetailAlbedoMap, staticSwitch280 ) , tex2DNode25.a);
o.Albedo = ( lerpResult16 * _Color ).rgb;
float4 lerpResult18 = lerp( tex2D( _MetalicRAOGSmothnessA, uv0_MainTex ) , tex2D( _DetailMetalicRAOGSmothnessA, staticSwitch280 ) , tex2DNode25.a);
float4 break22 = lerpResult18;
o.Metallic = ( break22.r * _MetallicPower );
o.Smoothness = ( break22.a * _SmoothnessPower );
float clampResult31 = clamp( break22.g , ( 1.0 - _AmbientOcclusionPower ) , 1.0 );
o.Occlusion = clampResult31;
o.Alpha = 1;
}
ENDCG
}
Fallback "Diffuse"
}

View File

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

View File

@ -0,0 +1,102 @@
Shader "NatureManufacture Shaders/Trees/Tree Bark Specular"
{
Properties
{
_Color("Color", Color) = (1,1,1,0)
_MainTex("MainTex", 2D) = "white" {}
[NoScaleOffset]_BumpMap("BumpMap", 2D) = "bump" {}
_BumpScale("BumpScale", Range( 0 , 5)) = 1
[NoScaleOffset]_SpecularRGBSmothnessA("Specular (RGB) Smothness (A)", 2D) = "white" {}
_SpecularPower("Specular Power", Range( 0 , 2)) = 0
_SmoothnessPower("Smoothness Power", Range( 0 , 2)) = 0
[NoScaleOffset]_AmbientOcclusionG("Ambient Occlusion (G)", 2D) = "white" {}
_AmbientOcclusionPower("Ambient Occlusion Power", Range( 0 , 1)) = 1
_DetailMask("DetailMask", 2D) = "black" {}
_DetailAlbedoMap("DetailAlbedoMap", 2D) = "white" {}
[NoScaleOffset]_DetailNormal("Detail Normal", 2D) = "bump" {}
[Toggle(_DETALUSEUV3_ON)] _DetalUseUV3("Detal Use UV3", Float) = 0
_DetailNormalMapScale("DetailNormalMapScale", Range( 0 , 5)) = 1
[NoScaleOffset]_DetailSpecularRGBSmothnessA("Detail Specular (RGB) Smothness (A)", 2D) = "white" {}
[NoScaleOffset]_DetailAmbientOcclusionG("Detail Ambient Occlusion (G)", 2D) = "white" {}
_InitialBend("Wind Initial Bend", Float) = 1
_Stiffness("Wind Stiffness", Float) = 1
_Drag("Wind Drag", Float) = 1
[Toggle(_TOUCHREACTACTIVE_ON)] _TouchReactActive("TouchReactActive", Float) = 0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] _texcoord3( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" }
Cull Back
CGPROGRAM
#include "UnityStandardUtils.cginc"
#pragma target 3.0
#pragma multi_compile_instancing
#pragma shader_feature _TOUCHREACTACTIVE_ON
#pragma shader_feature _DETALUSEUV3_ON
#include "NMWindNoShiver.cginc"
#include "NM_indirect.cginc"
#pragma vertex vert
#pragma instancing_options procedural:setup
#pragma multi_compile GPU_FRUSTUM_ON __
#pragma surface surf StandardSpecular keepalpha addshadow fullforwardshadows dithercrossfade
struct Input
{
float2 uv_texcoord;
float2 uv3_texcoord3;
};
uniform float _BumpScale;
uniform sampler2D _BumpMap;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform float _DetailNormalMapScale;
uniform sampler2D _DetailNormal;
uniform sampler2D _DetailAlbedoMap;
uniform float4 _DetailAlbedoMap_ST;
uniform float4 _DetailNormal_ST;
uniform sampler2D _DetailMask;
uniform float4 _DetailMask_ST;
uniform float4 _Color;
uniform sampler2D _SpecularRGBSmothnessA;
uniform sampler2D _DetailSpecularRGBSmothnessA;
uniform float _SpecularPower;
uniform float _SmoothnessPower;
uniform sampler2D _AmbientOcclusionG;
uniform sampler2D _DetailAmbientOcclusionG;
uniform float _AmbientOcclusionPower;
void surf( Input i , inout SurfaceOutputStandardSpecular o )
{
float2 uv0_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
float2 uv0_DetailAlbedoMap = i.uv_texcoord * _DetailAlbedoMap_ST.xy + _DetailAlbedoMap_ST.zw;
float2 uv2_DetailNormal = i.uv3_texcoord3 * _DetailAlbedoMap_ST.xy + _DetailAlbedoMap_ST.zw;
#ifdef _DETALUSEUV3_ON
float2 staticSwitch123 = uv2_DetailNormal;
#else
float2 staticSwitch123 = uv0_DetailAlbedoMap;
#endif
float2 uv_DetailMask = i.uv_texcoord * _DetailMask_ST.xy + _DetailMask_ST.zw;
float4 tex2DNode25 = tex2D( _DetailMask, uv_DetailMask );
float3 lerpResult19 = lerp( UnpackScaleNormal( tex2D( _BumpMap, uv0_MainTex ), _BumpScale ) , UnpackScaleNormal( tex2D( _DetailNormal, staticSwitch123 ), _DetailNormalMapScale ) , tex2DNode25.a);
o.Normal = lerpResult19;
float4 lerpResult16 = lerp( tex2D( _MainTex, uv0_MainTex ) , tex2D( _DetailAlbedoMap, staticSwitch123 ) , tex2DNode25.a);
o.Albedo = ( lerpResult16 * _Color ).rgb;
float4 lerpResult18 = lerp( tex2D( _SpecularRGBSmothnessA, uv0_MainTex ) , tex2D( _DetailSpecularRGBSmothnessA, staticSwitch123 ) , tex2DNode25.a);
float4 break22 = lerpResult18;
float3 appendResult29 = (float3(break22.r , break22.g , break22.b));
o.Specular = ( appendResult29 * _SpecularPower );
o.Smoothness = ( break22.a * _SmoothnessPower );
float lerpResult30 = lerp( tex2D( _AmbientOcclusionG, uv0_MainTex ).g , tex2D( _DetailAmbientOcclusionG, staticSwitch123 ).g , tex2DNode25.a);
float clampResult34 = clamp( lerpResult30 , ( 1.0 - _AmbientOcclusionPower ) , 1.0 );
o.Occlusion = clampResult34;
o.Alpha = 1;
}
ENDCG
}
Fallback "Diffuse"
}

View File

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

View File

@ -0,0 +1,120 @@
Shader "NatureManufacture Shaders/Trees/Tree Leaves Metalic"
{
Properties
{
_Cutoff( "Mask Clip Value", Float ) = 0.4
_MainTex("MainTex", 2D) = "white" {}
_HealthyColor("Healthy Color", Color) = (1,0.9735294,0.9338235,1)
_DryColor("Dry Color", Color) = (0.8676471,0.818369,0.6124567,1)
_ColorNoiseSpread("Color Noise Spread", Float) = 50
[NoScaleOffset]_BumpMap("BumpMap", 2D) = "bump" {}
_BumpScale("BumpScale", Range( 0 , 3)) = 1
[NoScaleOffset]_MetalicRAOGSmothnessA("Metalic (R) AO (G) Smothness (A)", 2D) = "white" {}
_MetallicPower("Metallic Power", Range( 0 , 2)) = 0
_AmbientOcclusionPower("Ambient Occlusion Power", Range( 0 , 1)) = 1
_SmoothnessPower("Smoothness Power", Range( 0 , 2)) = 0
_InitialBend("Wind Initial Bend", Float) = 1
_Stiffness("Wind Stiffness", Float) = 1
_Drag("Wind Drag", Float) = 1
_ShiverDrag("Wind Shiver Drag", Float) = 0.05
_ShiverDirectionality("Wind Shiver Directionality", Range( 0 , 1)) = 0.5
[Toggle(_TOUCHREACTACTIVE_ON)] _TouchReactActive("TouchReactActive", Float) = 0
[Toggle]_BackFaceMirrorNormal("BackFace Mirror Normal", Float) = 0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "TransparentCutout" "Queue" = "AlphaTest+0" }
Cull Off
CGPROGRAM
#include "UnityStandardUtils.cginc"
#pragma target 3.0
#pragma multi_compile_instancing
#pragma shader_feature _TOUCHREACTACTIVE_ON
#include "NMWind.cginc"
#include "NM_indirect.cginc"
#pragma vertex vert
#pragma instancing_options procedural:setup
#pragma multi_compile GPU_FRUSTUM_ON __
#pragma surface surf Standard keepalpha addshadow fullforwardshadows dithercrossfade
struct Input
{
float2 uv_texcoord;
half ASEVFace : VFACE;
float3 worldPos;
};
uniform float _BackFaceMirrorNormal;
uniform float _BumpScale;
uniform sampler2D _BumpMap;
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform float4 _DryColor;
uniform float4 _HealthyColor;
uniform float _ColorNoiseSpread;
uniform sampler2D _MetalicRAOGSmothnessA;
uniform float _MetallicPower;
uniform float _SmoothnessPower;
uniform float _AmbientOcclusionPower;
uniform float _Cutoff = 0.4;
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
float snoise( float2 v )
{
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
float2 i = floor( v + dot( v, C.yy ) );
float2 x0 = v - i + dot( i, C.xx );
float2 i1;
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
float4 x12 = x0.xyxy + C.xxzz;
x12.xy -= i1;
i = mod2D289( i );
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
m = m * m;
m = m * m;
float3 x = 2.0 * frac( p * C.www ) - 1.0;
float3 h = abs( x ) - 0.5;
float3 ox = floor( x + 0.5 );
float3 a0 = x - ox;
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
float3 g;
g.x = a0.x * x0.x + h.x * x0.y;
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
return 130.0 * dot( m, g );
}
void surf( Input i , inout SurfaceOutputStandard o )
{
float2 uv0_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
float3 tex2DNode4 = UnpackScaleNormal( tex2D( _BumpMap, uv0_MainTex ), _BumpScale );
float3 switchResult233 = (((i.ASEVFace>0)?(tex2DNode4):(( tex2DNode4 * float3( -1,-1,-1 ) ))));
o.Normal = lerp(tex2DNode4,switchResult233,_BackFaceMirrorNormal);
float4 tex2DNode3 = tex2D( _MainTex, uv0_MainTex );
float3 ase_worldPos = i.worldPos;
float2 appendResult226 = (float2(ase_worldPos.x , ase_worldPos.z));
float simplePerlin2D228 = snoise( ( appendResult226 / _ColorNoiseSpread ) );
float4 lerpResult231 = lerp( _DryColor , _HealthyColor , simplePerlin2D228);
o.Albedo = ( tex2DNode3 * lerpResult231 ).rgb;
float4 tex2DNode28 = tex2D( _MetalicRAOGSmothnessA, uv0_MainTex );
o.Metallic = ( tex2DNode28.r * _MetallicPower );
o.Smoothness = ( tex2DNode28.a * _SmoothnessPower );
float clampResult39 = clamp( tex2DNode28.g , ( 1.0 - _AmbientOcclusionPower ) , 1.0 );
o.Occlusion = clampResult39;
o.Alpha = 1;
clip( tex2DNode3.a - _Cutoff );
}
ENDCG
}
Fallback "Diffuse"
}

View File

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

View File

@ -0,0 +1,117 @@
Shader "NatureManufacture Shaders/Trees/Tree_Leaves_Specular"
{
Properties
{
_Cutoff( "Mask Clip Value", Float ) = 0.5
_MainTex("MainTex", 2D) = "white" {}
_HealthyColor("Healthy Color", Color) = (1,0.9735294,0.9338235,1)
_DryColor("Dry Color", Color) = (0.8676471,0.818369,0.6124567,1)
_ColorNoiseSpread("Color Noise Spread", Float) = 50
[NoScaleOffset]_BumpMap("BumpMap", 2D) = "white" {}
_SpecularPower("Specular Power", Range( 0 , 2)) = 0
[NoScaleOffset]_AmbientOcclusionGSmoothnessA("Ambient Occlusion (G) Smoothness (A)", 2D) = "white" {}
_AmbientOcclusionPower("Ambient Occlusion Power", Range( 0 , 1)) = 1
_SmoothnessPower("Smoothness Power", Range( 0 , 2)) = 0
_InitialBend("Wind Initial Bend", Float) = 1
_Stiffness("Wind Stiffness", Float) = 1
_Drag("Wind Drag", Float) = 1
_ShiverDrag("Wind Shiver Drag", Float) = 0.05
_WindNormalInfluence("Wind Normal Influence", Float) = 0
_ShiverDirectionality("Wind Shiver Directionality", Range( 0 , 1)) = 0.5
[Toggle]_BackFaceMirrorNormal("BackFace Mirror Normal", Float) = 0
[Toggle(_TOUCHREACTACTIVE_ON)] _TouchReactActive("TouchReactActive", Float) = 0
[HideInInspector] _texcoord( "", 2D ) = "white" {}
[HideInInspector] __dirty( "", Int ) = 1
}
SubShader
{
Tags{ "RenderType" = "TransparentCutout" "Queue" = "AlphaTest+0" }
Cull Off
CGPROGRAM
#pragma target 3.0
#pragma multi_compile_instancing
#pragma shader_feature _TOUCHREACTACTIVE_ON
#include "NMWind.cginc"
#include "NM_indirect.cginc"
#pragma vertex vert
#pragma instancing_options procedural:setup
#pragma multi_compile GPU_FRUSTUM_ON __
#pragma surface surf StandardSpecular keepalpha addshadow fullforwardshadows dithercrossfade
struct Input
{
float2 uv_texcoord;
half ASEVFace : VFACE;
float3 worldPos;
};
uniform float _BackFaceMirrorNormal;
uniform sampler2D _BumpMap;
uniform sampler2D _MainTex;
uniform float4 _DryColor;
uniform float4 _HealthyColor;
uniform float _ColorNoiseSpread;
uniform float _SpecularPower;
uniform sampler2D _AmbientOcclusionGSmoothnessA;
uniform float _SmoothnessPower;
uniform float _AmbientOcclusionPower;
uniform float _Cutoff = 0.5;
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
float snoise( float2 v )
{
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
float2 i = floor( v + dot( v, C.yy ) );
float2 x0 = v - i + dot( i, C.xx );
float2 i1;
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
float4 x12 = x0.xyxy + C.xxzz;
x12.xy -= i1;
i = mod2D289( i );
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
m = m * m;
m = m * m;
float3 x = 2.0 * frac( p * C.www ) - 1.0;
float3 h = abs( x ) - 0.5;
float3 ox = floor( x + 0.5 );
float3 a0 = x - ox;
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
float3 g;
g.x = a0.x * x0.x + h.x * x0.y;
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
return 130.0 * dot( m, g );
}
void surf( Input i , inout SurfaceOutputStandardSpecular o )
{
float3 tex2DNode4 = UnpackNormal( tex2D( _BumpMap, i.uv_texcoord ) );
float3 switchResult365 = (((i.ASEVFace>0)?(tex2DNode4):(( tex2DNode4 * float3( -1,-1,-1 ) ))));
o.Normal = lerp(tex2DNode4,switchResult365,_BackFaceMirrorNormal);
float4 tex2DNode3 = tex2D( _MainTex, i.uv_texcoord );
float3 ase_worldPos = i.worldPos;
float2 appendResult357 = (float2(ase_worldPos.x , ase_worldPos.z));
float simplePerlin2D347 = snoise( ( appendResult357 / _ColorNoiseSpread ) );
float4 lerpResult363 = lerp( _DryColor , _HealthyColor , simplePerlin2D347);
float4 temp_output_35_0 = ( tex2DNode3 * lerpResult363 );
o.Albedo = temp_output_35_0.rgb;
o.Specular = ( temp_output_35_0 * _SpecularPower ).rgb;
float4 tex2DNode37 = tex2D( _AmbientOcclusionGSmoothnessA, i.uv_texcoord );
o.Smoothness = ( tex2DNode37.a * _SmoothnessPower );
float clampResult41 = clamp( tex2DNode37.g , ( 1.0 - _AmbientOcclusionPower ) , 1.0 );
o.Occlusion = clampResult41;
o.Alpha = 1;
clip( tex2DNode3.a - _Cutoff );
}
ENDCG
}
Fallback "Diffuse"
}

View File

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

View File