[SOLVED] Blend math used in editor


#1

Hi All

First posting to Playcanvas. I’m not a playcanvas user but I am working with a colleague who is.

I am trying to emulate the blend between a RGB value and a texture map in the editor. I am trying to emulate it in 3DSMAX, to create the same look as it looks in the playcanvas editor.

TIA


#2

The code is here:

So, in your case, you have MAPCOLOR and MAPTEXTURE defined. So the math is:

    albedoColor = tintColor * diffuseMapColor

#3

Thanks Will

So this is a multiplication of the tint on top of the texture? If so, could I use the Photoshop multiply algorithm?


#4

Sounds like it should do the same. :slight_smile:


#5

Thanks Will

I’ll give that a try. Now to find the Photoshop equation. Any ideas?


#6

Hi @kenc,

This will come in handy: https://github.com/jamieowen/glsl-blend

It includes a collection of .glsl files containing most of the Photoshop blending modes.


#7

Thanks Leonidas, I will check it out. I will also report back with my results, but it may not be till next week.

Thanks again Will and Leonidas.