text almost works
This commit is contained in:
@@ -21,6 +21,5 @@ layout(location = 0) in vec2 tex_coords;
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
void main() {
|
||||
out_color = vec4(1., 1., 1., 1.);
|
||||
// out_color = vec4(1., 1., 1., texture(diffuse_tex, tex_coords).r);
|
||||
out_color = vec4(1., 1., 1., texture(diffuse_tex, tex_coords).r);
|
||||
}
|
||||
Binary file not shown.
@@ -25,8 +25,15 @@ out gl_PerVertex {
|
||||
};
|
||||
|
||||
void main() {
|
||||
mat4 invert = mat4(
|
||||
1., 0., 0., 0.,
|
||||
0., -1., 0., 0.,
|
||||
0., 0., 1., 0.,
|
||||
0., 0., 0., 1.
|
||||
);
|
||||
|
||||
// Vertex position in camera
|
||||
gl_Position = ubo.projection * ubo.view * push.model * vec4(position, 1.0);
|
||||
gl_Position = ubo.projection * ubo.view * invert * push.model * vec4(position, 1.0);
|
||||
|
||||
// Just interpolate UV coords, no transformation needed
|
||||
tex_coords = uv;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user