WebGL: Everything is blurry despite using same code

Deadly 提交于 2019-12-05 07:02:54
Zoltán Kurucz

The problem is NOT with the Javascript code you posted, but with the Canvas element.

Contrary to the usual html elements, a Canvas element needs it's width and height attribute and uses it as a logical size.

The CSS width and height you set only stretches the result, that's why you see the blurring.

A more detailed explanation can be found on this question: Canvas width and height in HTML5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!