Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Blurry Texture Rendering in WebGLRenderer #718

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

jonobr1
Copy link
Owner

@jonobr1 jonobr1 commented Feb 22, 2024

Reported by @benz2012:

This PR improves blurry textures by appropriately scaling uploaded textures to the GPU by the renderer's pixel density.

Before After
Screenshot 2024-02-21 at 10 20 27 PM Screenshot 2024-02-21 at 10 19 42 PM

For a scene such as:

const two = new Two({
  type: Two.Types.webgl,
  fullscreen: true,
  autostart: true
}).appendTo(document.body);

const params = {
  size: 100,
  fill: '#000',
  stroke: '#00aeff',
  linewidth: 3,
  weight: 'bold'
};
const text = two.makeText('Hello World', two.width / 2, two.height / 2, params);

@jonobr1 jonobr1 self-assigned this Feb 22, 2024
@jonobr1 jonobr1 added this to the v0.8.x milestone Feb 22, 2024
@jonobr1 jonobr1 linked an issue Feb 22, 2024 that may be closed by this pull request
@jonobr1 jonobr1 merged commit 6fc7745 into dev Feb 22, 2024
2 checks passed
@jonobr1 jonobr1 deleted the issue-703-webgl-blurry branch February 22, 2024 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] WebGL Renderer Blurry
1 participant