This repository has been archived on 2024-11-22. You can view files and clone it, but cannot push or open issues or pull requests.
gles-compatibility-layer/src/shaders/main.vsh

23 lines
597 B
V Shell
Raw Permalink Normal View History

2023-09-08 01:17:21 +00:00
#version 100
2023-08-05 01:58:43 +00:00
precision highp float;
// Matrices
uniform mat4 u_projection;
uniform mat4 u_model_view;
uniform mat4 u_texture;
// Texture
2023-09-08 01:17:21 +00:00
attribute vec3 a_vertex_coords;
attribute vec2 a_texture_coords;
varying vec4 v_texture_pos;
2023-08-05 01:58:43 +00:00
// Color
2023-09-08 01:17:21 +00:00
attribute vec4 a_color;
varying vec4 v_color;
2023-08-05 01:58:43 +00:00
// Fog
2023-09-08 01:17:21 +00:00
varying vec4 v_fog_eye_position;
2023-08-05 01:58:43 +00:00
// Main
void main(void) {
v_texture_pos = u_texture * vec4(a_texture_coords.xy, 0.0, 1.0);
gl_Position = u_projection * u_model_view * vec4(a_vertex_coords.xyz, 1.0);
v_color = a_color;
v_fog_eye_position = u_model_view * vec4(a_vertex_coords.xyz, 1.0);
}