{"action":"created","issue":{"url":"https://api.github.com/repos/ocornut/imgui/issues/981","repository_url":"https://api.github.com/repos/ocornut/imgui","labels_url":"https://api.github.com/repos/ocornut/imgui/issues/981/labels{/name}","comments_url":"https://api.github.com/repos/ocornut/imgui/issues/981/comments","events_url":"https://api.github.com/repos/ocornut/imgui/issues/981/events","html_url":"https://github.com/ocornut/imgui/issues/981","id":200930636,"number":981,"title":"The render result is blurry (I have tried translate my project matrix)","user":{"login":"daysofbeingwild","id":16398854,"avatar_url":"https://avatars.githubusercontent.com/u/16398854?v=3","gravatar_id":"","url":"https://api.github.com/users/daysofbeingwild","html_url":"https://github.com/daysofbeingwild","followers_url":"https://api.github.com/users/daysofbeingwild/followers","following_url":"https://api.github.com/users/daysofbeingwild/following{/other_user}","gists_url":"https://api.github.com/users/daysofbeingwild/gists{/gist_id}","starred_url":"https://api.github.com/users/daysofbeingwild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daysofbeingwild/subscriptions","organizations_url":"https://api.github.com/users/daysofbeingwild/orgs","repos_url":"https://api.github.com/users/daysofbeingwild/repos","events_url":"https://api.github.com/users/daysofbeingwild/events{/privacy}","received_events_url":"https://api.github.com/users/daysofbeingwild/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-16T04:47:41Z","updated_at":"2017-01-16T10:12:48Z","closed_at":null,"body":"This is what I got when I copy most codes in example/opengl2 into my project.\r\nI just change the fix-function-pipeline rendering funcdtion in the example to the core profile one in my project.\r\n\r\n-------------------------\r\nWhat I did in my rendering functdion:\r\n\r\n1. Make project matrix through GLM's `ortho` function:\r\n`glm::ortho(0.0f, io.DisplaySize.x, io.DisplaySize.y, 0.0f, -1.0f, +1.0f);`\r\n(I have also tried translate this matrix (0.375, 0.375) and (0.5, 0.5) )\r\n\r\n2. Foreach vertex IMGUI provided:\r\n  + For position, make a `vec4(position.xy, 0.f, 1.f)` and multiply this `vec4` by the projection matrix and then extract the result's xy components as vertex position. \r\n  + For texture coordinates, flip the texture coordinates' v component. \r\n  + For vertex color, convert the 32-bits integer represented vertex color provided by IMGUI to vec4, by dividing each bytes by 255.f.\r\n\r\n3. Upload the VBO and EBO.\r\n\r\n4. In my shader, directly set the `gl_Position` to vec4(position.xy, 0.f, 0.f) and set the output `color` as sum of Vertex color and teture color. \r\n\r\nCould you help me to resovle this?\r\n"},"comment":{"url":"https://api.github.com/repos/ocornut/imgui/issues/comments/272821582","html_url":"https://github.com/ocornut/imgui/issues/981#issuecomment-272821582","issue_url":"https://api.github.com/repos/ocornut/imgui/issues/981","id":272821582,"user":{"login":"ocornut","id":8225057,"avatar_url":"https://avatars.githubusercontent.com/u/8225057?v=3","gravatar_id":"","url":"https://api.github.com/users/ocornut","html_url":"https://github.com/ocornut","followers_url":"https://api.github.com/users/ocornut/followers","following_url":"https://api.github.com/users/ocornut/following{/other_user}","gists_url":"https://api.github.com/users/ocornut/gists{/gist_id}","starred_url":"https://api.github.com/users/ocornut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocornut/subscriptions","organizations_url":"https://api.github.com/users/ocornut/orgs","repos_url":"https://api.github.com/users/ocornut/repos","events_url":"https://api.github.com/users/ocornut/events{/privacy}","received_events_url":"https://api.github.com/users/ocornut/received_events","type":"User","site_admin":false},"created_at":"2017-01-16T10:12:48Z","updated_at":"2017-01-16T10:12:48Z","body":"Why aren't you using the OGL3 code as a base?\r\n\r\nCheck the OGL3 shaders for reference of what to do (multiply vertex color by texel color), and check your OpenGL documentation on how to setup shaders.\r\n\r\nI can't see any blurryness here, just the fact that texture isn't being sampled properly. If you actually have blurryness it may be because your ortho matrix doesn't match the size of your render target, or your render target doesn't match the size of your window.\r\n"}}
{"actor":{"display_login":"ocornut"}}