karaoke-dev / osu-framework-font

Unofficial support for extra font effect.
MIT License
5 stars 3 forks source link

Implement mix color shader. #63

Open andy840119 opened 3 years ago

andy840119 commented 3 years ago

See mixed texture deleted before, not really sure will be implemented by shader 🤔 https://github.com/karaoke-dev/osu-framework-font/blob/2021.0708.0/osu.Framework.Font/Graphics/Sprites/ILyricTexture.cs

andy840119 commented 3 years ago

Update: Should be able to accept array in GetUniform<T> (See SetupUniforms in Shader.cs)

andy840119 commented 3 years ago

Or calculate the sample shader by CPU. But it might cause lots of delay if running in graphic thread.

andy840119 commented 3 years ago

https://git.buttonbashed.co.nz/shadoh/Explore/src/master/Exploration/GLObjects/ShaderProgram.cs Not really sure that will unitorm array in shader will become to each params.

e.g: point_1, point_2 ...

andy840119 commented 3 years ago

image tested. seems osu-framework only able to assign first variable in array...

andy840119 commented 3 years ago

https://gamedev.stackexchange.com/questions/79376/slow-uniform-array-in-shader-causing-fps-drop Also, found an issue that will cause performance while reading data from array. So the tricky way might be place passing data into sample2D