Bladeren bron

video: add deactivated shader code for 4x4 Bayer dithering.

legacy
Sam Hocevar sam 13 jaren geleden
bovenliggende
commit
493109e3ed
1 gewijzigde bestanden met toevoegingen van 14 en 1 verwijderingen
  1. +14
    -1
      src/video.cpp

+ 14
- 1
src/video.cpp Bestand weergeven

@@ -86,7 +86,20 @@ static char const *fragmentshader =
//" gl_FragColor = vec4(0.5, 1.0, 0.0, 0.5);\n"
//" gl_FragColor = vec4(pass_TexCoord * 4.0, 0.0, 0.25);\n"
#else
" gl_FragColor = texture2D(in_Texture, vec2(gl_TexCoord[0]));\n"
" vec4 col = texture2D(in_Texture, vec2(gl_TexCoord[0]));\n"
#if 0
" float dx1 = mod(gl_FragCoord.x, 2.0);\n"
" float dy1 = mod(gl_FragCoord.y, 2.0);\n"
" float t1 = mod(3.0 * dx1 + 2.0 * dy1, 4.0);\n"
" float dx2 = mod(floor(gl_FragCoord.x * 0.5), 2.0);\n"
" float dy2 = mod(floor(gl_FragCoord.y * 0.5), 2.0);\n"
" float t2 = mod(3.0 * dx2 + 2.0 * dy2, 4.0);\n"
" float t = (1.0 + 4.0 * t1 + t2) / 17.0;\n"
" col.x = col.x > t ? 1.0 : 0.0;\n"
" col.y = col.y > t ? 1.0 : 0.0;\n"
" col.z = col.z > t ? 1.0 : 0.0;\n"
#endif
" gl_FragColor = col;\n"
#endif
"}\n";
#endif


Laden…
Annuleren
Opslaan