OpenGL ES: How to tint texture with color

前端 未结 3 1076
旧时难觅i
旧时难觅i 2021-01-19 01:46

I have texture with alpha. And I want to tint it with some color, so it will be colored depending on color alpha value, but overal opacity will be defined only by texture al

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-19 02:14

    You might want to read the OpenGL documentation on transparency, 15.020: "How can I achieve a transparent effect?"

    Make sure you are rendering the scene in the right order (your answer does not show any rendering).

    Make sure you are using the desired blend function.

    Another suggestion I could make is to start using shaders. I always feel a bit more in control when I use them.

提交回复
热议问题