Initial commit

This commit is contained in:
msk
2022-01-22 20:13:49 -08:00
parent f9d23e5bcf
commit 687473573d
878 changed files with 70957 additions and 0 deletions
@@ -0,0 +1,82 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file CarPaintFastClearCoat.cginc
/// @brief Car Paint surface shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_CAR_PAINT_FAST_CLEARCOAT_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_CAR_PAINT_FAST_CLEARCOAT_CGINC
#define A_METALLIC_ON
#define A_CLEARCOAT_ON
#define A_MAIN_TEXTURES_ON
#define A_CAR_PAINT_ON
#ifndef A_NORMAL_WORLD_ON
#define A_NORMAL_WORLD_ON
#endif
#ifndef A_VIEW_DIR_WORLD_ON
#define A_VIEW_DIR_WORLD_ON
#endif
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
/// Clear Coat weight.
/// Expects values in the range [0,1].
half _CarPaintClearCoatWeight;
/// Clear Coat roughness.
/// Expects values in the range [0,1].
half _CarPaintClearCoatRoughness;
void aSurfaceShader(
inout ASurface s)
{
aParallax(s);
aDissolve(s);
aMainTextures(s);
aDetail(s);
aTeamColor(s);
s.mask = s.opacity;
// Multi-layer car paint.
// cf http://www.elliottpacel.co.uk/blog/pbr-practice
// cf http://blenderartists.org/forum/showthread.php?250127-Car-Paint-Materials-Iridescent-Layers-Carbon-Fiber-Leather&p=2083499&viewfull=1#post2083499
// Two-Tone Paint
half secondaryColorFalloff = 1.0h - pow(s.NdotV, 0.1 + 9.9h * _CarSecondaryColorFalloff);
half secondaryColorWeight = _CarSecondaryColorWeight * secondaryColorFalloff;
half3 paintColor = lerp(_CarPrimaryColor, _CarSecondaryColor, secondaryColorWeight);
s.baseColor *= aLerpWhiteTo(paintColor, s.mask);
// Metal Flakes
// NOTE: Metal brightness will overpower clearcoat, hiding roughness difference.
float2 flakeUv = A_TEX_TRANSFORM_UV(s, _CarFlakeMap);
half4 flakes = _CarFlakeColor * tex2D(_CarFlakeMap, flakeUv);
half flakeMask = pow(flakes.a, _CarFlakeMapFalloff);
half flakeSpread = pow(s.NdotV, _CarFlakeSpread * -9.9h + 10.0h); //[10,0]
half flakeWeight = s.mask * flakeMask * flakeSpread * _CarFlakeWeight;
s.baseColor = lerp(s.baseColor, flakes.rgb, flakeWeight);
s.metallic = lerp(s.metallic, 1.0h, flakeWeight);
s.roughness = lerp(s.roughness, 1.0h, flakeWeight * _CarFlakeHighlightSpread);
s.clearCoat = s.mask * _CarPaintClearCoatWeight;
s.clearCoatRoughness = _CarPaintClearCoatRoughness;
s.mask = 1.0h;
aAo2(s);
aDecal(s);
aWetness(s);
aEmission(s);
aRim(s);
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_CAR_PAINT_FAST_CLEARCOAT_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 910b1e25f2acf2e428595ac48716fb57
timeCreated: 1467590645
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,35 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file CarPaint.cginc
/// @brief Car Paint surface shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_CAR_PAINT_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_CAR_PAINT_CGINC
#define _ALPHABLEND_ON
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
half4 _ClearCoatColor;
half _ClearCoatRoughness;
void aSurfaceShader(
inout ASurface s)
{
aParallax(s);
aDissolve(s);
// Clear coat should only appear over car paint mask.
half4 base = _Color * aSampleBase(s);
s.opacity = base.a * _ClearCoatColor.a;
s.baseColor = _ClearCoatColor.rgb;
s.roughness = _ClearCoatRoughness;
s.specularity = 0.5h;
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_CAR_PAINT_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 96dbfa1e0991a4e42922c3df87494ba7
timeCreated: 1448116598
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,32 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file Unlit.cginc
/// @brief Unlit surface shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_UNLIT_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_UNLIT_CGINC
#define A_POSITION_WORLD_ON
#define A_NORMAL_WORLD_ON
#define A_EMISSIVE_COLOR_ON
#include "Assets/Alloy/Shaders/Lighting/Unlit.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
half _CurvatureScale;
void aSurfaceShader(
inout ASurface s)
{
// Otherwise stick with ddx or dFdx, which can be replaced with fwidth.
float deltaWorldNormal = length(fwidth(s.normalWorld));
float deltaWorldPosition = length(fwidth(s.positionWorld));
s.emissiveColor = ((deltaWorldNormal / deltaWorldPosition) * _CurvatureScale).rrr;
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_UNLIT_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ebbe8b74502696940a26a58cc829eccc
timeCreated: 1431312196
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,92 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file DeferredDecal.cginc
/// @brief Deferred Decal surface shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_DECAL_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_DECAL_CGINC
#define A_METALLIC_ON
#define A_AMBIENT_OCCLUSION_ON
#define A_SURFACE_CUSTOM_FIELDS \
half decalMask2;
#include "Assets/Alloy/Shaders/Framework/Type.cginc"
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
half3 _GlowColor;
half _RoughnessMin;
half _RoughnessMax;
half _AoAsCavity;
half _BaseColorWeight;
half _NormalsWeight;
void aVertexShader(
inout AVertex v)
{
aStandardVertexShader(v);
}
void aColorShader(
inout half4 color,
ASurface s)
{
aStandardColorShader(v);
}
void aGbufferShader(
inout AGbuffer gb,
ASurface s)
{
#ifdef A_DECAL_ALPHA_FIRSTPASS_SHADER
gb.diffuseOcclusion.a = s.decalMask2;
gb.specularSmoothness.a = s.opacity;
gb.normalType.a = s.opacity;
gb.emissionSubsurface.a = s.decalMask2;
#ifdef A_SHADOW_MASKS_BUFFER_ON
gb.shadowMasks.a = s.opacity;
#endif
#else
gb.diffuseOcclusion.a *= s.decalMask2;
gb.specularSmoothness.a *= s.opacity;
gb.normalType.a *= s.opacity;
gb.emissionSubsurface.a *= s.decalMask2; // TODO: Apply AO to emission for outside areas' ambient.
#ifdef A_SHADOW_MASKS_BUFFER_ON
gb.shadowMasks.a *= s.opacity;
#endif
#endif
}
void aSurfaceShader(
inout ASurface s)
{
s.baseUv = A_BV(s, A_TEX_TRANSFORM_UV_SCROLL(s, _SpecTex));
s.baseTiling = _SpecTex_ST.xy;
aParallax(s);
s.baseColor = _Color.rgb * aBaseVertexColorTint(s);
half4 material = aSampleMaterial(s);
s.opacity = _Color.a * material.A_SPECULARITY_CHANNEL;
//s.emissiveColor = _GlowColor * material.A_METALLIC_CHANNEL;
s.decalMask2 = material.A_METALLIC_CHANNEL;
s.metallic = _Metal;
s.ambientOcclusion = aLerpOneTo(material.A_AO_CHANNEL, _Occlusion);
s.specularity = _Specularity;
s.roughness = lerp(_RoughnessMin, _RoughnessMax, material.A_ROUGHNESS_CHANNEL);
s.baseColor *= aLerpOneTo(s.ambientOcclusion, _AoAsCavity);
s.normalTangent = A_NT(s, aSampleBump(s));
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_DECAL_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 2c3e9b58eadb3cc48af3a218a28bd251
timeCreated: 1448636753
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,49 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file IntersectionGlow.cginc
/// @brief IntersectionGlow shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_INTERSECTION_GLOW_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_INTERSECTION_GLOW_CGINC
#define _ALPHAPREMULTIPLY_ON
#define A_VIEW_DEPTH_ON
#define A_SCREEN_UV_ON
#define A_AMBIENT_OCCLUSION_ON
#define A_EMISSIVE_COLOR_ON
#define A_MAIN_TEXTURES_ON
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
sampler2D_float _CameraDepthTexture;
half3 _ScanLineColor;
half _ScanLineWeight;
half _ScanLineWidth;
void aSurfaceShader(
inout ASurface s)
{
#ifdef _INTERSECTION_GLOW_BACKFACE
s.baseColor = 0.0h;
s.opacity = 0.0h;
s.ambientOcclusion = 0.0h;
#else
aMainTextures(s);
aRim(s);
aEmission(s);
#endif
float sceneZ = LinearEyeDepth(SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, s.screenUv));
float fade = saturate(sceneZ - s.viewDepth);
half scan = step(1.0h - _ScanLineWidth, 1.0h - fade);
s.emissiveColor = lerp(s.emissiveColor, _ScanLineColor * _ScanLineWeight, scan);
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_INTERSECTION_GLOW_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 90ddd208522210e4a8a8142de07104d1
timeCreated: 1445983680
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,56 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file Core.cginc
/// @brief Core & Glass surface shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_CORE_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_CORE_CGINC
#define A_MAIN_TEXTURES_ON
#define A_DETAIL_MASK_OFF
#define A_EMISSION_MASK_MAP_OFF
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
sampler2D _MasksMap;
half4 _DetailMasks;
half4 _EmissionMasks;
half4 _RimMasks;
void aSurfaceShader(
inout ASurface s)
{
aParallax(s);
aDissolve(s);
aMainTextures(s);
#if defined(A_DETAIL_ON) || defined(A_EMISSION_ON) || defined(A_RIM_ON)
half4 masks = tex2D(_MasksMap, s.baseUv);
#endif
#ifdef A_DETAIL_ON
s.mask = aDotClamp(_DetailMasks, masks);
aDetail(s);
s.mask = 1.0h;
#endif
aTeamColor(s);
aAo2(s);
aDecal(s);
aWetness(s);
#ifdef A_EMISSION_ON
s.mask = aGammaToLinear(aDotClamp(_EmissionMasks, masks));
aEmission(s);
#endif
#ifdef A_RIM_ON
s.mask = aGammaToLinear(aDotClamp(_RimMasks, masks));
aRim(s);
#endif
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_CORE_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 9b8f57f51f9d4af42aac423cd316e40a
timeCreated: 1447985958
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,51 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file MeshParticleCore.cginc
/// @brief Shader designed for emissive mesh particles.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_MESHPARTICLECORE_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_MESHPARTICLECORE_CGINC
#ifndef A_VERTEX_COLOR_IS_DATA
#define A_VERTEX_COLOR_IS_DATA
#endif
#define A_METALLIC_ON
#define A_EMISSIVE_COLOR_ON
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
sampler2D _BaseColorRamp;
sampler2D _EmissionColorRamp;
// Assumes these are in linear space.
half _EmissionMin;
half _EmissionMax;
void aSurfaceShader(
inout ASurface s)
{
aDissolve(s);
half4 base = _Color;
s.baseColor = base.rgb * tex2D(_BaseColorRamp, float2(s.vertexColor.r, 0.0f)).rgb;
s.opacity = base.a;
aCutout(s);
s.metallic = _Metal;
s.specularity = _Specularity;
s.roughness = _Roughness;
half3 emissionColor = tex2D(_EmissionColorRamp, float2(s.vertexColor.g, 0.0f)).rgb;
s.emissiveColor += emissionColor * lerp(_EmissionMin, _EmissionMax, s.vertexColor.a);
aRim(s);
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_MESHPARTICLECORE_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: d6e327e0f6664094991c834841a0d1b5
timeCreated: 1453767149
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,85 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file SPCarPaint.cginc
/// @brief SP Car Paint surface shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_SP_CAR_PAINT_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_SP_CAR_PAINT_CGINC
#define A_CLEARCOAT_ON
#define A_MAIN_TEXTURES_ON
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
/// The secondary paint tint color.
/// Expects a linear LDR color.
half3 _CarPaintSecondaryColor;
/// The tertiary paint tint color.
/// Expects a linear LDR color.
half3 _CarPaintTertiaryColor;
/// Clear Coat weight.
/// Expects values in the range [0,1].
half _CarPaintClearCoatWeight;
/// Clear Coat roughness.
/// Expects values in the range [0,1].
half _CarPaintClearCoatRoughness;
/// The metallic flake tint color.
/// Expects a linear LDR color.
half3 _CarPaintFlakeColor;
/// Flake normal map.
/// Expects a compressed normal map.
A_SAMPLER_2D(_CarPaintFlakeNormalMap);
/// Flake weight.
/// Expects values in the range [0,1].
half _CarPaintFlakeWeight;
void aSurfaceShader(
inout ASurface s)
{
aParallax(s);
aDissolve(s);
aMainTextures(s);
aDetail(s);
aTeamColor(s);
s.mask = s.opacity;
// Two-tone car paint with metal flakes.
// http://www.chrisoat.com/papers/Oat-Tatarchuk-Isidoro-Layered_Car_Paint_Shader_Print.pdf
float2 flakeUv = A_TEX_TRANSFORM_UV(s, _CarPaintFlakeNormalMap);
half3 flakeNormalTangent = UnpackScaleNormal(tex2D(_CarPaintFlakeNormalMap, flakeUv), 1.0h);
half3 paintNpWorld = aTangentToWorld(s, 0.2h * flakeNormalTangent + s.normalTangent);
half3 flakeNpWorld = aTangentToWorld(s, _CarPaintFlakeWeight * flakeNormalTangent + s.normalTangent);
half fresnel1 = aDotClamp(paintNpWorld, s.viewDirWorld);
half fresnel2 = aDotClamp(flakeNpWorld, s.viewDirWorld);
half fresnel1Sq = fresnel1 * fresnel1;
half3 paintColor = fresnel1 * s.baseColor +
fresnel1Sq * _CarPaintSecondaryColor +
fresnel1Sq * fresnel1Sq * _CarPaintTertiaryColor +
pow(fresnel2, 16.0h) * _CarPaintFlakeColor;
// Clear Coat
s.baseColor = lerp(s.baseColor, paintColor, s.mask);
s.clearCoat = s.mask * _CarPaintClearCoatWeight;
s.clearCoatRoughness = _CarPaintClearCoatRoughness;
s.mask = 1.0h;
aAo2(s);
aDecal(s);
aWetness(s);
aEmission(s);
aRim(s);
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_SP_CAR_PAINT_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 714d054b44b320c428841fc069b26933
timeCreated: 1460926894
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,76 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file Skin.cginc
/// @brief Skin surface shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_SKIN_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_SKIN_CGINC
#ifndef A_VERTEX_COLOR_IS_DATA
#define A_VERTEX_COLOR_IS_DATA
#endif
#define A_NORMAL_MAPPING_ON
#define A_SKIN_TEXTURES_ON
#define A_DETAIL_MASK_VERTEX_COLOR_ALPHA_ON
#define A_DETAIL_COLOR_MAP_OFF
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
// Red Detail.
half _RedDetailMaskStrength;
A_SAMPLER_2D(_RedDetailNormalMap);
half _RedDetailWeight;
half _RedDetailNormalMapScale;
// Green Detail.
half _GreenDetailMaskStrength;
A_SAMPLER_2D(_GreenDetailNormalMap);
half _GreenDetailWeight;
half _GreenDetailNormalMapScale;
// Blue Detail.
half _BlueDetailMaskStrength;
A_SAMPLER_2D(_BlueDetailNormalMap);
half _BlueDetailWeight;
half _BlueDetailNormalMapScale;
void aSurfaceShader(
inout ASurface s)
{
aParallax(s);
aDissolve(s);
aSkinTextures(s);
// Red Detail.
half mask = _RedDetailWeight * aLerpOneTo(s.vertexColor.r, _RedDetailMaskStrength);
float2 detailUv = A_TEX_TRANSFORM_UV_SCROLL(s, _RedDetailNormalMap);
half3 detailNormalTangent = UnpackScaleNormal(tex2D(_RedDetailNormalMap, detailUv), mask * _RedDetailNormalMapScale);
s.normalTangent = A_NT(s, BlendNormals(s.normalTangent, detailNormalTangent));
// Green Detail.
mask = _GreenDetailWeight * aLerpOneTo(s.vertexColor.g, _GreenDetailMaskStrength);
detailUv = A_TEX_TRANSFORM_UV_SCROLL(s, _GreenDetailNormalMap);
detailNormalTangent = UnpackScaleNormal(tex2D(_GreenDetailNormalMap, detailUv), mask * _GreenDetailNormalMapScale);
s.normalTangent = A_NT(s, BlendNormals(s.normalTangent, detailNormalTangent));
// Blue Detail.
mask = _BlueDetailWeight * aLerpOneTo(s.vertexColor.b, _BlueDetailMaskStrength);
detailUv = A_TEX_TRANSFORM_UV_SCROLL(s, _BlueDetailNormalMap);
detailNormalTangent = UnpackScaleNormal(tex2D(_BlueDetailNormalMap, detailUv), mask * _BlueDetailNormalMapScale);
s.normalTangent = A_NT(s, BlendNormals(s.normalTangent, detailNormalTangent));
aDetail(s);
aTeamColor(s);
aDecal(s);
aWetness(s);
aRim(s);
aEmission(s);
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_SKIN_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8b769521a5e9c1f42a85b0ba36d66ae1
timeCreated: 1476307263
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,31 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file TransitionLite.cginc
/// @brief Transition Lite shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_TRANSITION_LITE_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_TRANSITION_LITE_CGINC
#define A_DISSOLVE_GLOW_OFF
#define A_MAIN_TEXTURES_ON
#define A_TRANSITION_BLEND_ON
#define A_TRANSITION_BLEND_GLOW_OFF
#define A_SECONDARY_TEXTURES_ON
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
void aSurfaceShader(
inout ASurface s)
{
aDissolve(s);
aMainTextures(s);
aTransitionBlend(s);
aSecondaryTextures(s);
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_TRANSITION_LITE_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: cb517d364100f4c4e91c0e8cbbd68719
timeCreated: 1457402665
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,84 @@
// Alloy Physical Shader Framework
// Copyright 2013-2017 RUST LLC.
// http://www.alloy.rustltd.com/
/////////////////////////////////////////////////////////////////////////////////
/// @file WeatheredBlend.cginc
/// @brief Weathered Blend shader definition.
/////////////////////////////////////////////////////////////////////////////////
#ifndef ALLOY_MODS_SHADERS_DEFINITION_WEATHERED_BLEND_CGINC
#define ALLOY_MODS_SHADERS_DEFINITION_WEATHERED_BLEND_CGINC
#define A_METALLIC_ON
#define A_AMBIENT_OCCLUSION_ON
#define A_MAIN_TEXTURES_ON
#define A_MAIN_TEXTURES_CUTOUT_OFF
#define A_EMISSION_MASK_MAP_OFF
#define A_EMISSION_EFFECTS_MAP_OFF
#define A_RIM_EFFECTS_MAP_OFF
#define A_SECONDARY_TEXTURES_ON
#include "Assets/Alloy/Shaders/Lighting/Standard.cginc"
#include "Assets/Alloy/Shaders/Type/Standard.cginc"
A_SAMPLER_2D(_Layered2MatPackedMap);
sampler2D _Layered2MatBumpMap;
sampler2D _Layered2MatPackedFxMap;
half _Layered2MatOxidation;
half3 _Layered2MatDustTint;
half _Layered2MatDustiness;
half _Layered2MatRougherness;
half _Layered2MatOcclusion;
half _Layered2MatBumpScale;
float _DecalMode;
void aSurfaceShader(
inout ASurface s)
{
s.baseUv = A_BV(s, A_TEX_TRANSFORM_UV(s, _Layered2MatPackedMap));
s.baseTiling = _Layered2MatPackedMap_ST.xy;
aParallax(s);
half4 packedMap = tex2D(_Layered2MatPackedMap, s.baseUv);
half3 normals = UnpackScaleNormal(tex2D(_Layered2MatBumpMap, s.baseUv), _Layered2MatBumpScale);
half4 packedFx = tex2D(_Layered2MatPackedFxMap, s.baseUv);
s.baseUv = A_BV(s, A_TEX_TRANSFORM_UV_SCROLL(s, _MainTex));
aMainTextures(s);
s.mask = 1.0h - packedMap.a;
aSecondaryTextures(s);
aCutout(s);
s.normalTangent = A_NT(s, BlendNormals(s.normalTangent, normals));
s.ambientOcclusion *= aOcclusionStrength(packedMap.g, _Layered2MatOcclusion);
s.mask = packedMap.r;
aDetail(s);
s.mask = _DecalMode < 0.5f ? 1.0h : (_DecalMode < 1.5f ? packedMap.a : 1.0h - packedMap.a);
aDecal(s);
s.mask = 1.0h;
aWetness(s);
half curvature = packedMap.b;
s.baseColor *= lerp(_Layered2MatDustTint, A_WHITE, curvature);
s.specularity = lerp(s.specularity * (1.0h - _Layered2MatDustiness), s.specularity, curvature);
s.metallic = lerp(s.metallic * (1.0h - _Layered2MatOxidation), s.metallic, curvature);
s.roughness = lerp(lerp(s.roughness, 1.0h, _Layered2MatRougherness), s.roughness, curvature);
#ifdef A_EMISSION_ON
float2 incandescenceUv = A_TEX_TRANSFORM_UV_SCROLL(s, _IncandescenceMap);
s.mask = aGammaToLinear(packedFx.r * tex2D(_Layered2MatPackedFxMap, incandescenceUv).g);
aEmission(s);
#endif
#ifdef A_RIM_ON
float2 rimUv = A_TEX_TRANSFORM_UV_SCROLL(s, _RimTex);
s.mask = aGammaToLinear(packedFx.b * tex2D(_Layered2MatPackedFxMap, rimUv).a);
aRim(s);
#endif
}
#endif // ALLOY_MODS_SHADERS_DEFINITION_WEATHERED_BLEND_CGINC
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1cb3b1cc14873fb47a214688e355bd37
timeCreated: 1429547227
licenseType: Pro
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant: