浏览代码

gradient assets

/main
MingWai 8 年前
当前提交
b038c97f
共有 14 个文件被更改,包括 484 次插入15 次删除
  1. 2
      MaterialGraphProject/Assets/_MingWai/Unlit_Wathever.mat
  2. 8
      MaterialGraphProject/Assets/_MingWai/Gradient.asset
  3. 244
      MaterialGraphProject/Assets/TestAssets/portrait_mask.png
  4. 84
      MaterialGraphProject/Assets/TestAssets/portrait_mask.png.meta
  5. 101
      MaterialGraphProject/Assets/_MingWai/GradientShader.shader
  6. 10
      MaterialGraphProject/Assets/_MingWai/GradientShader.shader.meta
  7. 1
      MaterialGraphProject/Assets/_MingWai/GradientTexture.ShaderGraph
  8. 9
      MaterialGraphProject/Assets/_MingWai/GradientTexture.ShaderGraph.meta
  9. 21
      MaterialGraphProject/Assets/_MingWai/UnityEngine.MaterialGraph.ExportTextureMasterNodee933fd86-9b63-40a2-9321-e857830b2339.mat
  10. 9
      MaterialGraphProject/Assets/_MingWai/UnityEngine.MaterialGraph.ExportTextureMasterNodee933fd86-9b63-40a2-9321-e857830b2339.mat.meta
  11. 9
      MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph.meta
  12. 1
      MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph
  13. 0
      /MaterialGraphProject/Assets/_MingWai/Gradient.asset.meta
  14. 0
      /MaterialGraphProject/Assets/_MingWai/Gradient.asset

2
MaterialGraphProject/Assets/_MingWai/Unlit_Wathever.mat


serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 8080b3773b9568a46bcaaf9b18512990, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: []

8
MaterialGraphProject/Assets/_MingWai/Gradient.asset


m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: New Custom Texture
m_Name: Gradient
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000

m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_Material: {fileID: 0}
m_Material: {fileID: 2100000, guid: 0a9ee03ce6ea51f4e92acb81546fefc1, type: 2}
m_UpdateMode: 0
m_InitializationMode: 2
m_UpdateMode: 1
m_InitializationMode: 1
m_UpdateZoneSpace: 0
m_CurrentUpdateZoneSpace: 0
m_UpdateZones: []

244
MaterialGraphProject/Assets/TestAssets/portrait_mask.png

之前 之后
宽度: 256  |  高度: 256  |  大小: 29 KiB

84
MaterialGraphProject/Assets/TestAssets/portrait_mask.png.meta


fileFormatVersion: 2
guid: 28f8651cc7780724692679226b6de1ba
timeCreated: 1495753817
licenseType: Pro
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 4
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
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
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}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
- buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

101
MaterialGraphProject/Assets/_MingWai/GradientShader.shader


Shader "UnityEngine.MaterialGraph.ExportTextureMasterNode31754f39-6eb9-4773-ae21-b2fca7f2fcde"
{
Properties
{
}
SubShader
{
Tags{ "Queue" = "Geometry" "IgnoreProjector" = "True" "RenderType" = "Opaque" }
ZWrite Off
Blend One Zero
Pass
{
CGPROGRAM
#include "UnityCustomRenderTexture.cginc"
#pragma vertex CustomRenderTextureVertexShader
#pragma fragment frag
#pragma target 4.0
v2f_customrendertexture CustomRenderTextureVertexShader_Preview(appdata_base IN)
{
v2f_customrendertexture OUT;
OUT.vertex = UnityObjectToClipPos(IN.vertex);
OUT.primitiveID = 0;//TODO
OUT.localTexcoord = IN.texcoord;
OUT.globalTexcoord = IN.texcoord;
OUT.direction = CustomRenderTextureComputeCubeDirection(OUT.globalTexcoord.xy);
return OUT;
}
inline void unity_Gradient_float(float v, out float4 finalColor, out float finalR, out float finalG, out float finalB, out float finalA)
{
float3 color0 = float3(0.1176471,0.08960744,0.07439446);
float colorp0 = 0;
float3 color1 = float3(0,0,0);
float colorp1 = 0.1147021;
float3 color2 = float3(0.2132353,0.07766853,0);
float colorp2 = 0.2500038;
float3 color3 = float3(0.6364486,0.2844907,0);
float colorp3 = 0.3764706;
float3 color4 = float3(1,0.9310344,0);
float colorp4 = 0.5058824;
float3 color5 = float3(1,1,1);
float colorp5 = 0.6529488;
float3 color6 = float3(1,0.6413793,0);
float colorp6 = 0.7823606;
float3 color7 = float3(0.4779412,0.353851,0.02811421);
float colorp7 = 1;
float3 gradcolor = color0;
float colorLerpPosition0 = smoothstep(colorp0,colorp1,v);
gradcolor = lerp(gradcolor,color1,colorLerpPosition0);
float colorLerpPosition1 = smoothstep(colorp1,colorp2,v);
gradcolor = lerp(gradcolor,color2,colorLerpPosition1);
float colorLerpPosition2 = smoothstep(colorp2,colorp3,v);
gradcolor = lerp(gradcolor,color3,colorLerpPosition2);
float colorLerpPosition3 = smoothstep(colorp3,colorp4,v);
gradcolor = lerp(gradcolor,color4,colorLerpPosition3);
float colorLerpPosition4 = smoothstep(colorp4,colorp5,v);
gradcolor = lerp(gradcolor,color5,colorLerpPosition4);
float colorLerpPosition5 = smoothstep(colorp5,colorp6,v);
gradcolor = lerp(gradcolor,color6,colorLerpPosition5);
float colorLerpPosition6 = smoothstep(colorp6,colorp7,v);
gradcolor = lerp(gradcolor,color7,colorLerpPosition6);
float alpha0 = 1;
float alphap0 = 0;
float alpha1 = 1;
float alphap1 = 1;
float gradalpha = alpha0;
float alphaLerpPosition0 = smoothstep(alphap0,alphap1,v);
gradalpha = lerp(gradalpha,alpha1,alphaLerpPosition0);
finalColor = float4(gradcolor,gradalpha);
finalR = finalColor.r;
finalG = finalColor.g;
finalB = finalColor.b;
finalA = finalColor.a;
}
float4 frag(v2f_customrendertexture IN) : COLOR
{
half4 uv0 = float4(IN.localTexcoord.xyz,1.0);
float4 UV_49a5272a_c49d_4f7e_94ba_3a2e27fcbed4_UV = uv0;
float4 Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalColor;
float Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalR;
float Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalG;
float Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalB;
float Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalA;
unity_Gradient_float(UV_49a5272a_c49d_4f7e_94ba_3a2e27fcbed4_UV, Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalColor, Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalR, Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalG, Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalB, Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalA);
return Gradient_9866089f_0763_409d_904a_c1f7836ea742_finalColor;
}
ENDCG
}
}
Fallback Off
}

10
MaterialGraphProject/Assets/_MingWai/GradientShader.shader.meta


fileFormatVersion: 2
guid: 5aa1351ad9e754747b68549dbdc6971e
timeCreated: 1495753069
licenseType: Pro
ShaderImporter:
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

1
MaterialGraphProject/Assets/_MingWai/GradientTexture.ShaderGraph
文件差异内容过多而无法显示
查看文件

9
MaterialGraphProject/Assets/_MingWai/GradientTexture.ShaderGraph.meta


fileFormatVersion: 2
guid: 7da779631b3abb64da5b34a8ac4b5011
timeCreated: 1495753206
licenseType: Pro
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

21
MaterialGraphProject/Assets/_MingWai/UnityEngine.MaterialGraph.ExportTextureMasterNodee933fd86-9b63-40a2-9321-e857830b2339.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UnityEngine.MaterialGraph.ExportTextureMasterNodee933fd86-9b63-40a2-9321-e857830b2339
m_Shader: {fileID: 4800000, guid: 7da779631b3abb64da5b34a8ac4b5011, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Floats: []
m_Colors: []

9
MaterialGraphProject/Assets/_MingWai/UnityEngine.MaterialGraph.ExportTextureMasterNodee933fd86-9b63-40a2-9321-e857830b2339.mat.meta


fileFormatVersion: 2
guid: 0a9ee03ce6ea51f4e92acb81546fefc1
timeCreated: 1495753275
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

9
MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph.meta


fileFormatVersion: 2
guid: ff2b03d7feb67a145835ad8adae9e0ad
timeCreated: 1495742113
licenseType: Pro
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

1
MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph
文件差异内容过多而无法显示
查看文件

/MaterialGraphProject/Assets/_MingWai/New Custom Texture.asset.meta → /MaterialGraphProject/Assets/_MingWai/Gradient.asset.meta

/MaterialGraphProject/Assets/_MingWai/New Custom Texture.asset → /MaterialGraphProject/Assets/_MingWai/Gradient.asset

正在加载...
取消
保存