Hello everyone, I’m a 3D artist. Recently, I’ve been exploring and learning about the creation of Toon Shaders on forums. Here is the link to my project: toon test | Editor (playcanvas.com)
//uniform vec3 shadeColor;
vec3 combineColor(vec3 albedo, vec3 sheenSpecularity, float clearcoatSpecularity) {
vec3 ret = vec3(0);
vec3 shadowColor = vec3(1.0,0.7,0.5)*albedo;
#ifdef LIT_OLD_AMBIENT
ret += (dDiffuseLight - light_globalAmbient) * albedo + material_ambient * light_globalAmbient;
#else
ret += mix(shadowColor, albedo, dDiffuseLight);
I tried changing
vec3 shadowColor = vec3(1.0, 0.7, 0.5) * albedo;
to
vec3 shadewColor = shadeColor * albedo;
But an error occurred. The questions I want to ask are:
- Is it necessary to have
uniform vec3 shadeColor;
? - If yes, where should it be placed? If not, what should I do to achieve my goal?
Thank you, everyone.