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

Linux, Vulkan: player's hand is not rendered #2

Closed
thesourcehim opened this issue Feb 26, 2021 · 20 comments
Closed

Linux, Vulkan: player's hand is not rendered #2

thesourcehim opened this issue Feb 26, 2021 · 20 comments

Comments

@thesourcehim
Copy link

I use some hi-res models from http://www-personal.umich.edu/~jimw/q2/ and with vulkan renderer (GeForce 740M) player's hand holding blaster is not rendered. Works fine with OpenGL.
q2_0000

@Yamagi
Copy link
Member

Yamagi commented Feb 26, 2021

Can you retest with the current git head? I've just merged a pull request with several vulkan fixes. Nothing particular in the model code, nevertheless it might help.

@thesourcehim
Copy link
Author

Just tested it, still no hand.

@0lvin
Copy link
Contributor

0lvin commented Mar 30, 2021

Have you used selected some custom player model?

@thesourcehim
Copy link
Author

I'm using the following files from the server I linked above (in baseq2 directory):
-rw-rw-r-- 1 thesource thesource 17767691 jan 28 2020 models.zip
-rw-rw-r-- 1 thesource thesource 307015717 jan 28 2020 q2xp0.zip
-rw-rw-r-- 1 thesource thesource 53400454 jan 28 2020 q2xpMdl.zip
-rw-rw-r-- 1 thesource thesource 395639113 jan 28 2020 textures_for_q2.zip

I'm not sure how to select specific model. Attaching qconsole.log and config.cfg.
qconsole.log
config.cfg.txt

@Yamagi
Copy link
Member

Yamagi commented Apr 7, 2021

This should be might / should be fixes in the latest test build: https://deponie.yamagi.org/quake2/windows/testbuilds/quake2-20210407-26bda18.zip

@thesourcehim
Copy link
Author

I tried commit 26bda18 under linux, sorry, but not fixed, same issue.

@rg3
Copy link

rg3 commented Apr 7, 2021

I tried commit 26bda18 under linux, sorry, but not fixed, same issue.

Shot in the dark: can you try rg3/yquake2@4791e19 to see if that happens to fix the problem?

@thesourcehim
Copy link
Author

I tried commit 26bda18 under linux, sorry, but not fixed, same issue.

Shot in the dark: can you try rg3@4791e19 to see if that happens to fix the problem?

Sorry, it doesn't. I tried on both nvidia card and intel integrated graphics - same result.

@rg3
Copy link

rg3 commented Apr 8, 2021

Sorry, it doesn't. I tried on both nvidia card and intel integrated graphics - same result.

Bummer. Thanks a lot for testing!

@0lvin
Copy link
Contributor

0lvin commented Apr 8, 2021

I have checked locally and can reproduce bug.

Right hand is not rendered and through place where should be hand is visible world model.

Left hand is rendered without issues.

@thesourcehim
Copy link
Author

I have checked locally and can reproduce bug.

Right hand is not rendered and through place where should be hand is visible world model.

Left hand is rendered without issues.

I just noticed that player model is not the only one affected by this. Strogg soldiers at the beginning seem to be missing one of the hands too.

@turol
Copy link

turol commented Apr 9, 2021

Sounds like a triangle winding issue.

@thesourcehim
Copy link
Author

Here's another screenshot showing that it's not just player model that is affected:

q2_0002

@Spirrwell
Copy link
Contributor

Spirrwell commented May 29, 2021

I do believe I've figured this out. It looks like the OpenGL backends disable blending when checking against the RF_TRANSLUCENT flag via glDisable.

It looks like the Vulkan backend intends for there to be two pipelines, one for translucent objects with depth writes disabled, and one for normal non-translucent objects. Blending was enabled for both, when I think it's only meant to be enabled for the translucent pipeline.

I don't know for absolute certain if this might have other side effects, so if somebody who's more familiar with how things SHOULD look, please test out either my ref_vk fork or simply commenting out vk_drawModelPipelineFan[i].blendOpts.blendEnable = VK_TRUE; in vk_common.c on the official repo: https://github.com/yquake2/ref_vk/blob/master/src/vk/vk_common.c#L1366

@0lvin
Copy link
Contributor

0lvin commented May 29, 2021

Good catch :-)

Looks as its safe fix, we have used this pipeline only for models (first one for UI and second one for World models), look to

int pidx = (r_newrefdef.rdflags & RDF_NOWORLDMODEL) ? RP_UI : RP_WORLD;

@0lvin
Copy link
Contributor

0lvin commented Jun 1, 2021

@Spirrwell Could you please create pull request for ref_vk repository?

@DanielGibson DanielGibson transferred this issue from yquake2/yquake2 Jun 1, 2021
@DanielGibson
Copy link
Member

DanielGibson commented Jun 1, 2021

I just found out that Github (now?) allows moving issues between repos, so I moved the open Vulkan issues (including this one) from the main yquake2 repo to the ref_vk repo.

@Spirrwell
Copy link
Contributor

@Spirrwell Could you please create pull request for ref_vk repository?

I can do that. I was hoping to tackle other Vulkan related issues and do a pull request then. Do you want me to just open one and add to it?

@0lvin
Copy link
Contributor

0lvin commented Jun 3, 2021

I can do that. I was hoping to tackle other Vulkan related issues and do a pull request then.

Pull request with WIP prefix could be useful to see progress and prevent work on same issues in same time.

@Spirrwell You have made really great progress on fixing all known bugs in your branch and make sense to share such news :-)

@Yamagi
Copy link
Member

Yamagi commented Jun 14, 2021

Fixed by merging #5.

@Yamagi Yamagi closed this as completed Jun 14, 2021
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

No branches or pull requests

7 participants