mob-sakai/UIEffect

UIEffect shader not compiling on gamecore build target.

已關閉

#385 建立於 2026年1月20日

 (3 則留言) (0 個反應) (1 位負責人)C# (937 個分叉)batch import
bughelp wantedready for release

倉庫指標

星標
 (7,513 顆星)
PR 合併指標
 (平均合併 1小時 8分鐘) (30 天內合併 1 個 PR)

描述

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.

貢獻者指南