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

shaderprecomp: remove ShaderSourceID #2999

Closed
11 tasks
hajimehoshi opened this issue May 26, 2024 · 2 comments
Closed
11 tasks

shaderprecomp: remove ShaderSourceID #2999

hajimehoshi opened this issue May 26, 2024 · 2 comments
Milestone

Comments

@hajimehoshi
Copy link
Owner

Operating System

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

What feature would you like to be added?

In the current specification, a ShaderSourceID might be different for different Ebitengine veresions. This is troublesome since a precompiled shader might use the ID for its filename. So, what about guaranteeing the algorithm of ID generations?

Why is this needed?

No response

@hajimehoshi hajimehoshi added this to the v2.8.0 milestone May 26, 2024
@hajimehoshi
Copy link
Owner Author

Hmm, probably we should not expose the notion of 'ID'.

hajimehoshi added a commit that referenced this issue May 26, 2024
This reverts commit ecc3f29.

Reason: we are considering to remove ShaderSourceID

Updates #2861
Updates #2999
@hajimehoshi hajimehoshi changed the title shaderprecomp: guarantee ShaderSourceID is always the same for the same source whatever the Ebitengine version is shaderprecomp: remove ShaderSourceID May 26, 2024
@hajimehoshi hajimehoshi changed the title shaderprecomp: remove ShaderSourceID shaderprecomp: remove ShaderSource and ShaderSourceID May 26, 2024
hajimehoshi added a commit that referenced this issue May 26, 2024
This reverts commit 8be3bb4.

Reason: removing `ShaderSource` unexpected exposes the source.

Updates #2999
@hajimehoshi hajimehoshi reopened this May 26, 2024
@hajimehoshi hajimehoshi changed the title shaderprecomp: remove ShaderSource and ShaderSourceID shaderprecomp: remove ShaderSourceID May 26, 2024
@hajimehoshi
Copy link
Owner Author

I realized that the struct ShaderSource is necessary in order to hide the source.

hajimehoshi added a commit that referenced this issue May 26, 2024
`ShaderSourceID` was confusing as there was no guarantee the same ID is
used for the same source if Ebitengine versions are different.

`ShaderSource` should be kept as the built-in shader contents should not
be exposed.

Updates #2861
Closes #2999
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

1 participant