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

Add Mouse uniform unit #310

Open
hmans opened this issue Sep 29, 2022 · 0 comments
Open

Add Mouse uniform unit #310

hmans opened this issue Sep 29, 2022 · 0 comments
Assignees

Comments

@hmans
Copy link
Owner

hmans commented Sep 29, 2022

Summary

A vec4 uniform unit that holds information about the mouse state.

  • x and y contain the absolute screen position of the mouse cursor. (The user can choose to normalize these by dividing through the values provided through Resolution.)
  • z is 1.0 when the primary button is down.
  • w is 1.0 for a single frame when the primary button was clicked.

Questions/request for feedback:

  • Sometimes shader may be interested in more input state than just the primary mouse button. We could model this unit here to only hold the mouse position, and put input state into separate uniforms, starting with a MouseButton uniform that provides the latter two values listed above.
@hmans hmans self-assigned this Sep 29, 2022
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