mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
ShaderGenerator: fix M_blend to match fixed-function pipeline
See panda3d/panda3d#178
This commit is contained in:
parent
73d13a8f5c
commit
745b51f10f
@ -1417,7 +1417,10 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) {
|
||||
text << "\t result.rgb = lerp(result, tex" << i << ", tex" << i << ".a).rgb;\n";
|
||||
break;
|
||||
case TextureStage::M_blend:
|
||||
text << "\t result.rgb = lerp(result, tex" << i << " * texcolor_" << i << ", tex" << i << ".r).rgb;\n";
|
||||
text << "\t result.rgb = lerp(result.rgb, texcolor_" << i << ".rgb, tex" << i << ".rgb);\n";
|
||||
if (key._calc_primary_alpha) {
|
||||
text << "\t result.a *= tex" << i << ".a;\n";
|
||||
}
|
||||
break;
|
||||
case TextureStage::M_replace:
|
||||
text << "\t result = tex" << i << ";\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user