完成透明的渲染

This commit is contained in:
xsl
2025-09-26 18:21:06 +08:00
parent 57ac3a674c
commit 326593eb4f
4 changed files with 52 additions and 17 deletions
+5 -1
View File
@@ -37,5 +37,9 @@ void main()
vec3 diffuse = max(dot(N, L), 0.0) * vec3(1.0);
float specular = pow(max(dot(R, V), 0.0), 16.0) * color.a;
outFragColor = vec4(diffuse * color.rgb + specular, 1.0);
vec4 textureColor = color;
if (textureColor.a < 0.1) {
discard;
}
outFragColor = textureColor;
}
Binary file not shown.