There is a texture (suppose it is plain text in the image). It is necessary to somehow add the effect of "transfusion" of color, i.e. transition from one color to another. While watching classes GL11 did not find anything. What is the method, or third-party API?
1 answer
The simplest thing is to turn on blending (glBlend) and draw another texture on top, gradually changing its transparency.
glEnable(GL_BLEND); // Π Π°Π·ΡΠ΅ΡΠΈΡΡ ΡΠΌΠ΅ΡΠΈΠ²Π°Π½ΠΈΠ΅ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Π’ΠΈΠΏΠΎΠ²ΠΎΠΉ ΡΠ΅ΠΆΠΈΠΌ ΡΠΌΠ΅ΡΠΈΠ²Π°Π½ΠΈΡ glDepthFunc(GL_LEQUAL); // Π Π΅ΠΆΠΈΠΌ Π½Π°Π»ΠΎΠΆΠ΅Π½ΠΈΡ (ΡΠΈΡΡΠ΅ΠΌ ΡΠΎ ΡΡΠΎ ΡΠ°Π²Π½ΠΎ ΠΈΠ»ΠΈ Π±Π»ΠΈΠΆΠ΅) If you are using modern OpenGL, then transfer both textures and time to the shader, and then combine them as you like.
- It worked. Thank. - xDark
|