Skip to content

Commit b81f05b

Browse files
Merge pull request #8161 from Unity-Technologies/ppv2/platforms-update
[PPV2] Update platforms support
2 parents 6feca3f + eaa969b commit b81f05b

File tree

6 files changed

+69
-6
lines changed

6 files changed

+69
-6
lines changed

.yamato/_postprocessing_publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
name: postprocessing
55
test_editors:
6-
- 2020.3
7-
- 2019.4
86
- 2021.3
9-
- 2022.1
10-
- 2023.2
7+
- 2022.3
8+
- 6000.0
9+
- 6000.1
10+
- 6000.2
1111
- trunk
1212
test_platforms:
1313
- name: win

com.unity.postprocessing/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77
## [Unreleased]
88

99
### Added
10-
-
10+
- Added Switch2 platform support
1111

1212
### Fixed
1313
-

com.unity.postprocessing/PostProcessing/Editor/Utils/EditorUtilities.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public static bool isTargetingConsoles
3737
#if UNITY_GAMECORE
3838
|| t == BuildTarget.GameCoreXboxSeries
3939
|| t == BuildTarget.GameCoreXboxOne
40+
#endif
41+
#if UNITY_SWITCH2
42+
|| t == BuildTarget.Switch2
4043
#endif
4144
|| t == BuildTarget.Switch;
4245
}
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

com.unity.postprocessing/PostProcessing/Shaders/API/Switch2.hlsl.meta

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

com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include "API/Vulkan.hlsl"
2424
#elif defined(SHADER_API_SWITCH)
2525
#include "API/Switch.hlsl"
26+
#elif defined(SHADER_API_SWITCH2)
27+
#include "API/Switch2.hlsl"
2628
#elif defined(SHADER_API_METAL)
2729
#include "API/Metal.hlsl"
2830
#elif defined(SHADER_API_PSP2)
@@ -33,7 +35,7 @@
3335
#include "API/OpenGL.hlsl"
3436
#endif
3537

36-
#if defined(SHADER_API_PSSL) || defined(SHADER_API_XBOXONE) || defined(SHADER_API_SWITCH) || defined(SHADER_API_PSP2)
38+
#if defined(SHADER_API_PSSL) || defined(SHADER_API_XBOXONE) || defined(SHADER_API_SWITCH) || defined(SHADER_API_SWITCH2) || defined(SHADER_API_PSP2)
3739
#define SHADER_API_CONSOLE
3840
#endif
3941

0 commit comments

Comments
 (0)