# HG changeset patch # User John Tsiombikas # Date 1357691825 -7200 # Node ID c45c7a1f7d9daa41fe1014c404e315d771ece3b2 # Parent 1d5dc834d40309d606496f4ba2df1999602d40d7 foo diff -r 1d5dc834d403 -r c45c7a1f7d9d sdr/dither.p.glsl --- a/sdr/dither.p.glsl Tue Jan 08 14:19:06 2013 +0200 +++ b/sdr/dither.p.glsl Wed Jan 09 02:37:05 2013 +0200 @@ -7,6 +7,8 @@ vec4 pixel = texture2D(framebuf, gl_TexCoord[0].xy); float lum = dot(pixel.xyz, vec3(0.2126, 0.7152, 0.0722)); + // gamma correct luminance? + //lum = pow(lum, 1.0 / 2.2); float coord_shift = floor(lum * levels) / levels; vec2 dsz2 = vec2(float(dither_size), float(dither_size)); diff -r 1d5dc834d403 -r c45c7a1f7d9d src/udg.cc --- a/src/udg.cc Tue Jan 08 14:19:06 2013 +0200 +++ b/src/udg.cc Wed Jan 09 02:37:05 2013 +0200 @@ -13,7 +13,7 @@ #include "sdr.h" #include "dither_matrix.h" -#define DITHER_SZ 4 +#define DITHER_SZ 8 #define DITHER_LEVELS 16 #if DITHER_SZ == 4 @@ -165,6 +165,12 @@ glRotatef(cam_phi, 1, 0, 0); glRotatef(cam_theta, 0, 1, 0); + const float blue[] = {0.4, 0.45, 1.0, 1}; + const float white[] = {1, 1, 1, 1}; + glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, blue); + glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, white); + glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 80.0); + glFrontFace(GL_CW); glutSolidTeapot(1.0); glFrontFace(GL_CCW);