[Viewport]
Camera = Camera
;RelativePosition = bottom right
;Position = (100, 100, 0); NB: Position is in pixels and will be ignored if RelativePosition is specified
;RelativeSize = (0.5, 0.5, 0.0)
;Size = (200, 150, 0) NB: Size is in pixels and will be ignored if RelativeSize is specified
;BackgroundColor = (255, 180, 0)
[Camera]
; We use the same size for the camera than our display on screen so as to obtain a 1:1 ratio
FrustumWidth = @Display.ScreenWidth
FrustumHeight = @Display.ScreenHeight
;FrustumWidth = 2000
;FrustumHeight = 300
FrustumFar = 1.0
FrustumNear = 0.0
Position = (0.0, 0.0, -1.0)
;Zoom = 0.9
;Rotation = 35
[Object]
Graphic = Graphic
;AutoScroll = x
;Color = (255, 0, 200)
;Alpha = 0.4
;Flip = both
;Position = (100.0, 200.0, 0.0)
Rotation = 30
;Scale = (3.0, 1.0, 1.0) NB: z is ignored for 2D objects
;Smoothing = true
;BlendMode = add
;AngularVelocity = 1800
Speed = (0, 0, 0)
TrackList = T
[Text]
String = Why should we use a texture when we can use a text?!
[Graphic]
Texture = ../data/object/bg.jpg
;Text = Text; <= If you want to see the text, you need to comment out the texture
Pivot = center
;TextureCorner = (50, 20, 0) NB: z is ignored
;TextureSize = (50, 80, 0) NB: z is ignored
;Repeat = (3.0, 2.0, 0.0)
;Flip = both
;Color = (0, 0, 255)
;Alpha = 0.6
Smoothing = true
That's very known issue while rotating square texture with no alpha border, try to insert a border of alpha pixel or transparent pixel in your image using photoshop or gimp. This would smoothen the edge a lot. So if you image size is 16x16, make it 17x17 with transparent pixel around the border.
edit : 17x17 wont work for 16x16 image, you need 18x18, 1 pixel on each side of your image
Ah I see from where the confusion is coming.
The smoothing attribute corresponds to texture filtering (ie. hardware interpolation done inside the texture surface while sampling), not to anti-aliasing.
You can use Jim's trick in order to get less rough edges (ie. having filtering on those extra rows of pixels) or you can integrate any anti-aliasing technique that would work for you, such as FXAA (which is a post-processing shader).
Comments
; Should be used with orx v.1.4+
[Display]
;ScreenWidth = 1366
;ScreenHeight = 768
ScreenWidth = 800
ScreenHeight = 600
Title = SharpDawn
;FullScreen =true
;Smoothing =true
;DepthBuffer =true
[Input]
SetList = MainInput
[MainInput]
KEY_ESCAPE = Quit
KEY_SPACE = Screenshot
[Render]
;nFrequency = <float>
ShowFPS = true
;ShowProfiler = true
;onsoleColor = <vector>
[Viewport]
Camera = Camera
;RelativePosition = bottom right
;Position = (100, 100, 0); NB: Position is in pixels and will be ignored if RelativePosition is specified
;RelativeSize = (0.5, 0.5, 0.0)
;Size = (200, 150, 0) NB: Size is in pixels and will be ignored if RelativeSize is specified
;BackgroundColor = (255, 180, 0)
[Camera]
; We use the same size for the camera than our display on screen so as to obtain a 1:1 ratio
FrustumWidth = @Display.ScreenWidth
FrustumHeight = @Display.ScreenHeight
;FrustumWidth = 2000
;FrustumHeight = 300
FrustumFar = 1.0
FrustumNear = 0.0
Position = (0.0, 0.0, -1.0)
;Zoom = 0.9
;Rotation = 35
[Object]
Graphic = Graphic
;AutoScroll = x
;Color = (255, 0, 200)
;Alpha = 0.4
;Flip = both
;Position = (100.0, 200.0, 0.0)
Rotation = 30
;Scale = (3.0, 1.0, 1.0) NB: z is ignored for 2D objects
;Smoothing = true
;BlendMode = add
;AngularVelocity = 1800
Speed = (0, 0, 0)
TrackList = T
[Text]
String = Why should we use a texture when we can use a text?!
[Graphic]
Texture = ../data/object/bg.jpg
;Text = Text; <= If you want to see the text, you need to comment out the texture
Pivot = center
;TextureCorner = (50, 20, 0) NB: z is ignored
;TextureSize = (50, 80, 0) NB: z is ignored
;Repeat = (3.0, 2.0, 0.0)
;Flip = both
;Color = (0, 0, 255)
;Alpha = 0.6
Smoothing = true
[Screenshot]
Extension = png
[T]
0 = > Input.IsActive Screenshot # EvalIf < "Screenshot.Capture"
Loop = true
edit : 17x17 wont work for 16x16 image, you need 18x18, 1 pixel on each side of your image
The smoothing attribute corresponds to texture filtering (ie. hardware interpolation done inside the texture surface while sampling), not to anti-aliasing.
You can use Jim's trick in order to get less rough edges (ie. having filtering on those extra rows of pixels) or you can integrate any anti-aliasing technique that would work for you, such as FXAA (which is a post-processing shader).