mirror of
https://github.com/neon443/neon443.github.io.git
synced 2026-03-11 15:16:18 +00:00
21 lines
451 B
HLSL
Executable File
21 lines
451 B
HLSL
Executable File
#version 300 es
|
|
|
|
precision highp float;
|
|
|
|
//the texture coordinate that came
|
|
//in from the vertex shader
|
|
in vec2 v_TexCoord;
|
|
|
|
//primary purpose of fragment shader is
|
|
//to spit out a color for every pixel
|
|
layout(location = 0) out vec4 color;
|
|
|
|
// uniform vec4 u_Color;
|
|
uniform sampler2D u_Texture;
|
|
|
|
//fragment shader gets called once per pixel
|
|
void main()
|
|
{
|
|
vec4 texColor = texture(u_Texture, v_TexCoord);
|
|
color = texColor;
|
|
} |