You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Summary
A
vec4
uniform unit that holds information about the mouse state.x
andy
contain the absolute screen position of the mouse cursor. (The user can choose to normalize these by dividing through the values provided throughResolution
.)z
is1.0
when the primary button is down.w
is1.0
for a single frame when the primary button was clicked.Questions/request for feedback:
MouseButton
uniform that provides the latter two values listed above.The text was updated successfully, but these errors were encountered: