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

albatross
ZwX1616 2021-04-27 17:41:59 -07:00 committed by GitHub
parent f7ea2cd761
commit 2c0b0f927f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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 = {{