浏览代码

Backends: OpenGL3: OpenGL: Fixed ES 3.0 shader ("#version 300 es") to use normal precision floats. (#4463)

Nicolas Noble 4 年之前
父节点
当前提交
e3e1fbcf02
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 2 1
      backends/imgui_impl_opengl3.cpp
  2. 2 0
      docs/CHANGELOG.txt

+ 2 - 1
backends/imgui_impl_opengl3.cpp

@@ -14,6 +14,7 @@
 
 
 // CHANGELOG
 // CHANGELOG
 // (minor and older changes stripped away, please see git history for details)
 // (minor and older changes stripped away, please see git history for details)
+//  2021-08-23: OpenGL: Fixed ES 3.0 shader ("#version 300 es") use normal precision floats to avoid wobbly rendering at HD resolutions.
 //  2021-08-19: OpenGL: Embed and use our own minimal GL loader (imgui_impl_opengl3_loader.h), removing requirement and support for third-party loader.
 //  2021-08-19: OpenGL: Embed and use our own minimal GL loader (imgui_impl_opengl3_loader.h), removing requirement and support for third-party loader.
 //  2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
 //  2021-06-29: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX).
 //  2021-06-25: OpenGL: Use OES_vertex_array extension on Emscripten + backup/restore current state.
 //  2021-06-25: OpenGL: Use OES_vertex_array extension on Emscripten + backup/restore current state.
@@ -625,7 +626,7 @@ bool    ImGui_ImplOpenGL3_CreateDeviceObjects()
         "}\n";
         "}\n";
 
 
     const GLchar* vertex_shader_glsl_300_es =
     const GLchar* vertex_shader_glsl_300_es =
-        "precision mediump float;\n"
+        "precision highp float;\n"
         "layout (location = 0) in vec2 Position;\n"
         "layout (location = 0) in vec2 Position;\n"
         "layout (location = 1) in vec2 UV;\n"
         "layout (location = 1) in vec2 UV;\n"
         "layout (location = 2) in vec4 Color;\n"
         "layout (location = 2) in vec4 Color;\n"

+ 2 - 0
docs/CHANGELOG.txt

@@ -38,6 +38,8 @@ HOW TO UPDATE?
 Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.84.2
 Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.84.2
 
 
 - Disabled: Fixed nested BeginDisabled()/EndDisabled() calls. (#211, #4452, #4453, #4462) [@Legulysse]
 - Disabled: Fixed nested BeginDisabled()/EndDisabled() calls. (#211, #4452, #4453, #4462) [@Legulysse]
+- Backends: OpenGL3: OpenGL: Fixed ES 3.0 shader ("#version 300 es") to use normal precision
+  floats. Avoid wobbly rendering at HD resolutions. (#4463) [@nicolasnoble]
 
 
 
 
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------