cubedparadox / Cubeds-Unity-Shaders

A compilation of custom shaders for Unity3D
MIT License
318 stars 89 forks source link

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

Closed Hoppaw closed 6 years ago

Hoppaw commented 6 years ago

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

GankGoat commented 6 years ago

I have an amd radeon rx 480. I have found a solution to my problem and am running the most updated drivers to date. I run steam vr in non-direct mode or extended. The game renders toonshaders the way it did on 17.1.1 I do not know why but would like to know if anyone else fixed this issue by swapping to non-direct.

SlugBug commented 6 years ago

@GankGoat I've just tried this, and I can't seem to get past a "The Headset and your Main Monitor must be connected to the same Graphics Card", which is weird to me because they ARE connected to the same graphics card... Does the main monitor need to be connected through an HDMI? At the moment it's connected through DVI, but idk if it makes a difference.

GankGoat commented 6 years ago

@SlugBug For me I have always had my main monitor on hdmi. I am not sure if this matters or not. I was told issues could occur if the main monitor and the headset are not plugged into the graphics card. I would try swapping a port and restarting. I had an issue before with the compositor that was solved by doing this.

dariusc93 commented 6 years ago

Even if you disable direct mode, the rendering will still be wonky. If you want to see if you really had luck, goto the "Moon" or "Mars" and see if things will act up more. Make sure you are running the latest drivers when testing and not 17.1.x.

Hikarinodearu commented 6 years ago

I try this and don't see diference. 10 seconds and the bugs appears

Krankdude commented 6 years ago

@GankGoat Is this solution still working for you, because even in extended mode I am unable to see the shader.

shrilex commented 6 years ago

Well i gave up on this problem and had a friend send me one of his old nvidia gpu's he had laying around, the easiest way to fix this is to not use amd, also i am unsubscribing to this, i tried all of these and id rather use the gtx 960 i have now instead of reinstalling my rx 580 (that i plan on selling with a label saying not recommended for vr) so i solved my problem for cheap $20 instead of spending $700

dariusc93 commented 6 years ago

@shrilex if youre using it for vr, then you better off spending money on better nvidia card than a old one. The card itself is able to run VR just fine (so labeling that way is kind of wrong but it is your opinion), but the drivers have changed stuff that made this specific shader act up. Instead of selling it, you could donate it (or lend it) to @cubedparadox so he could see what the issue could be and provide some feedback on it.

I tried to reproduce this within unity with the shader and steamvr plugin (both within unity and standalone, but there isnt any issues with the shaders within unity. It is only when it hits vrchat that issues start to arise, so it could be the shaders but it could also be something within vrc as well.

SlugBug commented 6 years ago

I've got an MSI RX 480, I enjoy VRChat so much I'm considering getting an EVGA GTX 1060 (Which is apparently better than an RX 480 anyway? If someone could confirm this that'd be great) which is pretty cheap on Amazon atm. If I do, I would be willing to at least let Cubed Paradox use the 480 long enough to fix the problem. So if @cubedparadox is up for it, I think I'd be willing to help everyone out in this way. Also, again, if someone could confirm that getting an EVGA GTX 1060 would be an UPGRADE from an MSI RX 480, I'd greatly appreciate it so that I know I wouldn't be wasting almost $300. I'm fairly certain it is based on a quick GPUBoss comparison, but I'd like to be sure.

SlugBug commented 6 years ago

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 commented 6 years ago

If you're installing drivers, run amd clean utility to remove traces then reinstall the driver. Again, downgrading shouldn't the only option.

On Tue, Apr 17, 2018, 11:52 AM SlugBug notifications@github.com wrote:

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 https://github.com/cubedparadox to agree to being lent my RX 480

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cubedparadox/Cubeds-Unity-Shaders/issues/27#issuecomment-382044323, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvIyKBxns0cMsb9P9OmlHVBOx3RdP6Fks5tpg_BgaJpZM4RPbFB .

cubedparadox commented 6 years ago

@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 commented 6 years ago

I'll give it a test run sometime tomorrow to see if it helps.

On Wed, Apr 18, 2018, 1:20 AM Nick Benge notifications@github.com wrote:

@SlugBug https://github.com/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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cubedparadox/Cubeds-Unity-Shaders/issues/27#issuecomment-382265169, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvIyAIBmZAzergBHb_aqAH3RJLtpuo5ks5tps0QgaJpZM4RPbFB .

SlugBug commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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:

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

As someone who has followed this for a while, this bug is a weird one. if you stick with playing and updates long enough it goes away permanently for some and not others. And that is on the same card with the same drivers on same headset. It seams very random.

On Sat, May 19, 2018 at 9:32 AM, TheLDSmissionary notifications@github.com wrote:

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...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cubedparadox/Cubeds-Unity-Shaders/issues/27#issuecomment-390408898, or mute the thread https://github.com/notifications/unsubscribe-auth/AHZVkNbfy6oYeD7TP_YHxMbqXtOIp89gks5t0Cz3gaJpZM4RPbFB .

TheLDSmissionary commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

I'll give it a try in a bit to see

On Wed, May 23, 2018, 3:51 PM CD Tupper notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cubedparadox/Cubeds-Unity-Shaders/issues/27#issuecomment-391474708, or mute the thread https://github.com/notifications/unsubscribe-auth/ADvIyHmYoW6kltkS8cmBHvRM9g9lHJrRks5t1b20gaJpZM4RPbFB .

Hikarinodearu commented 6 years ago

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

TheLDSmissionary commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

dariusc93 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

honestly it seems for most people you just keep restarting till it works and doing it more often or not till eventually and some random update it works for them no problem lol. no longer running 580 though it randomly quite breaking a while back for me on it then I switched to vega.

On Mon, Jun 4, 2018 at 10:27 PM, Darius Clark notifications@github.com wrote:

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."

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cubedparadox/Cubeds-Unity-Shaders/issues/27#issuecomment-394569594, or mute the thread https://github.com/notifications/unsubscribe-auth/AHZVkNk6cUt1Oy5jQSe5jhQ_3mu4zRLyks5t5fqOgaJpZM4RPbFB .

abadoxx commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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.