简体   繁体   中英

OpenGL ES 1.0 Photoshop Overlay Blend On Opaque Texture For Android

Is it possible to achieve the photoshop overlay blending mode with an opaque jpeg texture using just OpenGL ES 1.0?

I am aware this can be achieved with later versions of OpenGL ES on android but would like to support as early a version of OpenGL as possible for maximum compatibility and exposure on the android platform.

My thought is probably not.

Photoshop defines the Overlay formula as:

Multiplies or screens the colors, depending on the base color. Patterns or colors overlay the existing pixels while preserving the highlights and shadows of the base color. The base color is not replaced but is mixed with the blend color to reflect the lightness or darkness of the original color.

So what you've really got here is two separate blend modes (multiply and screen), being chosen based on the base layer color. I'm not aware of any way to dynamically switch blend modes based on the base layer color.

As answered in this question , even implementing screen and multiply is not trivial in OpenGL, so I doubt there's a way you can do them both at the same time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM