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

Commit 914e05d

Browse files
authored
Merge pull request #435 from Unity-Technologies/mobile-fixes
Mobile fixes
2 parents 2131b6b + f537ac4 commit 914e05d

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

PostProcessing/Runtime/Effects/ColorGrading.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,13 +450,13 @@ void CheckInternalLogLut()
450450
m_InternalLogLut = new RenderTexture(k_Lut3DSize, k_Lut3DSize, 0, format, RenderTextureReadWrite.Linear)
451451
{
452452
name = "Color Grading Log Lut",
453+
dimension = TextureDimension.Tex3D,
453454
hideFlags = HideFlags.DontSave,
454455
filterMode = FilterMode.Bilinear,
455456
wrapMode = TextureWrapMode.Clamp,
456457
anisoLevel = 0,
457458
enableRandomWrite = true,
458459
volumeDepth = k_Lut3DSize,
459-
dimension = TextureDimension.Tex3D,
460460
autoGenerateMips = false,
461461
useMipMap = false
462462
};

PostProcessing/Runtime/Utils/TextureLerper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ RenderTexture Get(RenderTextureFormat format, int w, int h, int d = 1, bool enab
8282

8383
rt = new RenderTexture(w, h, d, format)
8484
{
85+
dimension = dimension,
8586
filterMode = FilterMode.Bilinear,
8687
wrapMode = TextureWrapMode.Clamp,
8788
anisoLevel = 0,
8889
volumeDepth = d,
89-
enableRandomWrite = enableRandomWrite,
90-
dimension = dimension
90+
enableRandomWrite = enableRandomWrite
9191
};
9292
rt.Create();
9393
}

PostProcessing/Shaders/API/OpenGL.hlsl

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,19 @@
2929
#define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r
3030
#define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r
3131

32-
#define UNITY_BRANCH
33-
#define UNITY_FLATTEN
34-
#define UNITY_UNROLL
35-
#define UNITY_LOOP
36-
#define UNITY_FASTOPT
32+
#if SHADER_API_GLES
33+
# define UNITY_BRANCH
34+
# define UNITY_FLATTEN
35+
# define UNITY_UNROLL
36+
# define UNITY_LOOP
37+
# define UNITY_FASTOPT
38+
#else
39+
# define UNITY_BRANCH [branch]
40+
# define UNITY_FLATTEN [flatten]
41+
# define UNITY_UNROLL [unroll]
42+
# define UNITY_LOOP [loop]
43+
# define UNITY_FASTOPT [fastopt]
44+
#endif
3745

3846
#define CBUFFER_START(name)
3947
#define CBUFFER_END

0 commit comments

Comments
 (0)