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

Hoppaw commented 6 years ago

Also, it seems to ONLY happen in VR

HammondParis commented 6 years ago

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

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

Qbd or TCL.

Id be willing to work with you to figure out a solution. The only reason I believe this is the shaders fault is because VRchat does not contain errors when models go invisible. And I don't think it's AMD because regardless of what driver we use, nothing works. I think it's the shader because it USED to work fine, would it be possible to get a previous version of the shader to find a difference or something that wouldn't cause the problem in an older version, but is in a newer version?

Thanks, Noah.

On Jan 7, 2018 2:15 PM, "TCL987" notifications@github.com wrote:

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

— 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-355845082, or mute the thread https://github.com/notifications/unsubscribe-auth/AhdjYRVzAxd3eeMLBGjm7hWuftqpPbd3ks5tIRfGgaJpZM4RPbFB .

Hoppaw commented 6 years ago

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

TCL987 commented 6 years ago

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

TCL,

Okay, I could see why the issue would slowly reach into the game with that theory. Would I be able to get a version of the shader that used the outline pass instead of the geometry to confirm it's possibly that? It would help narrow down the issue and we may be able to contact AMD. I'm not very knowledgeable about the mechanics of the shader, but any information helps to find the solution.

On Jan 7, 2018 4:06 PM, "TCL987" notifications@github.com wrote:

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

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

HammondParis commented 6 years ago

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

abadoxx commented 6 years ago

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

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

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

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

CD,

I'm aware that we will not be able to get everyone to swap to an older version, thats simply impossible. I'm asking for an older version to use as something to compare to the newer version and find the differences between the two to pinpoint a little closer on the exact cause of the issue. I really don't mind finding the issue myself, I just want a stable version that works to help find a solution.

Noah.

On Mon, Jan 8, 2018 at 3:00 PM, CD Tupper notifications@github.com wrote:

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.

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

Tollyt commented 6 years ago

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

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

cubedparadox commented 6 years ago

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

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

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

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

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

idk how to see my driver version

Bernandion commented 6 years ago

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

shrilex commented 6 years ago

but what if im a windows users?

Hopossum commented 6 years ago

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

Bernandion commented 6 years ago

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

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

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

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

HoshouNeko commented 6 years ago

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.

Tails41347 commented 6 years ago

There is a new update on AMD, "18.1.1". I've been testing VRChat earlier and I've not seen this bug yet. Maybe it was just a luck for now. Have anyone else tried the new update?

HoshouNeko commented 6 years ago

Yeah i tried, nothing changed for me

jollyromp commented 6 years ago

I also have this issue and it seems to be fixed with 17.1.1 but the 18.1.1 update didn't help.

Bernandion commented 6 years ago

@jollyromp It's impossible to play VR games on 17.1.1 though.. the screen glitches around and lags like crazy on anything older than like 17.6.

firemarth commented 6 years ago

Running 18.1.1 here. Managed to actually play for a couple hours yesterday without any issues...but they unfortunately returned today. I think I just managed to get lucky, the issue remains unresolved.

Tails41347 commented 6 years ago

It's a sad vrchat world for us. I've reported about this to AMD, as it still occurs on this new radeon update. Waiting for answer!

HoshouNeko commented 6 years ago

I dont think AMD will fix it. Think about it: Someone made this shader just for fun, with no equipment to test it. VRchat let some buggy software into their game. Why should AMD even bother? Its a VRchat developers responsibility to check every software before letting it go wild on their servers. Moreover there are rare reports of geforce users experiencing same bug, and the only thing that connects all affected pc is HTC vive.

TheHybrid commented 6 years ago

I have this bug as well, RX 480. I've been considering selling my RX 480, and just purchasing the Nvidea equivalant, the GTX 1060, for sometime. This only makes me consider doing so more. Do you it would be worth it, or should I just perhaps try to wait it out?

Would it be possible to force anyone who used this shader with a model they created, to create two models, one with the shader, one without, and have VRchat pick the proper model to load based on your graphics card? Maybe we could do a purge of all models affected with this shader, and force creators to implement this? No if any of this is even possible, just throwing shit at the wall.

Jhackler commented 6 years ago

Is there a way to just blacklist certain shaders from running on my end?

Hikarinodearu commented 6 years ago

the creators of the sahder really work fixing this bug? I need know this to see if I sell the HTC VIVe I really frustated. I buy HTC vive only for play VRchat and now i can't play :(

Jhackler commented 6 years ago

So I updated to 18.1.1 but also selected to verify the file integrity of vr on chat. It found 1 file and replaced it not sure which one fixed it but it has been working.

Hikarinodearu commented 6 years ago

I reainstaled the game and update the drivers, and nothing, the same bug :(

HoshouNeko commented 6 years ago

Updated to 18.2.1, verified the files, nothing changed. It seems we have different reasons for the same bug.

firemarth commented 6 years ago

I'm legit to the realm of angry right now.

When creating such a major element to 3D modeling, you should've accounted for both major brands of GPUs, rather than focusing on a single one and forcing away half of your audience.

Jhackler commented 6 years ago

so I spoke too soon. It is better it will work when ai load the game. however if I hop enough worlds it will eventually glitch and stay permanent till restart some times it messes up on first load. however if it loads right and I just stay and hang out it will not break. may be different causes though

On Fri, Feb 2, 2018, 4:37 PM HoshouNeko notifications@github.com wrote:

Updated to 18.2.1, verified the files, nothing changed. It seems we have different reasons for the same bug.

— 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-362728720, or mute the thread https://github.com/notifications/unsubscribe-auth/AHZVkLn_RUkKHBgnmR_C8m75BIs8r4x_ks5tQ449gaJpZM4RPbFB .

HappyAdjustableSpanners commented 6 years ago

I am also experiencing this. Very frustrating.

TCL987 commented 6 years ago

Can everyone experiencing this problem please submit an issue to AMD. If enough people complain then hopefully the issue will be fixed in a driver update. http://www.amd.com/report

Neiru95 commented 6 years ago

Can confirm that it also happens sometimes for Oculus rift users. (RX 580)

firemarth commented 6 years ago

If there isn't a fix, is there some kind of work around that could be created?

I was having an amazing conversation with someone in game just a short while ago, and then them and everyone around me vanished, which just destroyed the whole thing.

SuuKool commented 6 years ago

This is so devastating and depressing, I just started as a streamer and I just bought and AMD over an NVIDIA, yet the one game I'm trying to stream for is broken because this shader issue. I don't have any more money saved up after forking over 600$ for the vive and another 1000$ for the computer :( Please fix this ASAP, the 19th comes around and twitch bans VRchat Im going to be so depressed.

Hopossum commented 6 years ago

I was looking in the AMD gaming settings in Radeon app and I saw Shader Cache and it is set to AMD optimized. I don't have room VR ready (since VRchat was the only thing I was really playing), but I was wondering if anyone has tried turning it off AMD optimized or if someone could to see if it helped. temp