-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
GLSL skinning (feature request) #8582
Comments
This feature assumes that one skin can't use both GLSL and pictures |
As far as I'm aware the plan is to have a declarative markup language for the next version of skinning (see ppy/osu-framework#30 and ppy/osu-framework#3056). Whether custom shaders will play into that is very much up in the air, but there is a quite long way to go before we can even start considering that. |
For implementation processing just shaders is simpler than processing a custom declarative language |
I'm not sure having skinning done entirely on shaders is viable either. The overhead of marshaling data from CPU to GPU and then back every update frame would probably kill performance. |
But in a normal OpenGL application you do the same with default shaders. People have GPUs to process graphics on them, not preprocessed on CPU mush |
Not entirely true. Yes, the CPU->GPU run is currently there to upload OpenGL buffer data, but framework-side there are specific optimisations done to avoid overdraw (such as layout invalidation and front-to-back rendering) that I think in the case of what you're proposing would require information (i.e. about drawable colour & bounds) to be marshaled back to CPU from GPU, which is something that I'm pretty sure is not done currently and will be a performance hit. Well, unless that code is also migrated to shaders, but that sounds very unlikely. |
we may add per element shader support in a distant future. too far forward to keep this issue open right now. let’s make the skinning system first. |
I don't know if you use OpenGL or Vulkan for graphics, if you do, here's my suggestion:
Can you add custom fragment shaders support? You would draw all the GUI elements with specific shaders. The uniforms can be:
and for font postprocessing, perhaps
and other specific uniforms for each element type. Also there can be a sampler2D called "triangles provider" for getting ready and monochrome triangles that was drawn somewhere (I didn't search this in the code), and can be used in places like buttons in osu! settings and the logo.
I don't know if this will require much PC performance, but new skins will be very cool if you can add this feature.
If you are not an OpenGL programmer, fragment shaders are scripts that can draw some effects on drawn shapes. Uniforms are variables that the scripts can use for adding more dynamic effects (based on current game state)
This idea is very raw and needs some discussing, I think.
The text was updated successfully, but these errors were encountered: