The topic may be confusing, let me explain it:
When rendering in Minecraft, Mojang uses vertex rendering to render squares and textures, so I should only use vertex rendering. And the problem comes right away:
When rendering with some given vertices, the vertex shaders will decide the final position and color of the vertices and the fragment shaders will decide how the colors blend on the screen, right? However, I found modifying these files cannot change the middle colors produced when vertex rendering, which means, after the processing of the vertices by vertex shaders, the color of each pixel will be passed through a simple interpolating algorithm and then be directly passed to the fragment shaders. I cannot find any way to change how the middle colors are calculated and passed, or how to change the interpolating algorithm.
Is there any way to change the default interpolating algorithm to anything else? For example, replace the interpolating algorithm
with a pigment-based blending algorithm or an algorithm to mix the colors with an additional ratio to produce a non-linear gradient. I have all these algorithms but just lack at the knowledge of OpenGL rendering, and cannot find a way to change the interpolating algorithm after days of searching.
I'll be no more appreciate if anyone could answer it!
I made the image below to briefly show my question and my understanding of the render process.https://i.imgur.com/d7k3gan.png