Skip to content

Commit

Permalink
fix missing inputs on metal shader for blended textures (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez authored Dec 16, 2024
1 parent b23f913 commit be703a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/graphic/Fast3D/gfx_metal_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,12 @@ MTL::VertexDescriptor* gfx_metal_build_shader(char buf[8192], size_t& num_floats
len +=
sprintf(buf + len,
"float4 maskVal%d = hookTexture2D(uTexMask%d, uTex%dSmplr, vTexCoordAdj%d, maskSize%d);\n",
i, i, i, i);
i, i, i, i, i);
if (cc_features.used_blend[i]) {
len += sprintf(
buf + len,
"float4 blendVal%d = hookTexture2D(uTexBlend%d, uTex%dSmplr, vTexCoordAdj%d, texSize%d);\n", i,
i, i, i);
i, i, i, i);
} else {
len += sprintf(buf + len, "float4 blendVal%d = float4(0, 0, 0, 0);\n", i);
}
Expand Down

0 comments on commit be703a9

Please sign in to comment.