antialiasing

Issue with Android OpenGL Multisampling/Antialiasing

↘锁芯ラ 提交于 2019-12-05 22:44:20
I'm working on an app for Android allows the user to tap the screen to draw colors. I've got all of the drawing code working nicely under OpenGL (testing on Android 4.0.4, Galaxy Nexus, though I'm trying to make this backward compatible as far as possible; my SDK targets API 14 but has a minSDK of 8). The issue I've run into is with antialiasing; I want all my polygons and lines to be antialiased, but they're coming out jagged. I'm positive the Galaxy Nexus supports antialiasing (I've seen it in other apps), so I'm sure I'm doing something wrong. I've been up and down Google for over an hour

Make edges of SKSpriteNode look smooth after rotation

本秂侑毒 提交于 2019-12-05 21:22:40
I create a SKSpriteNode like that: var shape:SKSpriteNode = SKSpriteNode(color: UIColor.redColor(), size: CGSizeMake(CGFloat(sizeOfShape), CGFloat(sizeOfShape))) How can I achieve, that a SKSpriteNode has still smooth edges, after I've rotated it. Currently, it looks like that: As you see, the edges are jagged. 来源: https://stackoverflow.com/questions/25532760/make-edges-of-skspritenode-look-smooth-after-rotation

Add 'fake' antialiasing to rotated rectangle

一笑奈何 提交于 2019-12-05 21:16:33
I'm using Corona SDK, which fairly recently disabled antialiasing, without a way to re-enable it. I have several apps that use rotated rectangles and lines, and would like a way for to not look jagged. This image shows the difference: Is there a way to add some sort of antialiasing to these rectangles in Corona? I'd much prefer an antialias hack and be able to use new Corona features and fixes than use an old build with antialiasing.] Thanks! You can use masks to your rects or images, it can minimize aliasing and it's a good alternative in anti-aliasing I test the rect without a mask, it's

SKTexture nearest filtering mode doesn't work (Making Pixel Art)

懵懂的女人 提交于 2019-12-05 16:49:33
I used a relatively small image (44pixel tall) and scaled it up to have a pixel art look. I tried to change the filtering mode to nearest so the anti-aliasing would disappear but it didn't. It appears with blurry edges. I tried the same with a background getting the same result. let myNode = SKSpriteNode() class GameScene: SKScene { func makeNode() { myNode.position = CGPoint(x: self.frame.size.width/2, y: self.frame.size.height/2) myNode.size = CGSize(width: 200, height: 200) myNode.texture = SKTexture(imageNamed: "image") myNode.texture!.filteringMode = .Nearest return self.addChild(myNode)

Anti alias mode differences?

丶灬走出姿态 提交于 2019-12-05 16:21:39
问题 Is there a difference between these two Anti Alias modes? e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.HighQuality I've tested both methods and can't see any difference. 回答1: There is no difference. See http://msdn.microsoft.com/en-us/library/z714w2y9.aspx : AntiAlias and HighQuality are equivalent and specify rendering with smoothing applied. 来源: https://stackoverflow.com/questions/15926123/anti-alias-mode-differences

HTML5 Canvas stroke not anti-aliased

烈酒焚心 提交于 2019-12-05 11:54:24
I'm just trying to make a circle with a thick anti-aliased stroke in canvas. The circle gets drawn as expected, but the edges of the stroke are very jaggy. I keep reading that Chrome forces anti-aliasing, so not sure what to do... Fiddle: http://jsfiddle.net/nipponese/hWsxw/ HTML <div id="main"> <canvas id="myCanvas" width="400" height="400" style="border: 1px solid #000"></canvas> <div id="counter" style="height: 100px; width: 100px; border: 1px solid #000"> </div> </div> The JS + jQuery <script> function calc(myVal) { var canvas = document.getElementById("myCanvas"); var ctx = canvas

Anti Alias, UIImage and Performance

佐手、 提交于 2019-12-05 10:49:23
I have a UIImage loaded into a UIImageView . The UIImage is larger than the UIImageView and it has been scaled down to fit. Obviously the scaled down UIImage shows jagged edges. What is the best way to anti-alias this image with regards to performance? I've seen this method using drawInRect but I've also read that drawInRect does not give the best performance . I've read several different articles and I've tried a few methods myself. But after reading a few more posts on the performance differences between using UIViews and Core Graphics, I was wondering which method for anti aliasing an image

CSS bad rendering in translateZ( ) vs scale( )

我只是一个虾纸丫 提交于 2019-12-05 00:42:33
I noticed that there is a big quality difference when transforming text in this 2 ways: .text1 { width: 200px; height: 22px; position: absolute; top: 40%; left: 0; transform-origin: 50% 50%; transform: scale(2); /* here */ color: red; text-align: center; font-size: 22px; } .text2 { width: 200px; height: 22px; position: absolute; top: 60%; left: 0; transform-origin: 50% 50%; transform: translateZ(400px); /* here */ text-align: center; font-size: 22px; } .perspective { width: 200px; height: 200px; perspective: 800px; transform-style: preserve-3d; } <div class="perspective"> <div class="text1"

ThreeJS SSAO with SSAA

↘锁芯ラ 提交于 2019-12-04 21:06:53
i'd like to integrate the SSAO-Shader (Screen Space Ambient Occlusion) into my antialiasing render stack (Super Sampling Anti-Aliasing). The AA is necessary for high-quality rendering, the default antialiasing delivered by my gpu isn't always sufficient. Now i've already integrated SSAO into the usual render process, but my new goal is to combine both techniques. For this, i've set up a fiddle. The first EffectComposer renders the scene onto a renderTarget with twice the resolution of the canvas. From this, i'd like to use the depthTarget for SSAO. The final step is to draw the rendered image

Can u ? How to anti alias for SurfaceView in android?

别来无恙 提交于 2019-12-04 20:01:39
This is a test project for antialias in Surface View and View, in the View : ( it's very good for antialias ) @Override protected void onDraw(Canvas canvas) { Paint p = new Paint(); p.setColor(Color.WHITE); canvas.setDrawFilter(new PaintFlagsDrawFilter(0, Paint.ANTI_ALIAS_FLAG|Paint.FILTER_BITMAP_FLAG)); canvas.drawColor(Color.BLACK); Matrix mMatrix = new Matrix(); mMatrix.postScale(0.34f, 0.34f); canvas.drawBitmap(mBitmap, mMatrix, p); canvas.drawText("View Anti alias", 100, 300, p); } in the Surface View : ( ugly -_-!!) public void doDraw(Canvas canvas) { Paint p = new Paint(); p.setColor