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

rsx/gl/vk/dx12: Add emulated texture fetch for depth read #2173

Merged
merged 3 commits into from Sep 29, 2016

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Sep 28, 2016

#1949

In theory, this allows reading a depth texture into RGBA8 without losing precision. Directly storing depth values into 8-bit textures loses some precision that is hopefully fixed by this.

@mention-bot
Copy link

@kd-11, thanks for your PR! By analyzing the annotation information on this pull request, we identified @vlj, @raven02 and @Nekotekina to be potential reviewers

@kd-11
Copy link
Contributor Author

kd-11 commented Sep 28, 2016

@SakataGintokiYT Please check if it fixes depth problems with naruto. The bad shadows are due to a different issue since they appear earlier on in the draw call, before this particular issue starts. I've analyzed traces from 3 naruto games and they all seem to use the same pattern.

@SakataGintokiYT
Copy link
Contributor

SakataGintokiYT commented Sep 28, 2016

@kd-11
Depth works well

[VK]
Fotoszok.pl
[DX12]
Fotoszok.pl

[GL]

E {rsx::thread} RSX: Failed to compile vertex shader: 0(61) : error C1020: invalid operands to "/"
0(61) : error C1020: invalid operands to "/"
0(61) : error C1020: invalid operands to "/"

E {rsx::thread} RSX: Failed to compile shader: 0(59) : error C1020: invalid operands to "/"
0(59) : error C1020: invalid operands to "/"
0(59) : error C1020: invalid operands to "/"

F {rsx::thread} class gl::glsl::link_exception thrown: linkage failed: 'Vertex info
-----------
0(61) : error C1020: invalid operands to "/"
0(61) : error C1020: invalid operands to "/"
0(61) : error C1020: invalid operands to "/"
(0) : error C2003: incompatible options for link

Fragment info
-------------
0(59) : error C1020: invalid operands to "/"
0(59) : error C1020: invalid operands to "/"
0(59) : error C1020: invalid operands to "/"
(0) : error C2003: incompatible options for link
'

Shaderlog

@kd-11
Copy link
Contributor Author

kd-11 commented Sep 28, 2016

Seems like nvidia compiler doesnt like automatic cast from unsigned int to float.

@kd-11
Copy link
Contributor Author

kd-11 commented Sep 28, 2016

Should be fixed now

@SakataGintokiYT
Copy link
Contributor

SakataGintokiYT commented Sep 28, 2016

@kd-11
Now works on GL.

It's good for merge.

@kd-11 kd-11 changed the title rsx/gl/vk/dx12: Add emulated texture fetch for depth read [WIP] rsx/gl/vk/dx12: Add emulated texture fetch for depth read Sep 28, 2016
@raven02
Copy link
Contributor

raven02 commented Sep 29, 2016

@kd-11 .Let me know if it is okay to merge.

@kd-11
Copy link
Contributor Author

kd-11 commented Sep 29, 2016

Should be good to merge if there are no regressions reported.

@raven02 raven02 merged commit 5430e1d into RPCS3:master Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants