Implement shaders using textures properly

This commit is contained in:
2024-01-24 05:40:43 -05:00
parent 09d8196180
commit 7265169f0d
2 changed files with 5 additions and 1 deletions

View File

@@ -37,7 +37,9 @@ void main()
out_normal = vec4(N, 1.0);
out_albedo.rbg = texture(tex[in_tex_idx], in_tex_coord).rgb;
vec4 tex_value = texture(tex[in_tex_idx], in_tex_coord);
out_albedo.rbg = tex_value.rgb * tex_value.a;
out_position.a = linearDepth(out_position.z);

View File

@@ -35,4 +35,6 @@ void main() {
out_color = color;
out_tex_coord = uv;
out_texture_idx = in_texture_id;
}