画面翻转性能优化
This commit is contained in:
parent
dfc4c12f8e
commit
541927fbdd
|
@ -20,7 +20,7 @@ Material:
|
|||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: New Material
|
||||
m_Name: GuideBackground
|
||||
m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
|
@ -0,0 +1,33 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Unlit_FlipHorizontal
|
||||
m_Shader: {fileID: 4800000, guid: c7ab54610cf436748a16ff87b0f14190, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats: []
|
||||
m_Colors: []
|
||||
m_BuildTextureStacks: []
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a19d701f31b97d940acf9d87cd974db4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,56 @@
|
|||
//ˮƽ·×ª»Ãæ
|
||||
Shader "Unlit/FlipHorizontal"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_MainTex ("Texture", 2D) = "white" {}
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags { "RenderType"="Opaque" }
|
||||
LOD 100
|
||||
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
// make fog work
|
||||
#pragma multi_compile_fog
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float2 uv : TEXCOORD0;
|
||||
UNITY_FOG_COORDS(1)
|
||||
float4 vertex : SV_POSITION;
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
float4 _MainTex_ST;
|
||||
|
||||
v2f vert (appdata v)
|
||||
{
|
||||
v2f o;
|
||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||
float2 flip = float2(1 - v.uv.x, v.uv.y);
|
||||
o.uv = TRANSFORM_TEX(flip, _MainTex);
|
||||
return o;
|
||||
}
|
||||
|
||||
fixed4 frag (v2f i) : SV_Target
|
||||
{
|
||||
fixed4 col = tex2D(_MainTex, i.uv);
|
||||
return col;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c7ab54610cf436748a16ff87b0f14190
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -51,7 +51,7 @@
|
|||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.burst": {
|
||||
"version": "1.8.8",
|
||||
"version": "1.8.9",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
@ -120,7 +120,7 @@
|
|||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.render-pipelines.core": {
|
||||
"version": "15.0.6",
|
||||
"version": "15.0.7",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
|
@ -138,8 +138,8 @@
|
|||
"dependencies": {
|
||||
"com.unity.mathematics": "1.2.1",
|
||||
"com.unity.burst": "1.8.4",
|
||||
"com.unity.render-pipelines.core": "15.0.6",
|
||||
"com.unity.shadergraph": "15.0.6"
|
||||
"com.unity.render-pipelines.core": "15.0.7",
|
||||
"com.unity.shadergraph": "15.0.7"
|
||||
}
|
||||
},
|
||||
"com.unity.searcher": {
|
||||
|
@ -150,11 +150,11 @@
|
|||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.shadergraph": {
|
||||
"version": "15.0.6",
|
||||
"version": "15.0.7",
|
||||
"depth": 1,
|
||||
"source": "builtin",
|
||||
"dependencies": {
|
||||
"com.unity.render-pipelines.core": "15.0.6",
|
||||
"com.unity.render-pipelines.core": "15.0.7",
|
||||
"com.unity.searcher": "4.9.2"
|
||||
}
|
||||
},
|
||||
|
@ -175,7 +175,7 @@
|
|||
"url": "https://packages.unity.cn"
|
||||
},
|
||||
"com.unity.test-framework": {
|
||||
"version": "1.3.7",
|
||||
"version": "1.3.9",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
|
|
@ -8,9 +8,6 @@ EditorBuildSettings:
|
|||
- enabled: 1
|
||||
path: Assets/Scenes/Boot.unity
|
||||
guid: 9b588fe5c3bbaa048b756b81c09a7309
|
||||
- enabled: 1
|
||||
path: Assets/UVC4UnityAndroidPlugin/Samples/Scenes/UVC2DScene.unity
|
||||
guid: d9c653ce29884b648bd83d4066fe46c0
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Loading.unity
|
||||
guid: 8918de3bc441c32469d89dc27b66fbbc
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
m_EditorVersion: 2023.1.13f1c1
|
||||
m_EditorVersionWithRevision: 2023.1.13f1c1 (7c920d2dc0bc)
|
||||
m_EditorVersion: 2023.1.17f1c1
|
||||
m_EditorVersionWithRevision: 2023.1.17f1c1 (2400b5b7cae7)
|
||||
|
|
Loading…
Reference in New Issue