sunset box: add single pass instanced rendering support needed for cvr experimental

This commit is contained in:
Crispy 2023-06-25 11:54:54 +02:00
parent d0557ff466
commit e8ebac67fb
5 changed files with 10 additions and 108 deletions

View file

@ -10,7 +10,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 346340643590905982} - component: {fileID: 346340643590905982}
m_Layer: 0 m_Layer: 0
m_Name: GameObject m_Name: NoRotationDummy
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -24,7 +24,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8496610095942690802} m_GameObject: {fileID: 8496610095942690802}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.92657536, y: -0.24109477, z: 3.413753} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}

View file

@ -1,98 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Sunset Env_old
m_Shader: {fileID: 4800000, guid: 25430878f237178ac8983add8236827b, 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: 2800000, guid: 1f675a065618d234abec48e229fcf618, type: 3}
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}
- _WaterSurface:
m_Texture: {fileID: 2800000, guid: cafeae09bbcef5a6cabeaac76bab5462, type: 3}
m_Scale: {x: 1.6, 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
- _Grid: 0
- _HorizonTint: 0.1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StarDensity: 30
- _StarRandom: 0.85
- _StarSize: 0.06
- _StarSizeRandom: 0.5
- _StarTint: 0.5
- _StarsMissing: 0.75
- _SunAngle: 0
- _SunCutoff: 0.06
- _SunRadius: 0.06
- _Temp: 0.5
- _UVSec: 0
- _WaveStrength: 1
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _HorizonCol: {r: 0.43, g: 0.27, b: 0.49, a: 1}
- _SkyCol: {r: 0.22, g: 0.23, b: 0.58, a: 1}
- _SunCol: {r: 1, g: 0.65, b: 0.05, a: 1}
- _WaterCol: {r: 0.041651834, g: 0.0754717, b: 0.060873438, a: 1}

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 0e76bd19438f76495b4a89153191400f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -59,6 +59,8 @@
struct appdata struct appdata
{ {
float4 vertex : POSITION; float4 vertex : POSITION;
UNITY_VERTEX_INPUT_INSTANCE_ID
}; };
struct v2f struct v2f
@ -66,6 +68,8 @@
float4 vertex : SV_POSITION; float4 vertex : SV_POSITION;
float3 cam_pos : TEXCOORD0; float3 cam_pos : TEXCOORD0;
float3 hit_pos : TEXCOORD1; float3 hit_pos : TEXCOORD1;
UNITY_VERTEX_OUTPUT_STEREO
}; };
sampler2D _NoiseTex; sampler2D _NoiseTex;
@ -98,6 +102,10 @@
v2f vert (appdata v) v2f vert (appdata v)
{ {
v2f o; v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_OUTPUT(v2f, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex); o.vertex = UnityObjectToClipPos(v.vertex);
o.cam_pos = _WorldSpaceCameraPos; o.cam_pos = _WorldSpaceCameraPos;
o.hit_pos = mul(unity_ObjectToWorld, v.vertex); o.hit_pos = mul(unity_ObjectToWorld, v.vertex);