#ifdef __cplusplus #include std::string shader_test_frag = R"(" #version 300 es precision mediump float; out vec4 FragColor; in vec2 uv; in vec2 pos; uniform sampler2D tex; vec4 linear_iter(vec4 i, vec4 p, float factor){ return (i + p) * factor; } void main() { //FragColor = vec4(pos, 0.0, 1.0f); FragColor = texture(tex, uv); //FragColor = linear_iter(texture(tex, uv), vec4(pos, 0.0, 1.0), (uv.x + uv.y + 1.0) / 3.0); } ")"; #endif