Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bool uniform type in kage #3165

Open
11 tasks
DanielAdolfsson opened this issue Dec 2, 2024 · 1 comment
Open
11 tasks

bool uniform type in kage #3165

DanielAdolfsson opened this issue Dec 2, 2024 · 1 comment
Milestone

Comments

@DanielAdolfsson
Copy link

Ebitengine Version

2.8.5

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

1.23.3

What steps will reproduce the problem?

Create a shader with a uniform variable of type bool

What is the expected result?

I expect it to work

What happens instead?

Crashes with panic: runtime error: slice bounds out of range [:-1]

Anything else you feel useful to add?

After checking the source, it does look like bool types are not at all implemented for uniforms.
If this is a technical limitation, it should instead be added to the documentation (or maybe it is and I didn't find it).

@hajimehoshi
Copy link
Owner

A bool value as a uniform value is not working so far. At least, this panic should not happen (so this is actually a bug), but I think it should be easy to implement a bool uniform variable.

@hajimehoshi hajimehoshi added this to the v2.9.0 milestone Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants