Skip to content

Commit

Permalink
change gl default shader to use a texture coordinate (parity with the…
Browse files Browse the repository at this point in the history
… d3d backend)
  • Loading branch information
Gargaj committed Feb 5, 2022
1 parent 8504e2a commit 94e95de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platform_glfw/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ namespace Renderer
"uniform float {%midi:name%};\n"
"{%midi:end%}" // leave off \n here
"\n"
"in vec2 out_texcoord;\n"
"layout(location = 0) out vec4 out_color; // out_color must be written in order to see anything\n"
"\n"
"vec4 plas( vec2 v, float time )\n"
Expand All @@ -146,7 +147,7 @@ namespace Renderer
"\n"
"void main(void)\n"
"{\n"
"\tvec2 uv = vec2(gl_FragCoord.x / v2Resolution.x, gl_FragCoord.y / v2Resolution.y);\n"
"\tvec2 uv = out_texcoord;\n"
"\tuv -= 0.5;\n"
"\tuv /= vec2(v2Resolution.y / v2Resolution.x, 1);\n"
"\n"
Expand Down

0 comments on commit 94e95de

Please sign in to comment.