C2 dim displays: remap in shader to avoid screen deadzone (#20757)

pull/20768/head
ZwX1616 4 years ago committed by GitHub
parent f7ea2cd761
commit 2c0b0f927f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      selfdrive/ui/paint.cc

@ -462,6 +462,10 @@ static const char frame_fragment_shader[] =
"out vec4 colorOut;\n"
"void main() {\n"
" colorOut = texture(uTexture, vTexCoord.xy);\n"
#ifdef QCOM
" vec3 dz = vec3(0.0627f, 0.0627f, 0.0627f);\n"
" colorOut.rgb = ((vec3(1.0f, 1.0f, 1.0f) - dz) * colorOut.rgb / vec3(1.0f, 1.0f, 1.0f)) + dz;\n"
#endif
"}\n";
static const mat4 device_transform = {{

Loading…
Cancel
Save