Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411633 Posts in 69393 Topics- by 58448 Members - Latest Member: wcored

May 13, 2024, 05:56:39 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)WebGL, turn off AA
Pages: [1]
Print
Author Topic: WebGL, turn off AA  (Read 3833 times)
Quarry
Level 10
*****


View Profile
« on: April 24, 2014, 02:10:37 AM »

How can I just turn AA off to get the result below as it's on by default?



http://www.html5canvastutorials.com/three/html5-canvas-three-js-lambert-material/

I know it's possible because I get an AA cube at get.webgl.org

Logged
Polly
Level 6
*



View Profile
« Reply #1 on: April 24, 2014, 04:06:54 AM »

You can set attributes when creating a context using the ( optional ) second parameter of the getContext method.

Code:
var context = canvas.getContext('webgl', {antialias: false});

Check out chapter 5.2 of the WebGL specification for more information.
Logged
Quarry
Level 10
*****


View Profile
« Reply #2 on: April 24, 2014, 04:13:19 AM »

Thanks!
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic