NZDN 2024: Day 2 – Shady journey

Day 2 of NZDN, no video for this one as I am planning on making the video’s focused on specific parts. When I finished this shader stuff tomorrow or the day after … hopefully, I’ll be releasing the next video. ^^

What I have done today

I created a basic guideline in the GitHub issue for this part, the way I’m tackling this is by first seeing how I can pass an array of data to a shader, just a normal shader and not a compute shader, main reason for this is because I want to keep the GDExtension as open as possible to be used in any rendering mode. Compute shaders only work in Forward+ mode and not in compatibility mode, which would break support for possibly Web and older platforms due to Godot not using an OpenGL version which supports compute shaders.

Maybe I should take some time to implement a compatibility mode which uses a high enough version of OpenGL to support compute shaders … but I would like to not spend another year extra, FFmpeg took enough time already hahah.

The plan of action

First up, pass an array of data to a shader as previously mentioned. This will be easy to test if it works by passing the Y data directly to one of the values of RGB, as there are the same amount of numbers in the Y array as in the amount of pixels an image has, unlike the U and V array’s which contain Half the width and half the height.

With that working I can move on with the YUV420P shader, and then getting the NV12 shader working won’t be too difficult I imagine as it’s basically the same but U and V values are intertwined inside of 1 array. IF this doesn’t work or performance is bad, I will have to move to compute shaders again.

Today was busy

I have not been able to do the amount of work which I wanted to do, but life got busy and we are having a problem with my “studio”. To not go into too many details, it involves a lot of baking soda and our sofa because in early mornings entering this room became nearly impossible. :/

Tomorrow’s plan

I’ll keep tackling the shader stuff until this is done and then I’ll send it out to the testers to make certain that it works for every body so GDE GoZen 4.0 can be released with as main feature, hardware decoding! 😀

To be honest, software decoding wasn’t bad and is probably enough for most people, but it isn’t good enough for GoZen, the moment multiple video’s are being played back at the same time, lag takes over and tanks the editor’s FPS counter. This is a needed part which I need to dedicate my time towards too to limit future problems.

Also, my ko-fi supports decided that this should be the first thing I work on, and they were correct. :p My ko-fi supporters make all of this possible and help me to continue the work I do on GoZen and YouTube, if you want to support me as well, go to https://www.ko-fi.com/voylin! Thanks for reading and read to you in the next one! 😉