Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove tearing on muzzleflashes? #321

Open
12sunflowers opened this issue Oct 19, 2023 · 11 comments · May be fixed by #368
Open

remove tearing on muzzleflashes? #321

12sunflowers opened this issue Oct 19, 2023 · 11 comments · May be fixed by #368

Comments

@12sunflowers
Copy link

12sunflowers commented Oct 19, 2023

Hello!
Linux
gf9800gtx
Is there way remove tearing on muzzleflashes(see video on streamable)
https://streamable.com/d0x7jv?t=4&src=player-page-share
I do not want turn off Dynamic Light effects.
I do want turn ON Vsync.
Can i use ‘cl_async 2’(GL_ARB_sync) on my 9800gtx with proprietary 340.108 driver?
glxinfo-gf9800gtx.txt
Screenshot_2023-10-20_01-07-55

@Calinou
Copy link

Calinou commented Nov 8, 2024

If you're referring to dynamic lights tearing, it's likely because the effect appears for a single frame only for bullet-based weapons. This means that at higher FPS and V-Sync disabled, the effect will be present for less than a frame on your screen, causing this tearing effect.

This is fixed in Nightdive's re-release by making the dynamic light appear for a fixed amount of time (e.g. 50 ms). I remember seeing a fix for this in either Q2PRO or Yamagi Quake 2 (I forgot).

@12sunflowers
Copy link
Author

@Calinou
Hi, thanks for info. How i can find this "fix" for q2pro or yamagi that you maintoned?

@Calinou
Copy link

Calinou commented Nov 12, 2024

@Calinou Hi, thanks for info. How i can find this "fix" for q2pro or yamagi that you maintoned?

I found it, it's yquake2/yquake2@ba2fc77. The light always displays for at least 32 milliseconds, which simulates how long these dynamic lights displayed when the game ran at 30-35 FPS on hardware of the era.

@12sunflowers
Copy link
Author

Thanks a lot! So, only Nightdive remaster and Yamagi have this fix?

@Calinou Calinou linked a pull request Nov 13, 2024 that will close this issue
@Calinou
Copy link

Calinou commented Nov 13, 2024

Thanks a lot! So, only Nightdive remaster and Yamagi have this fix?

Right now, yes, but #368 implements the same fix in Q2PRO.

@12sunflowers
Copy link
Author

Thanks. And its have same result as at Nightdive or Yamagi? How quick its can be implemented?

Muzzleflash dynamic lights are always shown for at least 16 msec in Q2PRO, which corresponds to 60 FPS. This can be raised to 32 msec but in comparison to 16 I don't see much difference in terms of tearing. Tearing is a result of having vsync disabled, you can't avoid it without vsync. The sample video is pretty much useless here since tearing can only be seen on your monitor

I do not understand what want to say skullernet?

@skullernet
Copy link
Owner

I'm saying that the only way to avoid tearing is to enable vsync. With vsync disabled I get tearing in Q2PRO, Yamagi Quake 2 and Nightdive's re-release. In re-release tearing is less noticeable because muzzleflash dynamic light lifetime seems to be much higher there (like 100 msec). But this is also very different from vanilla.

@12sunflowers
Copy link
Author

12sunflowers commented Nov 13, 2024

its bit mess, @Calinou says this fix tearing

I found it, it's yquake2/yquake2@ba2fc77. The light always displays for at least 32 milliseconds, which simulates how long these dynamic lights displayed when the game ran at 30-35 FPS on hardware of the era.

i am also today try Yamagi with dynamic light and have no seen any tearing like i seen at q2pro.

but you say that not fix? please explain.

@12sunflowers
Copy link
Author

12sunflowers commented Nov 14, 2024

@Calinou
did changes at last master build and build, i see same tearing with dynamic light, why?
effects.c
if (dl->die < cl.time - 32)

@Calinou
Copy link

Calinou commented Nov 15, 2024

did changes at last master build and build, i see same tearing with dynamic light, why?

Did you make the change in the right location? It's at line 146.

@12sunflowers
Copy link
Author

12sunflowers commented Nov 15, 2024

yes, at 146 line
Screenshot_2024-11-15_17-57-16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants