Help me quickly modify a little shader

Please guys, tell me what numbers should i modify for + - saturation and contrast. Thanks soo much!

Probably bump up the macros for I and Q

1 Like

Perfect man, thanks :hugs: I reduced the colours a bit and upped the contrast, but it would be even perfect…er if i could reduce the red by some 10%. Any ideas on what number to modify? :relaxed:

right before the return statement, add:

c *= float3(0.9, 1.0, 1.0);
1 Like

This is great! It certaiy does the trick. I do however seem to have a slight magenta issue, rather than simply red colour dominance, but overall it is so much better than before thanks to your tweaks.

Thanks again hunter for taking the time to help me! :pray:

1 Like

Change it to 0.9 1.0 0.9 (I think? That should be Red 90% Green 100% Blue 90%, which would decrease the magenta strength.)

If it’s still too strong just decrease those more.


as Syh is suggesting, you can use that float3 to dial in whatever color/tint channel balance you want.


Ik this is outside the scope of this thread.

But could @hunterk, @HyperspaceMadness, @guest.r, someone who actually understands how to write shaders write some stupid people documentation on what shader functions (like float3 for example) we have available under Vulkan, what they do and pros and cons if we can use multiple things for the same thing?

Sorry for all the @'s and if nobody has the time it’s cool, I just feel stupid trying to Google this and parse through the documentation.

1 Like

the float3 is an HLSL-ism for vec3. They both mean “3-component vector of float”. Ultimately, all shaders output a 4-component vector of float that represents the Red, Green, Blue and Alpha components of each pixel. How you determine those values just comes down to a lot of math :slight_smile:

We pass some pre-determined values from the program to the shader backend, like the size of the texture output by the core (SourceSize), the current pixel’s location on that texture in normalized format (vTexCoord), the number of elapsed frames (for animations and such; FrameCount), etc. that can be used in these calculations.

And that’s pretty much it. I know that’s a bit of a “draw the rest of the owl” statement, but that’s where the shader author’s knowledge and creativity come into play.