ObjToSchematic/shaders/texture_tri_fragment.fs

14 lines
276 B
Forth
Raw Normal View History

2021-07-01 23:16:32 +08:00
precision mediump float;
2021-07-27 06:42:56 +08:00
uniform sampler2D u_texture;
varying float v_lighting;
2021-07-27 06:42:56 +08:00
varying vec2 v_texcoord;
2021-07-01 23:16:32 +08:00
void main() {
vec2 tex = vec2(v_texcoord.x, 1.0 - v_texcoord.y);
vec3 diffuse = texture2D(u_texture, tex).rgb;
gl_FragColor = vec4(diffuse * v_lighting, 1.0);
2021-07-01 23:16:32 +08:00
}