Skip to content

Commit 9c676e6

Browse files
committed
Maybe fixed: Texture becomes upside down when Shader Keyword _SYNTHESIZED_TEXTURE is enabled.
1 parent 39ab812 commit 9c676e6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

com.unity.toonshader/Editor/TextureSynthesizer/TextureSynthesizer.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ internal static void Proc(ref Texture outTexture)
190190
material.SetTexture(strS2, Source2);
191191
material.SetTexture(strS3, Source3);
192192
}
193-
#if true
193+
#if false
194194
// int tempTextureIdentifier = Shader.PropertyToID("TmpTexture");
195195
s_CommandBuffer.Clear();
196196

@@ -213,9 +213,10 @@ internal static void Proc(ref Texture outTexture)
213213
// s_CommandBuffer.ReleaseTemporaryRT(tempTextureIdentifier);
214214
Graphics.ExecuteCommandBuffer(s_CommandBuffer);
215215
#else
216-
Graphics.Blit(Source0, s_DebugRenderTexture);
216+
Graphics.Blit(Source0, s_DebugRenderTexture, material);
217+
Graphics.CopyTexture(s_DebugRenderTexture, outTexture);
217218
#endif
218-
SyncGPU();
219+
// SyncGPU();
219220
}
220221

221222
internal static void SyncGPU()

0 commit comments

Comments
 (0)