简体   繁体   English

OpenGL ES 1.0 Photoshop在Android的不透明纹理上叠加混合

[英]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? 是否可以仅使用OpenGL ES 1.0来实现具有不透明jpeg纹理的photoshop覆盖混合模式?

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. 我知道这可能与Android设备上的OpenGL ES以后的版本中实现,但希望尽早支持版本的OpenGL尽可能为Android平台上最大的兼容性和曝光。

My thought is probably not. 我的想法可能不是。

Photoshop defines the Overlay formula as: Photoshop将覆盖公式定义为:

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. 就像在这个问题中回答的那样,即使在OpenGL中实现屏幕和乘法也不是一件容易的事,所以我怀疑是否有一种方法可以同时完成它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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