Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 1f012b0

Browse files
Commented out XR code for Switch platform. Added Switch API header.
1 parent aaa3d89 commit 1f012b0

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#define UNITY_UV_STARTS_AT_TOP 1
2+
#define UNITY_REVERSED_Z 1
3+
#define UNITY_GATHER_SUPPORTED (SHADER_TARGET >= 50)
4+
5+
#define TEXTURE2D_SAMPLER2D(textureName, samplerName) Texture2D textureName; SamplerState samplerName
6+
#define TEXTURE3D_SAMPLER3D(textureName, samplerName) Texture3D textureName; SamplerState samplerName
7+
8+
#define TEXTURE2D(textureName) Texture2D textureName
9+
#define SAMPLER2D(samplerName) SamplerState samplerName
10+
11+
#define TEXTURE3D(textureName) Texture3D textureName
12+
#define SAMPLER3D(samplerName) SamplerState samplerName
13+
14+
#define TEXTURE2D_ARGS(textureName, samplerName) Texture2D textureName, SamplerState samplerName
15+
#define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName
16+
17+
#define TEXTURE3D_ARGS(textureName, samplerName) Texture3D textureName, SamplerState samplerName
18+
#define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName
19+
20+
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2)
21+
#define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod)
22+
23+
#define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3)
24+
25+
#define LOAD_TEXTURE2D(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, 0))
26+
#define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, lod))
27+
28+
#define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2)
29+
#define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2)
30+
#define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2)
31+
#define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2)
32+
33+
#define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r
34+
#define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r
35+
36+
#define UNITY_BRANCH [branch]
37+
#define UNITY_FLATTEN [flatten]
38+
#define UNITY_UNROLL [unroll]
39+
#define UNITY_LOOP [loop]
40+
#define UNITY_FASTOPT [fastopt]
41+
42+
#define CBUFFER_START(name) cbuffer name {
43+
#define CBUFFER_END };
44+
45+
#if UNITY_GATHER_SUPPORTED
46+
#define FXAA_HLSL_5 1
47+
#define SMAA_HLSL_4_1 1
48+
#else
49+
#define FXAA_HLSL_4 1
50+
#define SMAA_HLSL_4 1
51+
#endif

PostProcessing/Shaders/API/Switch.hlsl.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)