浏览代码
Upped shadow resolution
Upped shadow resolution
Turned stripping back on Turned on MSAA, turned off FXAA Added new Cascade keyword Moved Texture2DArray script back into an editor folder Cleaned up some old files Updated submodule/main
Andre McGrail
7 年前
当前提交
c7f157b7
共有 13 个文件被更改,包括 49 次插入 和 413 次删除
-
6Assets/LightweightAsset.asset
-
2Assets/Scripts/Editor.meta
-
1Assets/Shaders/LWVegetationShader.shader
-
120Assets/scenes/Island.unity
-
84Assets/Shaders/LWBasicTess.mat
-
8Assets/Shaders/LWBasicTess.mat.meta
-
127Assets/Shaders/LWBasicTess.shader
-
9Assets/Shaders/LWBasicTess.shader.meta
-
97Assets/Shaders/metaTest.mat
-
8Assets/Shaders/metaTest.mat.meta
-
0/Assets/Scripts/Editor/CreateTexture2DArrayAsset.cs
-
0/Assets/Scripts/Editor/CreateTexture2DArrayAsset.cs.meta
|
|||
%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: LWBasicTess |
|||
m_Shader: {fileID: 4800000, guid: b5d14b5fa694e43f494af0f3b3c8397e, type: 3} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _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} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _LW: 0 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _TessellationEdgeLength: 35 |
|||
- _UVSec: 0 |
|||
- _WorkflowMode: 1 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _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} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0c8c0406dabc64981a61dc943207a18c |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Unlit/LWBasicTess" |
|||
{ |
|||
Properties |
|||
{ |
|||
[Toggle(_LW)] |
|||
_LW ("LightWeight vs Legacy", Float) = 0 |
|||
_TessellationEdgeLength ("Tessellation Edge Length", FLoat) = 35 |
|||
} |
|||
SubShader |
|||
{ |
|||
Tags { "RenderType"="Opaque" "RenderPipeline" = "LightweightPipeline"} |
|||
LOD 100 |
|||
|
|||
Pass |
|||
{ |
|||
HLSLPROGRAM |
|||
#pragma vertex vert |
|||
#pragma hull hull |
|||
#pragma domain domain |
|||
#pragma fragment frag |
|||
|
|||
#pragma shader_feature _LW |
|||
|
|||
#ifdef _LW |
|||
#include "LWRP/ShaderLibrary/Core.hlsl" |
|||
#else |
|||
#include "UnityCG.cginc" |
|||
#endif |
|||
|
|||
struct appdata |
|||
{ |
|||
float4 vertex : POSITION; |
|||
}; |
|||
|
|||
struct tessCP |
|||
{ |
|||
float4 vertex : INTERNALTESSPOS; |
|||
}; |
|||
|
|||
struct HS_ConstantOutput |
|||
{ |
|||
float TessFactor[3] : SV_TessFactor; |
|||
float InsideTessFactor : SV_InsideTessFactor; |
|||
}; |
|||
|
|||
struct v2f |
|||
{ |
|||
float4 vertex : SV_POSITION; |
|||
float3 col : TEXCOORD0; |
|||
}; |
|||
|
|||
//tess// |
|||
half _TessellationEdgeLength; |
|||
|
|||
float TessellationEdgeFactor (float3 p0, float3 p1) |
|||
{ |
|||
float edgeLength = distance(p0, p1); |
|||
|
|||
float3 edgeCenter = (p0 + p1) * 0.5; |
|||
float viewDistance = 10; // distance(edgeCenter, _WorldSpaceCameraPos); |
|||
|
|||
return edgeLength * _ScreenParams.y / (_TessellationEdgeLength * viewDistance); |
|||
} |
|||
|
|||
tessCP vert( appdata Input ) |
|||
{ |
|||
tessCP Output; |
|||
Output.vertex = Input.vertex; |
|||
return Output; |
|||
} |
|||
|
|||
HS_ConstantOutput HSConstant( InputPatch<tessCP, 3> Input ) |
|||
{ |
|||
float3 p0 = mul(UNITY_MATRIX_M, Input[0].vertex).xyz; |
|||
float3 p1 = mul(UNITY_MATRIX_M, Input[1].vertex).xyz; |
|||
float3 p2 = mul(UNITY_MATRIX_M, Input[2].vertex).xyz; |
|||
HS_ConstantOutput Output = (HS_ConstantOutput)0; |
|||
Output.TessFactor[0] = TessellationEdgeFactor(p1, p2); |
|||
Output.TessFactor[1] = TessellationEdgeFactor(p2, p0); |
|||
Output.TessFactor[2] = TessellationEdgeFactor(p0, p1); |
|||
Output.InsideTessFactor = (TessellationEdgeFactor(p1, p2) + |
|||
TessellationEdgeFactor(p2, p0) + |
|||
TessellationEdgeFactor(p0, p1)) * (1 / 3.0); |
|||
return Output; |
|||
} |
|||
|
|||
[domain("tri")] |
|||
[partitioning("fractional_odd")] |
|||
[outputtopology("triangle_cw")] |
|||
[patchconstantfunc("HSConstant")] |
|||
[outputcontrolpoints(3)] |
|||
tessCP hull( InputPatch<tessCP, 3> Input, uint uCPID : SV_OutputControlPointID ) |
|||
{ |
|||
return Input[uCPID]; |
|||
} |
|||
|
|||
////////////////////////////VERT SHADER//////////////////////////// |
|||
[domain("tri")] |
|||
v2f domain( HS_ConstantOutput HSConstantData, const OutputPatch<tessCP, 3> Input, float3 BarycentricCoords : SV_DomainLocation) |
|||
{ |
|||
v2f Output = (v2f)0; |
|||
float fU = BarycentricCoords.x; |
|||
float fV = BarycentricCoords.y; |
|||
float fW = BarycentricCoords.z; |
|||
float4 vertex = Input[0].vertex * fU + Input[1].vertex * fV + Input[2].vertex * fW; |
|||
|
|||
vertex.y += sin(_Time.w + vertex.x * 4) * 0.2; |
|||
Output.col = vertex.xyz; |
|||
|
|||
#ifdef _LW |
|||
Output.vertex = mul(UNITY_MATRIX_VP, mul(UNITY_MATRIX_M, float4(vertex.xyz, 1.0))); //TransformObjectToHClip(vertex);//calculate the vertices for rendering |
|||
#else |
|||
Output.vertex = mul(UNITY_MATRIX_VP, mul(UNITY_MATRIX_M, float4(vertex.xyz, 1.0))); // UnityObjectToClipPos(vertex);//calculate the vertices for rendering |
|||
#endif |
|||
|
|||
return Output; |
|||
} |
|||
|
|||
float4 frag (v2f i) : SV_Target |
|||
{ |
|||
float4 col = float4(i.col, 1); |
|||
return col; |
|||
} |
|||
ENDHLSL |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: b5d14b5fa694e43f494af0f3b3c8397e |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%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: metaTest |
|||
m_Shader: {fileID: 4800000, guid: 9a018c8a0f3d5466c8cf7db26a32a8fe, type: 3} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- Texture_2D2A40E: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- Texture_4CCF661D: |
|||
m_Texture: {fileID: 2800000, guid: b2f21589b3c414cc3a05db416d43897b, type: 3} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- Texture_E3D097C6: |
|||
m_Texture: {fileID: 2800000, guid: d389fa646f8a74bae9368b04367ad643, type: 3} |
|||
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} |
|||
m_Floats: |
|||
- _AlphaClip: 0 |
|||
- _Blend: 0 |
|||
- _BumpScale: 1 |
|||
- _Cull: 2 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _Surface: 0 |
|||
- _UVSec: 0 |
|||
- _WorkflowMode: 1 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _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} |
|
|||
fileFormatVersion: 2 |
|||
guid: 6d95bcd779e2c4adeab8be4e3a1147bf |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue