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

Allow uniforms declared in a separate file to be accessed similarly to procedures #33

Open
Squareheron942 opened this issue Dec 16, 2024 · 0 comments

Comments

@Squareheron942
Copy link

Feature Request

What feature are you suggesting?

Overview:

  • Essentially as the title describes. Uniforms declared in a separate file currently are invisible to code, even though procedures can be called just fine.

Smaller Details:

  • In terms of actual implementation there isn't really anything stopping this. If I directly use the register index, Picasso compiles this code fine (and it also runs fine in an actual program both in emulators and on hardware).
  • Additionally, since procedures can be accessed cross-file (and the uniforms are already compared to check for shared uniforms) it should not be too difficult to add support.

Nature of Request:

  • Addition

Why would this feature be useful?

This would allow projects such as engines to be safe to set uniforms which are intended to be shared to all shaders (e.g. instance ID, light positions etc.) without needing to check if they exist in every shader and setting them for every object.

Additionally, this would fix the issue of shared procedures accessing uniforms or constants, since at the moment doing so results in undefined behaviour since the uniforms aren't actually being treated as existing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant