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

Bug with AMD RX series gpus and "Flat lit toon shader" #27

Closed
Hoppaw opened this issue Dec 29, 2017 · 138 comments
Closed

Bug with AMD RX series gpus and "Flat lit toon shader" #27

Hoppaw opened this issue Dec 29, 2017 · 138 comments

Comments

@Hoppaw
Copy link

Hoppaw commented Dec 29, 2017

Theres currently a bug with RX 400 and RX 500 gpus where models with "Flat lit toon shader" will turn up invisible. Here's a few bug reports on VRChat about it.
https://vrchat.canny.io/bug-reports/p/avatars-mine-as-well-disappearing-bug-w-flat-lit-shader-or-amd https://docs.vrchat.com/v1.0/discuss/5a40b0ff3cdca90012583e89 https://docs.vrchat.com/v1.0/discuss/5a45880af1af410030ded733 https://docs.vrchat.com/v1.0/discuss/5a28f9eb85546e001c0f4754

@Hoppaw
Copy link
Author

Hoppaw commented Dec 29, 2017

Also, it seems to ONLY happen in VR

@HammondParis
Copy link

I am also having this issue as well. Shadows still cast onto the model, but the mesh is completely transparent. This has been an issue for over 2 months now.
20171217023753_1

@TCL987
Copy link
Collaborator

TCL987 commented Jan 7, 2018

Neither Cubed nor I have an AMD RX GPU to debug this issue with; so this is unlikely to get fixed. If someone with an affected card wants to fix it they can do so and submit a pull request. We'll take a look and merge it in as long as it doesn't break anything else.

As far as we can guess this is an issue with the geometry shader stage not working correctly on the AMD RX GPUs when Single Pass Stereo is enabled. The shader uses the geometry shader stage to generate the outline without doing two draw passes which would double the CPU rendering cost. The shadows still work because the shadow caster pass does not include the outline so it doesn't use the geometry shader stage.

@HammondParis
Copy link

HammondParis commented Jan 7, 2018 via email

@Hoppaw
Copy link
Author

Hoppaw commented Jan 7, 2018

I'd also be willing to help if there's anything I can do outside of coding.

@TCL987
Copy link
Collaborator

TCL987 commented Jan 7, 2018

@HammondParis The shader did not always use a geometry shader; the geometry shader replaced the separate outline pass to improve performance back at the end of September. However because shaders are uploaded separately with each avatar updates take a while to propagate as people have to update their shaders and re-upload their avatars. So the issue may not have become apparent right away.

@HammondParis
Copy link

HammondParis commented Jan 7, 2018 via email

@HammondParis
Copy link

I was messing around with it a few minutes ago. It does it in nonVR as well.

@abadoxx
Copy link

abadoxx commented Jan 8, 2018

I would be very grateful if anyone can find a fix for this, I'd even be willing to pay for a fix. Really sucks that one of the most anticipated VR games for me is the only one that does not work correctly. I have an RX480.

I can also confirm that this problem happens inside and outside of VR and only with the flat-lit toon shader, which most people use

@Bernandion
Copy link

Happens with me too, I also have an RX480. Sucks when you can't even see 70% of people since most use flat-lit toon. I can't find any shaders that look as nice as flat-lit toon either.

It'd be nice to have the older version that didn't use a geometry shader so I could at least see my own avatars.

@shrilex
Copy link

shrilex commented Jan 8, 2018

I know right, im running on a gtx 580 and i cant afford changing Gpu atm and i want to play this fun and wonderful game but cause of this bug i am horribly depressed and disapointed with this problem, so i hope this problem gets resolved soon

@dtupper
Copy link
Contributor

dtupper commented Jan 8, 2018

Guys,

This issue tracker is not meant for begging for a fix. The shader developers are well aware of the issue and will fix it if/when they gain access to an affected GPU-- as in, they have one physically available to them for testing. If you are skilled with writing shaders and have an affected GPU, please write a fix and submit a pull request.

Asking for the old version will not be useful because that would require that every avatar creator swap to that older version.

@HammondParis
Copy link

HammondParis commented Jan 8, 2018 via email

@Tollyt
Copy link

Tollyt commented Jan 9, 2018

Can anyone help me understand why any VRChat avatars that I apply these shaders to show up in game as the red transparent placeholder man? I dont think I've had any issues with other players avatars either and I've probably seen tons using these shaders. From what I can tell its just the ones I apply it too. I have an R9 390.

@Zaisue
Copy link

Zaisue commented Jan 12, 2018

This guy's solution worked for me, if it helps. http://steamcommunity.com/app/438100/discussions/7/1635237606656031878/

@cubedparadox
Copy link
Owner

@Tollyt Thanks for the link and fix! since this appears to be an AMD driver regression, could you fill out an issue report form on their site, and forward any responses to us? I'd love to see the problem fixed for everyone without having to revert their drivers. https://www.amdsurveys.com/se/5A1E27D258D43A88 here's a link to a support form, the support link on the version you posted is dead.

@TCL987
Copy link
Collaborator

TCL987 commented Jan 12, 2018

I have uploaded a new version of the shader with some tweaks to the some compiler pragmas. Could someone that is still on the latest AMD drivers please test the new version and see if the change helped?

@CrashNitely
Copy link

TCL987,

I am currently running with an RX 580
Version 17.7 Radeon software.
I just tested your new version of shader and still resulted in the same issue.

@Bernandion
Copy link

@TCL987 I tried the new version of the shader with my rx 480 and it doesn't work for me either. I'm also on the latest driver version, which is 17.12.2.

Also the models don't load in game and just stay as a red silhouette if you put the rendering mode on opaque. They load if you have it on cutout, just wasn't sure if that was supposed to happen with opaque.

@Bernandion
Copy link

It does seem to be fixed if you use version 17.1.1, but the screen glitches around like crazy in VR with that version so I still wouldn't say it's playable.

@shrilex
Copy link

shrilex commented Jan 13, 2018

idk how to see my driver version

@Bernandion
Copy link

Bernandion commented Jan 13, 2018

@shrilex Open the app "AMD Radeon Settings", click "updates" in the bottom lleft and it says there.

@shrilex
Copy link

shrilex commented Jan 14, 2018

but what if im a windows users?

@Hopossum
Copy link

Anyone have a new link to the fix? The current one is just popping up as an error for me.

@Bernandion
Copy link

@Hopossum The fix was to revert back to driver version 17.1.1. It works, but it's incredibly glitchy to play in VR with that older version so I really wouldn't call it a viable fix.

@abadoxx
Copy link

abadoxx commented Jan 15, 2018

I can confirm the 17.1.1 drivers work on the RX480. Thanks for a solution. Although it makes most VR games worse and causes a lot of flickering / glitches. This is the last time I buy an AMD card.

@CrashNitely
Copy link

I have an RX580, so when I go to download 17.1.1, it automatically reverts it to 17.7. Is there anyway around this?

@shrilex
Copy link

shrilex commented Jan 16, 2018

if i switch to 17.1.1 can i go back to 17.7 again later?

@HoshouNeko
Copy link

This bug appears only with htc vive. Someone plugged in oculus on the same pc, and bug was gone. So apparently its a combination of radeon and vive. Hope this helps to find the source of the bug.

@SlugBug
Copy link

SlugBug commented Apr 17, 2018

Also another interesting thing to note - My brother has the EXACT same PC build as I do - Down the to same RAM model, GPU, CPU, everything - And he can see Cubed's Shaders just fine while in VR, whereas I cannot. Is there any way we could figure out how this happens? Like maybe I could find what all his driver versions are and we can figure something out with that? He's running AMD driver 17.3.3 like most people say works, but he gave those drivers to me to use but it still didn't work for me. So if that's the only reason it's working for him, I'll just continue to wait for @cubedparadox to agree to being lent my RX 480

@dariusc93
Copy link

dariusc93 commented Apr 17, 2018 via email

@cubedparadox
Copy link
Owner

@SlugBug I'm interested in borrowing hardware, but the next month or so is going to be bad timing for me, I'll be away from my pc and unable to test cards.

In the meantime until we find a fix/AMD fixes their drivers, I've released a lite version of my shader, which avoids doing geometry shading altogether by removing outline support.
https://github.com/cubedparadox/Cubeds-Unity-Shaders/releases/tag/0.24

@dariusc93
Copy link

dariusc93 commented Apr 18, 2018 via email

@SlugBug
Copy link

SlugBug commented Apr 18, 2018

@cubedparadox Alright sounds good, just let me know once you've got more free time on your hands :)
I may or may not grab myself the GTX 1060 in the meantime... More than likely I will. It still feels a bit ridiculous to spend SO much money JUST for what is essentially a "hang out with people" simulator, but I suppose the enjoyment I get out of it makes it very worthwhile. And if I get to help out everyone else with this problem in the process that's worth it too.

Thanks for the lite shader btw, I know it won't help anything since all the problem models will still be using the old shaders, but the new options of things like double-sided shaders are great to have!

@scofrona
Copy link

scofrona commented Apr 21, 2018

So I'm not exactly sure what changed with my system, but wanted to share. Basic system specs:
Win10 Pro
RX 580 (MSI)
AMD Ryzen 1700X
Most updated drivers (18.3.4)
HTC Vive

The first time launching the game today had me run into the typical invisible models bug. No surprises, I've had this in the past over several different driver versions. I exited the game and went to the "Gaming" profiles in Adrenalin (Radeon Settings).

At first, I removed every setting that was AMD-optimized (Everything either off or "Application Settings"). When I launched the game the second time around the models with Cubed's shader were working for about 10 minutes but I noticed the game would occasionally stutter as though it were loading. After a few of these the models first went shadow-only and then invisible.

The next thing I did was enable all of the AMD optimized options, adaptive multisampling, shader cache, anisotropic filtering x16, the whole bit. The next time I loaded the game the models stayed visible during my whole test (about 20 minutes) including swapping between worlds.

As I said, not sure if this information is helpful at all, but considering I am using pretty much all of the hardware and software that tends to cause this issue, figured it might be worth mentioning.

Disclaimer: The issue isn't "fixed" because it does still happen once in a while, but as I mentioned it tends to only break when the game is stuttering as though having to load something new or refresh.

@rensakou
Copy link

Also providing a small information (not a direct solution) from me, not having the issue for about 2 months now.
OS:Win 10 Pro (16299, latest)
GPU:RX 580 (Sapphire nitro+ 8GB)
CPU:3470S/3770
Driver:18.3.4 (currently latest)
Oculus Rift (CV1)
M/B:P8H77-V

So I had the exact same issue since 2/11 I guess, and I went to the Radeon Settings, and played around with the settings a little bit. After changing the settings, the issue mitigated a bit, where it could show without any problem for at least an hour or so. Still the issue occurred occasionally, but at that point the frequency was almost rare, like once every 7 hours or so, so I just left it as it is, and kept playing.

But one day I realized that the issue hadn't occurred for while, even if I was playing it for 14 hours straight, or if I was in a laggy world that made my fps drop to 15 for more than an hour. Many people came and went in that world, like 25 people, but still didn't cause any issue.

I changed my CPU from 3470S to 3770 2 or 3 weeks ago, but it's not causing any issues so far. The things I did to my system so far is changing the Radeon Setting (2/11), changing my motherboard BIOS settings to the highest performance settings I can make (2/11?), making a mklink junction for HTTPCache to my HDD to free up my system SSD space (2/15), and disassembling whole system to change the CPU and cleaning up the dusts (4/7) as far as I can remember. So far I can assume changing Radeon Settings and performance mode may have some kind of affect to this issue, but I saw some posts saying it didn't do a thing, so I can't assure that.

I've also kept my graphics driver up to date, not reverting it to any older version.
Sorry if my English was clumsy.
picture740

@KimmyKeeki
Copy link

OS: Windows 10 Home (Build 16299.371)
CPU: Intel Core i5-3330
GPU: Radeon RX 560 (Driver Version 18.3.4)
VR: HTC Vive

Pardon for being long winded, but I wanted to be verbose to possibly give any insight to the devs as to where to find the explicit conflict.

I formerly owned a Radeon 7850 card which wasn't powerful enough to properly handle VR. I could use it, but it wasn't at all pleasant. However, when using it, I never had this issue. During the time that I had it, I used both the Desktop, Oculus and Vive, and never run into any shader issues.

I can understand that the technology being so old, it was probably not using certain features that the current cards use, and thus may not trigger the error. However, this card failed on me fairly recently. I am a devout AMD user, and so when I purchase a replacement, I went for the RX560.

This is where the issues began. I had originally thought the issues were with the most recent VR Chat update that happened, because I suddenly saw many people complaining about having invisible avatars, up to seeing a world named "Avatars you can't see update" when going into VR Chat.

I then looked into it and found that the key conflict was with this shader. It never occured to me just how many avatars use this shader, until a crowded room of 20-30 people was near invisible to me, the only things rendering on people was items that did not use the particular shader.

When using the desktop app, I have not experienced this bug. I also have not used the app extensively since getting the new card, but the sessions I have used it had none of the results of the below tests. I could not replicate the bug on the desktop app.

My tests were as follows:

  • Upon loading in, I am rendered. A few moments will pass and then I will disappear. I have set my home to the Nier: Automata world, and I learned that within this world, if I walk into a particular part of the map (Pictured below) I reappear. As long as I don't leave my home world, I will never disappear again. I sat in this world for a whole hour waiting to see if I would disappear. I did not.
    vrchat_1920x1080_2018-04-29_22-22-21 177

  • If I disable the Shader Cache, the bug does not occur for a while. The amount of time between disabled and On/AMD Optimized is significant. It takes several minutes, but no more than an hour, before the bug shows back up. When set to on, the bug is instant upon entering any other world, including a different instance of the Nier world beyond my home world.

  • I was unable to find an explicit trigger, because even if I'm fully rendered in a world, and I don't have anything else loading, I will still experience an eventual point where I disappear, almost always while I'm in menu. I'll experience it even when I cease moving for a period of time. No matter what input or timescale, it will randomly cease to work.

If there is any further testing I can provide, I will do it happily. Again I apologize for being long winded, but I wanted to be as clear as possible.

@KimmyKeeki
Copy link

I wanted to briefly update, a friend used the the lite version of the shader and it does in fact fix the issue and is fully visible, albeit full-bright due to lack of shadows. The glitch is definitely associated with the part of code that is not included in the lite version.

@ACIIL
Copy link

ACIIL commented May 17, 2018

AMD update 18.4.1 RX480 maybe be positive for cube shader re-support. I keep walking around and no avatars where gone. Could be many reasons for it, dont know. One anime model was using standard but that could be nothing.

Recommend testing different cubed shader versions with this update.

@dariusc93
Copy link

@ACIIL it seems to be at random (meaning you could go a whole session without anything happening but when reloading it may show signs of it wanting to act up), but some places like the moon or mars still act up regardless of what version you on.

@KimmyKeeki
Copy link

@ACIIL Unfortunately, I was able to replicate the bug on the latest driver release. The driver does not correct the shader bug. Note, I use a AMD RX 560, so maybe a fix for RX 400 series cards? Might be unstable according to the previous comment, and still might not fully fix the issue. Verdict: Not a solution yet.

@TheLDSmissionary
Copy link

TheLDSmissionary commented May 19, 2018

Yeah nope using RX 480 and I can tell you the new driver does not fix the issue. I've tried installing the old driver they say works from jan 2017

"Aev
From my understanding, this is an issue with the way Cubed's shader creates the outline on avatars. It's not related to VRChat, it's something that AMD broke in their drivers (the Jan 2017 AMD driver still works). There is a recently released version of Cubed's shader that doesn't have the outline option, which will display correctly for users with AMD GPUs. Past that, this is not something VRChat can fix on their end."

yeah that does not work...

Yeah I really want to play and enjoy this game but untill I can see other people this just completely keeps me from playing it

@Jhackler
Copy link

Jhackler commented May 19, 2018 via email

@TheLDSmissionary
Copy link

Yeah I was very happy when I first played this game, had no issues on my first day, then when I logged in my second day and every time since my avatar has disappeared and most others along with it. Very discouraging

@dtupper
Copy link
Contributor

dtupper commented May 23, 2018

I'm seeing reports that this is fixed with the latest drivers. Please try updating your drivers to the latest version:

Radeon Software Adrenalin Edition 18.5.1, released 5/22/2018.

https://support.amd.com/en-us/download

@dariusc93
Copy link

dariusc93 commented May 23, 2018 via email

@Hikarinodearu
Copy link

I update all the drivers and sometimes the bugs appear. But although much less than before.

@TheLDSmissionary
Copy link

likewise, usually restarting the game helps, but every now and then it reappears just to rub it in your face that "hey, you still can't quite play this game fully"

@firemarth
Copy link

Same here, got maybe 15 minutes of time in before the glitch fired back up.

My dream is that I'll actually be able to play this game by the end of 2018.

@dtupper
Copy link
Contributor

dtupper commented May 28, 2018

I'd strongly suggest leaving a response on this page: http://amd.com/report

Don't expect a response, but describe your issue, your GPU, and point back to this comment page (paste the URL).

Bugging AMD to fix their drivers is probably the best way to get this fixed.

@dariusc93
Copy link

Give 18.5.2 a try and see if it still an issue. Was released on the 30th.

@dariusc93
Copy link

Just did a small test with the latest drivers and I can say it does look like everything is fixed but I cannot say if it is the result of the latest drivers since i know vrc updated a few days ago.

@TempieSan
Copy link

I just did a test myself today and everything was fixed with 18.5.2! I was able to swap to different avatars just fine, worlds loaded up perfectly.

@dariusc93
Copy link

If it is true that it is completely fixed (I only have vega so im not sure about rx4xx and rx5xx), then it mustve been related too "Shader Cache may sometimes fail to enable or may not correctly cache shaders for games."

@Jhackler
Copy link

Jhackler commented Jun 5, 2018 via email

@abadoxx
Copy link

abadoxx commented Jun 5, 2018

18.5.2 seems to be a fix. I just wanted to thank everyone for the constant effort I have been keeping track since I commented on this thread Jan 7th.

@firemarth
Copy link

Played for nearly two hours today without the glitch activating at all. I think it may actually be fixed!

Been waiting and hoping since last December, so I am quite excited right now.

@cubedparadox
Copy link
Owner

Internal VRChat team has confirmed on AMD hardware that this issue is fixed with the latest drivers.
Closing until AMD breaks it again, thanks for all the support and testing.

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