Sub-pixel accuracy is a myth. Only thing you have do is to set BLTAPT to 4(dy-dx).
category: residue [glöplog]
Hi folks!
Is anyone here coding blitter?
Here are the procedures, that draw a line from (x1,y1) to (x2,y2) with one pixel in line, accurately. Without unnecessary sub-pixel accuracy. Scary what people develop to work around the problem. Sub-pixel accuracy... Problem was bothering folks sine ever, as it is described wrong in all documentation. I can not stop wonder why is it me that develops this things instead of all mankind. It's not enough to be a master and build up a program of sources. One has to be a doctor to find out what's wrong in publications and how to fix it.
Tah! Dah! The solution is: BLTAPT ($dff050) has to be set, just like BLTAMOD, to: 4*(dy-dx). Not to 4*dy-2*dx, what's printed everywhere.
When I think about all these books and magazine articles read in the last 30 years, all with the same error. Was this all only published to fool me?
In situations like this, I start to think, that I am held in aqualung fed with bullshit until I develop a solution. Sadism.
Here's some code:
https://www.laffik.com/freebies/Accurate%20Line%20and%20Filled%20Polygon.zip
Is there anyone in Amiga coding yet?
Is anyone here coding blitter?
Here are the procedures, that draw a line from (x1,y1) to (x2,y2) with one pixel in line, accurately. Without unnecessary sub-pixel accuracy. Scary what people develop to work around the problem. Sub-pixel accuracy... Problem was bothering folks sine ever, as it is described wrong in all documentation. I can not stop wonder why is it me that develops this things instead of all mankind. It's not enough to be a master and build up a program of sources. One has to be a doctor to find out what's wrong in publications and how to fix it.
Tah! Dah! The solution is: BLTAPT ($dff050) has to be set, just like BLTAMOD, to: 4*(dy-dx). Not to 4*dy-2*dx, what's printed everywhere.
When I think about all these books and magazine articles read in the last 30 years, all with the same error. Was this all only published to fool me?
In situations like this, I start to think, that I am held in aqualung fed with bullshit until I develop a solution. Sadism.
Here's some code:
https://www.laffik.com/freebies/Accurate%20Line%20and%20Filled%20Polygon.zip
Is there anyone in Amiga coding yet?
seems you missed april 1st by some days :)
(and yeah, i'm doing some amiga asm coding)
(and yeah, i'm doing some amiga asm coding)
don't let Scali hear this!
You don't believe it. Lines in SING mode target x1,y1 and x2,y2 always with the first and the last pixels on x1,y1 and x2,y2. No need for sub-pixel accuracy. It's only enough to set BLTAPT to 4*(dy-dx). When 4*dy-2*dx, line has pixels shifted to the side and only the first pixel is on place.
All this sub-pixel accuracy guides are ketor-kezlok and have no sense. Since last Revision I correct all the bugs in all documentations I've got. There's a bit of it. That's why as a teenager I didn't code a lot. You have to know, there's lies top to bottom everywhere, and only when you doubt authority, you can figure out solution. By yourself.
It works - invention of a century!!!!
All this sub-pixel accuracy guides are ketor-kezlok and have no sense. Since last Revision I correct all the bugs in all documentations I've got. There's a bit of it. That's why as a teenager I didn't code a lot. You have to know, there's lies top to bottom everywhere, and only when you doubt authority, you can figure out solution. By yourself.
It works - invention of a century!!!!
about sub-pixel accuracy
yeah, I am a foreigner, however, however, however this is what they say in PROPER (very improper) documentation for drawing SING lines with Blitter for filling up. to prevent gaps and joining neighbouring pixels, there's recommended sub-pixel accuracy. Subpixel accuracy and XOR mode (it should be OR and right BLTAPT):
https://github.com/niklasekstrom/blitter-subpixel-line/blob/master/Sub-pixel%20accurate%20rasterization%20of%20polygons%20using%20the%20Amiga%20blitter.pdf
It's not me that invented use of this collocation in this context.
I invented BLTAPT trick and I gonna explode!!!! I am wiser than 40 years of Amiga coders!!! No one developed it before!!!! Or all the world ganged up again, and held it away from me for decades?????
COOOVAAHHH!!!!
https://github.com/niklasekstrom/blitter-subpixel-line/blob/master/Sub-pixel%20accurate%20rasterization%20of%20polygons%20using%20the%20Amiga%20blitter.pdf
It's not me that invented use of this collocation in this context.
I invented BLTAPT trick and I gonna explode!!!! I am wiser than 40 years of Amiga coders!!! No one developed it before!!!! Or all the world ganged up again, and held it away from me for decades?????
COOOVAAHHH!!!!
*Arnie voice* GET TO THE COPPER!!
Are you bartoshes brother? Geniuses think alike! You should present your findings at the next NooooN underground party
Also, looking forward to your winning entry at Revision. If it will.not win, then it's a rigged system!!!!!
no Blitter lines in my prods. at Revision :(
Phong routine required drawing edges of a cube by a processor - slow as a slimes...
Phong routine required drawing edges of a cube by a processor - slow as a slimes...
Just for ref, this may be useful https://github.com/Kalmalyzer/subpixel-blitter-line
U say useful. Maybe you didn't understand either. I didn't write query, I wrote ready solution.
Kalmalyzer does the same error: BLTAPT=4*dy-2*dy,
and is hazing something about subpuxel accuracy.
Easiest solution is BLAPT=4*dy-4*dx
No subpixel bullocks needed.
That's all. I gave solution of ethernal problem.
You will not start about lack of humbleness or meeknes or so?
Did I text to the church authority?
No. I text to coders' forum. It's solving.
Kalmalyzer does the same error: BLTAPT=4*dy-2*dy,
and is hazing something about subpuxel accuracy.
Easiest solution is BLAPT=4*dy-4*dx
No subpixel bullocks needed.
That's all. I gave solution of ethernal problem.
You will not start about lack of humbleness or meeknes or so?
Did I text to the church authority?
No. I text to coders' forum. It's solving.
Seems like my troll detector was off today
Yeah, a bit... ;]
I don't know what this thread is about but just wanted to say hi.
You know, there were times, when people were programing machines. Using resources for this. Memory maps, lists of instructions, algorhytms. Just much later it was computers programming computers or computers programming people.
And when there was error in maps or such, code didn't work. Coder didn't know why. Everything was fine according to documentations, but it didn't run.
At some point I've noticed that there are differences in publications relating to the same registers or instructions.
I used to know it's only Polish and German or Russian versions of history, that differs.
That gave idea of doubt in what's stated and starting empiric (experiments and tests) research instead.
Then errors were discovered, spotted and corrected.
It was obvious there are lies printed everywhere and each has to be a doctor to find what's wrong and fix it. It's not enough to be a master who can develop things.
This topic and other ones about minterms and octants are also about it, as well as improvements in existing solutions (optimalisation).
To memorise this Vistula river flows through Toruń, Poland east-west on maps (including Google), while in real it goes west-east.
Copernicus, born in Toruń, also discovered it is not a planets and Sun spinning around Earth, it's Earth and planets spinning around the Sun.
Life is not a relativistic, and the truth is out there...
And when there was error in maps or such, code didn't work. Coder didn't know why. Everything was fine according to documentations, but it didn't run.
At some point I've noticed that there are differences in publications relating to the same registers or instructions.
I used to know it's only Polish and German or Russian versions of history, that differs.
That gave idea of doubt in what's stated and starting empiric (experiments and tests) research instead.
Then errors were discovered, spotted and corrected.
It was obvious there are lies printed everywhere and each has to be a doctor to find what's wrong and fix it. It's not enough to be a master who can develop things.
This topic and other ones about minterms and octants are also about it, as well as improvements in existing solutions (optimalisation).
To memorise this Vistula river flows through Toruń, Poland east-west on maps (including Google), while in real it goes west-east.
Copernicus, born in Toruń, also discovered it is not a planets and Sun spinning around Earth, it's Earth and planets spinning around the Sun.
Life is not a relativistic, and the truth is out there...
@Laffik / 2023-04-04
Ever tried loading the following registers for line drawing like this?:
BLTAPTL = -dx (or alternatively 2dy-dx)
BLTAMOD = -2dx
BLTBMOD = 2dy
Ever tried loading the following registers for line drawing like this?:
BLTAPTL = -dx (or alternatively 2dy-dx)
BLTAMOD = -2dx
BLTBMOD = 2dy
both versions, -dx and 2dy-dx does not pull to one of the points.
mine version is exact. I still test it for various octants, lengths...
It works.
mine version is exact. I still test it for various octants, lengths...
It works.
Quote:
That's why as a teenager I didn't code a lot. You have to know, there's lies top to bottom everywhere, and only when you doubt authority, you can figure out solution. By yourself.
I heard there is a secret government conspiracy that aims to prevent teenagers from coding correctly the Amiga blitter. There are only a handful of coders that survived this to tell the tale!
There are so many ways to achieve a same effect on the Amiga by using copper, blitter or pure cpu and to develop your own tricks. That's why this machine is so wonderful. No one owns the truth. It's all about experience and passion. So thanks for sharing but don't blame others, especially experienced coders. What everybody said is that ADA or EAB are probably better places to post your findings than pouet forums. You'll get more chance to hit the good audience and be rewarded for that.
Subpixel accuracy using the Amiga Blitter means that the slope between two x,y points is different depending on the subpixel information. This must be demonstrated in a release. <- reason to demo! <3
I know of some examples on Youtube, but again see above. I checked your releases and they do not demonstrate this. Thanks for sharing source, but this really is the difference between source and demo, or between Linux and .exe if you will. (In modern environments there are kinds of things to muddy the waters, which changes not one thing, if we are to have a Demoscene.)
Returning to topic: Slope between two x,y points being different depending on the subpixel information is possible using different methods, to demonstrate it properly you must get close to the CPU plotters. Basically turn the object and show it's smoother than normal. First reference is to beat this by Finnish coder and idol Tai-Pan, which does not use this, just proper code: 3D Intro
(Or some of my 3D before and after ofc.)
I know of some examples on Youtube, but again see above. I checked your releases and they do not demonstrate this. Thanks for sharing source, but this really is the difference between source and demo, or between Linux and .exe if you will. (In modern environments there are kinds of things to muddy the waters, which changes not one thing, if we are to have a Demoscene.)
Returning to topic: Slope between two x,y points being different depending on the subpixel information is possible using different methods, to demonstrate it properly you must get close to the CPU plotters. Basically turn the object and show it's smoother than normal. First reference is to beat this by Finnish coder and idol Tai-Pan, which does not use this, just proper code: 3D Intro
(Or some of my 3D before and after ofc.)
nnaaayyy... don't sell me subpixel theory back again... in place where I origin from theories work, or land in a trash.
my vector player routine works properly on normal blits of Blitter:
Ad 3 posts ago: About conspiracy - it's true, there were banking and internet shopping developed and homemade coders were militantly muted, to make sure, that mankind will not twerk something with it. just like as if they knew how and have access to particular memory maps of banks, shops and wires. we are ruled by dangerous paranoid schizophreniacs!
Ad 2 posts ago: ADA? last post in 2017....
my vector player routine works properly on normal blits of Blitter:
Ad 3 posts ago: About conspiracy - it's true, there were banking and internet shopping developed and homemade coders were militantly muted, to make sure, that mankind will not twerk something with it. just like as if they knew how and have access to particular memory maps of banks, shops and wires. we are ruled by dangerous paranoid schizophreniacs!
Ad 2 posts ago: ADA? last post in 2017....
@Laffik / 2023-04-06
The 4(dy-dx) is "just" another initialisation of the decision variable as compared
to 0 or 2dy-dx that are usually used in Bresenham's line drawing algorithm, but
if this leads to a better accuracy and less jitter all the better. But what's your
interpretation / explanation why that's the case?
@Laffik / 2023-04-07
P.S.: Is that cube supposed to demonstrate the superiority of 4(dy-dx)???
The 4(dy-dx) is "just" another initialisation of the decision variable as compared
to 0 or 2dy-dx that are usually used in Bresenham's line drawing algorithm, but
if this leads to a better accuracy and less jitter all the better. But what's your
interpretation / explanation why that's the case?
@Laffik / 2023-04-07
P.S.: Is that cube supposed to demonstrate the superiority of 4(dy-dx)???
no, no interpretation. there's no theory at all. I've just played it out. Pure empirism. tests are the base of any science.
I had been drawing lines according to guides. I've seen that pixels are shifted along the line, so the last point wasn't drawn. I started experiment with shift register, where $8000 is written. Poinlessly, I changed some other registers. Finally, when I changed 4dy-2dx to 4dy-4dx I had perfect line drawn. With both points linked and even equal step along the line! Monte-carlo method, trials-and-errors or willy-nilly, as they say, but nothing's better than this!
So, definitely this is the right method. No theory above experience. Unless one is dogmatically-axiomatically up-set in religious attitude. Follower of superiously given 'thruth' to follow.
8{D
That cube in picture tests plenty of polygons drawn my way, and so far, no points missed, no lines skipped. Flawless. Superior as the skies!!!
I had been drawing lines according to guides. I've seen that pixels are shifted along the line, so the last point wasn't drawn. I started experiment with shift register, where $8000 is written. Poinlessly, I changed some other registers. Finally, when I changed 4dy-2dx to 4dy-4dx I had perfect line drawn. With both points linked and even equal step along the line! Monte-carlo method, trials-and-errors or willy-nilly, as they say, but nothing's better than this!
So, definitely this is the right method. No theory above experience. Unless one is dogmatically-axiomatically up-set in religious attitude. Follower of superiously given 'thruth' to follow.
8{D
That cube in picture tests plenty of polygons drawn my way, and so far, no points missed, no lines skipped. Flawless. Superior as the skies!!!