mob-sakai/UIEffect

UIEffect shader not compiling on gamecore build target.

Open

#385 opened on Jan 20, 2026

View on GitHub
 (3 comments) (0 reactions) (1 assignee)C# (5,127 stars) (728 forks)batch import
bughelp wanted

Description

Describe the bug UIEffect shader is not compiled on both GameCore XboxOne and GameCore Series build targets. When compiling, there is an error: Program 'frag', error: llvm::cast<X>() argument of incompatible type!

Because of that, ui elements with UIEffect are not correctly rendered in build, everything is pink.

To Reproduce Steps to reproduce the behavior:

  1. Switch target to GameCore Xbox One or Series
  2. Try to compile UIEffect shader
  3. See errors

Expected behavior Shader is compiling and ui effects are working properly in builds.

Environment (please complete the following information):

  • Version 5.10.8
  • Platform: Xbox One, Xbox Series
  • Unity version: 6000.1.13
  • Build options: IL2CPP

Additional context

I know that you probably don't have access to Xbox One and Xbox Series targets, but I hope that maybe somehow you will be able to fix this. I am not fluent in shaders so I asked AI about this (probably a stupid idea, sorry) and it got me with: The culprit is likely the global variable _fragInput. In your shader, you are assigning the v2f input to a global variable _fragInput inside the frag function. On many platforms, this "works" by copying the data, but on GameCore/GDK, global variables in shaders are often treated as constant buffers or have restricted storage qualifiers. Assigning a varying input (from a register) to a global storage in a fragment shader can trigger a type mismatch or an illegal instruction in the compiler's backend, leading to the LLVM cast error.

Contributor guide