[m32 ARM Linux, 4fcf993] Particles seem "stretched"
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
[m32 ARM Linux, 4fcf993] Particles seem "stretched"
This is a little difficult to explain, but I will do the best I can.
album here.
On my RPi3 (in 32-bit mode), Particles have an odd "stretch" to them. at a distance, particles look as if they are taller than they are wide. it's really noticeable at low resolutions.
For comparison, here is the last stable release:
album here.
On my RPi3 (in 32-bit mode), Particles have an odd "stretch" to them. at a distance, particles look as if they are taller than they are wide. it's really noticeable at low resolutions.
For comparison, here is the last stable release:
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
Does this happen at the same resolution on an x86?
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
I was just checking that, and yes it does, at least on my Mac (Core i7).
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
I'll take a look at this while I revamp the particle drawers in my RGB666 submission.
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
Could it be simply the particles being affected by the aspect ratio correction? Pixels being 1.2 times taller than they are wide would be consistent with that.
- InsanityBringer
- Posts: 3386
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
I dunno, the particles seem to appear extra tall when they're further away. Though comparing the multiple views, that may be to some degree multiple particles "sitting" on top of each other. hmm
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
The code calculating the width and height of the particle is done in R_ProjectParticle. Specifically, the width is particle->size / 8.0 * centerx / z and the height is YaspectMul * width.
YaspectMul is the pixel aspect ratio (value is 1/1.2 if I remember correctly). So it seems that Gez is right. It can probably be fixed by just assigning yscale the same value as xscale in this line.
YaspectMul is the pixel aspect ratio (value is 1/1.2 if I remember correctly). So it seems that Gez is right. It can probably be fixed by just assigning yscale the same value as xscale in this line.
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
It's mostly that you lose visual precision. Csonicgo did say the effect was more noticeable at low resolution. E.g. suppose the particle is drawn at a distance so that it has a scale of 1.4. Horizontally, 1 texel x 1.4 scale = 1.4 pixel, gets rounded down to 1. Vertically, 1.2 texels x 1.4 scale = 1.68 pixel, gets rounded up to 2. Result: your 1x1.2 particle becomes 1x2.InsanityBringer wrote:I dunno, the particles seem to appear extra tall when they're further away. Though comparing the multiple views, that may be to some degree multiple particles "sitting" on top of each other. hmm
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
Aspect Ratio is broken on 32-bit builds, so that cannot be it.Gez wrote:Could it be simply the particles being affected by the aspect ratio correction? Pixels being 1.2 times taller than they are wide would be consistent with that.
EDIT: YEP, that's another bug, y'all!
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
If anything, shouldn't they probably just be width/YaspectMul to counter the screen stretching?dpJudas wrote:The code calculating the width and height of the particle is done in R_ProjectParticle. Specifically, the width is particle->size / 8.0 * centerx / z and the height is YaspectMul * width.
YaspectMul is the pixel aspect ratio (value is 1/1.2 if I remember correctly). So it seems that Gez is right. It can probably be fixed by just assigning yscale the same value as xscale in this line.
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
There is no stretching for a particle (they did not exist in original Doom). Cherry-pick this this commit to fix it in ZDoom.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
Not sure if that is the right way to go, because yAspectMul is a general factor for aspect ratio correction, which not necessarily is 1.2.
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
Okay, it might be that equation then needs to be the other way around. That is, xscale needs to be set to the value of yscale. One thing is certain though - if the particles are to be square on the screen, then both those scale values needs to have the same value in the end.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
Only if the screen pixels are square.
Re: [m32 ARM Linux, 4fcf993] Particles seem "stretched"
Which they are on modern monitors.