Shaders: uniform for window resolution, not just split resolution #7610
Replies: 4 comments 1 reply
-
|
im not sure this is even possible as each split is its own opengl context (just like tabs and separate windows) if it is it would require a complete redo on how ghostty renders as you need to share information to all current "realized" surfaces (a surface is a generic term for what renders in a window/tab/split) |
Beta Was this translation helpful? Give feedback.
-
|
If the individual surfaces could somehow access the total window dimensions, and their position within that window, that would suffice for the shader I'd like. |
Beta Was this translation helpful? Give feedback.
-
|
I'm supportive of this, but I don't think we even have access to this information in Ghostty core at the moment. So I'll have to think about how we represent and plumb this through. |
Beta Was this translation helpful? Give feedback.
-
|
Especially for a shader implementing a cursor trail it would be nice to be able to follow the cursor more easily when switching focus between splits. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Seems all the shaders run per-split, not per-window. This means if you use multiple splits, each shader has its own little resolution, e.g.
I think this is because
iResolutionuniform gives the resolution of the split, not the window.I would love for the entire window to be shaded the same, e.g. for the gradient to stretch across the entire window, not across each individual split. Is there any way for shaders to access the resolution of the entire window? If not, perhaps the window resolution should be a uniform exposed just like
iResolutionis.Beta Was this translation helpful? Give feedback.
All reactions