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

Hikarinodearu commented 6 years ago

@Hopossum i have HTC VIVE and amd RX480. This is my settings: vrchat

I have always this settings and don't change the bug :(

firemarth commented 6 years ago

Before anyone gets their hopes up, the recently released 18.2.2 driver does not fix the bug.

HoshouNeko commented 6 years ago

I have changed all the settings in Radeon, nothing helped.

Churro480 commented 6 years ago

This issue has been around for months apparently, do what I did and sell your AMD card since it seems like it'll never get fixed. I sold my 480 and my 1080 is arriving tomorrow. Fuck these devs.

Jhackler commented 6 years ago

You are more sticking to amd than you are the devs by dropping amd over this one devs code

On Tue, Feb 13, 2018 at 11:12 PM, Churro480 notifications@github.com wrote:

This issue has been around for months apparently, do what I did and sell your AMD card since it seems like it'll never get fixed. I sold my 480 and my 1080 is arriving tomorrow. Fuck these devs.

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

HoshouNeko commented 6 years ago

I won't change my card for single game, especially if iam loosing my free sync. All other games run perfectly.

Jhackler commented 6 years ago

Current latest amd driver works on rift for most part bug eventually reappears and restarting game normally fixes it though it is a pain. Can not speak for vive, and this is still a bug.

Jhackler commented 6 years ago

If developer of shader wants to do a crowdfund to buy an rx 580 to fix this I will pitch in

SuuKool commented 6 years ago

I was thinking about that yesterday, screw it. I made a gofundme for cubed. I think we could all throw 25$-50$ together and get this funded by the weekend! https://www.gofundme.com/get-cubedparadox-an-amd-rx-580

I'm going to list him as the beneficiary so he will receive the payout.

Bernandion commented 6 years ago

LOL why would you pay to get the developers a graphics card to fix a bug with their game... that's ridiculous. They should be spending their own money to get one to fix the issue since this problem is turning people away from playing their game. I'd rather just wait for amd to eventually fix it at this point.

SuuKool commented 6 years ago

Bc I want it to be fixed ASAP, if I knew shader code that well I’d do it myself, it seems like the best option at this point

On Fri, Feb 16, 2018 at 1:36 PM Bernandion notifications@github.com wrote:

LOL why would you pay to get the developers a graphics card to fix a bug with their game... that's ridiculous. They should be spending their own money to get one to fix the issue since this problem is turning people away from playing their game. I'd rather just wait for amd to eventually fix it at this point.

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

--

  • Hunter R.(SuuKool) suukool.github.io
Jhackler commented 6 years ago

It is a free game and I think this is just a general unity shader that I also did not have to pay for. If you want something pay for it.

On Fri, Feb 16, 2018 at 3:36 PM, Bernandion notifications@github.com wrote:

LOL why would you pay to get the developers a graphics card to fix a bug with their game... that's ridiculous. They should be spending their own money to get one to fix the issue since this problem is turning people away from playing their game. I'd rather just wait for amd to eventually fix it at this point.

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

dtupper commented 6 years ago

I'll note that this shader was not built by VRChat, it was created by the VRChat community.

Additionally, please keep this comment thread to anything regarding working around the issue, or performing a pull request to fix the issue (or related talk)

cubedparadox commented 6 years ago

Hi there. This shader's development is not attached to VRChat, and people using the shader are doing so because it's a free resource, not because it's required to play VRChat. Because it's just a project I'm occasionally working on in my free time, I can't guarantee support for all issues that arise.

That said, I'd really to fix this bug, it's a thorn in my side and super hard to test without the correct hardware (I have a 1080ti) I've accepted this gofundme offer, https://www.gofundme.com/get-cubedparadox-an-amd-rx-580 but I'd like to clarify if I get the funds for a test card, I can only promise to use it to test the bug, I'm reasonably confident I'll be able to at least find a workaround, if not a full solution, but I cannot promise a fix

Thanks for all the support!

Jhackler commented 6 years ago

Donated 30 as soon as I saw it

UneoldSpirit commented 6 years ago

So is this like a thing that will last forever or will they fix it eventually? I am honestly really confused and I need someone to explain why almost everyone is invisible and how to fix it.

SuuKool commented 6 years ago

Yes, the dev of the shader didn’t have an amd to test his code on, shader got popular and somewhere along the line code got broken, now we’re trying to raise money for the dev to get an affected GPU

On Mon, Feb 19, 2018 at 3:31 PM UneoldSpirit notifications@github.com wrote:

So is this like a thing that will last forever or will they fix it eventually? I am honestly really confused and I need someone to explain why almost everyone is invisible and how to fix it.

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

--

  • Hunter R.(SuuKool) suukool.github.io
UneoldSpirit commented 6 years ago

Oh so this is a glitch with AMD software? Well I don't know if they will fix it or if I should buy a new one. Which would be the smarter choice?

SuuKool commented 6 years ago

Guys, I'm freaking out, I went to go to Frys to upgrade my AMD so I could mail him mine and save the time for the crowdfund. So I drive to Frys, but I found out there's no more GPUs. They've sold out nearly in my whole state, The only thing I can do is order online but I don't have my mailbox key and the landlord isn't back until Wednesday. So I bought the best GPU they had left, this tiny GT 1030, 2GB DDR5 it was best they had... It's shit it's so tiny compared my AMD 580 I couldn't do it, I rather play with 30% of the game then not at all. So I drive back, I return the GPU. Buy some bitcoin because holy crap we're in a GPU drought. Still depressed, but WAIT, I have an idea.

Let's the the 50$ and hire someone from fiver who is a gamer and is able to quickly fix the DX12 RX400-500 bug now. or how about we go straight to Unity or Direct X themselves and have someone fix this. It seems my only option is rebuild the whole damn PC, and have to wait until I get my key, and then gotta wait for shipping. That's like 2 weeks, TWO WEEKS. We're going to call AMD everyday, I will get a petition. PLS. FOR THE LOVE OF VR, I CAN'T BE THE ONLY ONE THAT FEELS THIS WAY.

SuuKool commented 6 years ago

https://i.imgur.com/58p8dLm.jpg

SuuKool commented 6 years ago

Can we do a workaround, where the people using the vive have a script that overwrites the toon lit shader to standard at least? or even if it has to be temporarly disabled in the game for everyone? Can we just get a workaround?

Neiru95 commented 6 years ago

I think I got it working for Oculus Rift users (RX580)

  1. If you don't see VRChat listed in your Radeon settings. Simply add it from your VRChat directory (C:\whereveryoursteamislocated\steamapps\common\VRChat) .
  2. Open your AMD settings for VRChat, use the settings shown from the attached image below.
  3. Start your VRChat from that directory, not via the Steam Launcher.

Was playing around in VRChat for about 3 hours and teleported around to different worlds of avatars and other kind of worlds without any issues.

amdvrchat

SuuKool commented 6 years ago

Could you let us know what AMD version driver you're using? I'll test this with the Vive when I get home, hopefully this works.

DreiPixel commented 6 years ago

@Neiru95 mh didnt worked for me using a htc vive. what driver version you have?

HappyAdjustableSpanners commented 6 years ago

Didn't work for me either on Vive

On 20 Feb 2018 6:28 pm, "DreiPixel" notifications@github.com wrote:

@Neiru95 https://github.com/neiru95 mh didnt worked for me using a htc vive. what driver version you have?

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

Neiru95 commented 6 years ago

I am using 18.2.1

Will be testing more later. I could just have been lucky af in those 3 hours yesterday.

firemarth commented 6 years ago

@Neiru95 Another confirmation here on Vive, those settings didn't work. Got about 20 minutes in before the bug hit.

Hikarinodearu commented 6 years ago

@cubedparadox hi! If you can buy a RX4 o RX5 to test the shader ¿How you think can fix the bug? and ¿you have a HTC VIVE to test? because this bug is with HTC VIVE and graphic RX4 or RX5

UneoldSpirit commented 6 years ago

So um are we close to fixing this or....

Jhackler commented 6 years ago

bug existed on rift to though lately it hasn't been happening as much

sarnex commented 6 years ago

Hi all, I have been working on creating a minimal example shader to repro this, but it has come to take much more free time then I have. I have created a very simple shader, where commenting out some members of the Vertex struct and subsequent uses does not result in an invisible avatar, but keeping them in does.

The shaders are here: works: https://gist.github.com/anonymous/d7ab0ab59f9ea328453d49ea683078be breaks: https://gist.github.com/anonymous/6f826cfd7b28c1c69a8cea031a7ed0c1

Note that the shader looks crazy, and that is intended and not the bug. The bug happens if part of/all of the character goes invisible.

I need people here to work on the below next steps 1) Create a minimal version of the above shaders, as I'm sure commenting in some of the broken members and assignments to them will not break it, but I don't have time to debug 2) Merge the geometry shader in the above example with the actual Flat Toon Shader, such that a case where the Flat Toon Shader does not go invisible is found. Just moving the changes directly doesn't work, so other changes are required.

Thanks, Sarnex

jwtowner commented 6 years ago

Has anyone tried running VRChat with the -force-d3d11 command line switch to force Unity to use the D3D11 renderer backend to see if that makes a difference?

You should read the documentation here:

https://docs.unity3d.com/Manual/SL-ShaderSemantics.html https://docs.unity3d.com/Manual/SL-ShaderCompileTargets.html

Try #pragma target 4.0 or 5.0 to force the HLSL targets to specific version. Try only using TEXCOORDn and COLORn as the vertex semantics (replace IS_OUTLINE and CLIP_POS with unused TEXCOORDn slots).

SuuKool commented 6 years ago

YOUR'E THE BOMB! THIS MAN IS A GENIUS! :) You just need to make a tutorial because I'm sure a lot of people aren't going to know computer programming terms about Shader Compilation Target Levels, and how to force over directX, please elaborate but this does sound promising since in unity there was an error with the D3D11 renderer but I had no idea where to go from there, Thank you so much! If this works I should buy you a beer!

On Fri, Mar 9, 2018 at 10:04 PM, Jesse Towner notifications@github.com wrote:

Has anyone tried running VRChat with the -force-d3d11 command line switch to force Unity to use the D3D11 renderer backend to see if that makes a difference?

You should read the documentation here:

https://docs.unity3d.com/Manual/SL-ShaderSemantics.html https://docs.unity3d.com/Manual/SL-ShaderCompileTargets.html

Try #pragma target 4.0 or 5.0 to force the HLSL targets to specific version. Try only using TEXCOORDn and COLORn as the vertex semantics (replace IS_OUTLINE and CLIP_POS with unused TEXCOORDn slots).

— 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-372006129, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-If9kX3X-OPEyMu2A0ONpAmKxcwxgxks5tc20FgaJpZM4RPbFB .

--

HappyAdjustableSpanners commented 6 years ago

Any luck with this anyone?

On Sat, Mar 10, 2018 at 6:24 AM, Hunter Raines notifications@github.com wrote:

YOUR'E THE BOMB! THIS MAN IS A GENIUS! :) You just need to make a tutorial because I'm sure a lot of people aren't going to know computer programming terms about Shader Compilation Target Levels, and how to force over directX, please elaborate but this does sound promising since in unity there was an error with the D3D11 renderer but I had no idea where to go from there, Thank you so much! If this works I should buy you a beer!

On Fri, Mar 9, 2018 at 10:04 PM, Jesse Towner notifications@github.com wrote:

Has anyone tried running VRChat with the -force-d3d11 command line switch to force Unity to use the D3D11 renderer backend to see if that makes a difference?

You should read the documentation here:

https://docs.unity3d.com/Manual/SL-ShaderSemantics.html https://docs.unity3d.com/Manual/SL-ShaderCompileTargets.html

Try #pragma target 4.0 or 5.0 to force the HLSL targets to specific version. Try only using TEXCOORDn and COLORn as the vertex semantics (replace IS_OUTLINE and CLIP_POS with unused TEXCOORDn slots).

— 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-372006129, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-If9kX3X- OPEyMu2A0ONpAmKxcwxgxks5tc20FgaJpZM4RPbFB .

--

  • Hunter R.(SuuKool) suukool.github.io

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

Shii2 commented 6 years ago

VRChat already runs in D3D11 mode. At least this is not issue.

Mijin1 commented 6 years ago

Using the Driver Version: 17.10.1721-170403a-313213C which came packaged with my Radeon RX 580 I don't get this issue, however, I do get horrible stuttering in VR chat with HTC vive. I'm going to try to install 18.2 again and see if I still get the stutter.

commandobox commented 6 years ago

RX 480 and Vive user. I was running on 18.2 and that's how I found out about this issue, so 18.2 isn't a fix. Updated to optional 18.3 to see if that might fix the issue and it's still there. D3D11 mode also doesn't work for fixing the problem, either.

Jhackler commented 6 years ago

So I have been running latest amd driver as it comes out, oddly enough I have been randomly lucky and not encountered this bug for almost 2 weeks now. Which is weird because it was happening a lot.

commandobox commented 6 years ago

So I have been running latest amd driver as it comes out, oddly enough I have been randomly lucky and not encountered this bug for almost 2 weeks now. Which is weird because it was happening a lot.

What card and drivers do you have? Also, AMD just released 18.3.2 so I'm going to try out those drivers.

Update: Just tried the drivers, and the toon shaders loaded for a little bit but then disappeared. But the textures lasted longer than usual this time.

Jhackler commented 6 years ago

Rx 580 and driver been updating a lot. I am thinking its luck or my computer just decided to cooperate. Eitherway I have gotten to enjoy my friends not disappearing.

Anarilost commented 6 years ago

I just bought this custom PC 3 months ago. Bought my HTC Vive a few days ago. My Radeon RX 580 works perfectly for every other game i play including VR Chat. But this invisible flat lit toon model problem ruins the whole thing in VR. It is an issue with every driver i tried. I cant just go and get a new graphics card, i just spent a bunch on this VR headset to play VR Chat which is currently broken because this shader is so popular. There are a lot of us with this problem and something needs to be done.

sarnex commented 6 years ago

cubedparadox doesn't have the hardware to reproduce. Like I said before, solving this issue is going to require help from the community. I have done some initial investigation but somebody needs to keep it going.

commandobox commented 6 years ago

So I've been playing around with drivers and settings all day and I put the selected settings from Neiru95's Radeon Settings image. As soon as I applied those and verified my game's file integrity, I was able to see a flat lit toon (FLT) model for the longest period so far. It lasted for as long as I was in the room which was only about a minute. Deciding that by then the shaders would have broken, I went to a room I know that I can stress test how my car handles the shader (I assume all the walls and models are made up of FLT objects). I could see the room for all of about 5 seconds (the longest time the walls in the room stayed visible to me) before the room goes gray. Here are the pictures of before and after the shaders failed, and for anyone curious the room is named "Pinkierawr's Star Wars Avatars." I then checked my log files for any errors (the log files for VRchat are found in "...\AppData\LocalLow\VRChat" and found that after the room loaded a warning would pop up saying "Cannot set field of view on this camera while VR is enabled." Do with this information what you will, however helpful it is.

@sarnex I understand that cubedparadox doesn't have the hardware to reproduce it, and it really blows that I can't help more but I only have limited programming experience and no experience with C#.

caceresdaniel commented 6 years ago

So just last night I decided to switch to Windows 10, I was using Windows 7 before and the game would work just fine with no isssues what so ever with my AMD 480 and Vive. But now switching over to Windows 10 it no longer works in VR mode, works just fine in desktop but when switching over to the Vive I get the same issues everyone else has.

Jhackler commented 6 years ago

I have been using windows 10 whole time but issue has been gone for a while on rx 580 i seems to be inconsistent as to when it exists.

dtupper commented 6 years ago

The issue not occurring on Windows 7 is likely because AMD does not have a new version of the drivers for Windows 7. So basically, you were using out of date drivers (because you had no choice).

Despite that, I'll restate that using old drivers is a bad idea and you shouldn't do it.

dariusc93 commented 6 years ago

I dont believe that is likely because amd supports windows 7 with the rx400, rx500, and vega series (all their releases shows support for windows 7). Maybe he could provide the version of their drivers he was on.

caceresdaniel commented 6 years ago

So it turns out when I was running Windows 7 I had old drivers, I also had to change back to old drivers again on Windows 10 for the problem to go away, for some reason my rig didnt want to work with recent drivers, so I went back to the 17.1.1 drivers

firemarth commented 6 years ago

The glitch has actually gotten worse for me as of today.

Usually I could get 5-10min of time in game before the glitch hit (sometimes up to an hour if lucky).

As of today, with the newest AMD driver, the game loads with the glitch immediately.

dariusc93 commented 6 years ago

@caceresdaniel and you are using the rx580? Is this the 4gb or 8gb variant? Could you upgrade to 17.2 (or 17.1.2) and see if it happens there as well? Maybe upgrade one version after the other until it becomes an issue. Just making sure before I dive into seeing what changed on their end because it seems to only happen with the rx series (including vega), while other amd gpus dont have this issue. It also seem to happen more with the vive than the rift (though with the rift after a few minutes, it will happen), so im wondering if it how it renders to HMD.

@firemarth what amd gpu are you using?