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

Error on 2022.1.9b7.2715 Unity version #81

Open
jorgeavila opened this issue Feb 21, 2022 · 20 comments
Open

Error on 2022.1.9b7.2715 Unity version #81

jorgeavila opened this issue Feb 21, 2022 · 20 comments
Assignees
Labels

Comments

@jorgeavila
Copy link

Have this error in the version 2022.1.9b

d3d11: failed to create 2D texture shader resource view id=1666 [D3D error was 80070057]

@jorgeavila jorgeavila changed the title Error on 2022.1.9b7.2715 d3d11: failed to create 2D texture shader resource view id=1666 [D3D error was 80070057] Error on 2022.1.9b7.2715 Unity version Feb 22, 2022
@keijiro keijiro self-assigned this Feb 22, 2022
@keijiro
Copy link
Owner

keijiro commented Feb 22, 2022

Does it reproduce on other Unity versions? Or it only reproduces on 2022.1?

@jorgeavila
Copy link
Author

Only on 2022.1 already try previews versions

@keijiro
Copy link
Owner

keijiro commented Feb 22, 2022

Thanks. I'll investigate it.

@MrMahgu
Copy link

MrMahgu commented Mar 15, 2022

You can fix (not sure if correct fix) by changing \Runtime\Internal\Receiver.cs line 88/89 (I'm using HDRP)

TextureFormat.RGBA32, false, false
to
TextureFormat.BGRA32, false, true

@jorgeavila
Copy link
Author

MrMahgu answer make it work! thanks

@jorgeavila
Copy link
Author

Weird i try it over the weekend, sure it was working but now is throwing errors and get replace automtiacally sometimes with the old code

@MrMahgu
Copy link

MrMahgu commented Mar 23, 2022

Weird i try it over the weekend, sure it was working but now is throwing errors and get replace automtiacally sometimes with the old code

You would need to extract the package folder (Library\PackageCache\[email protected]) to its own folder and either delete it from your project and then reimport it from disk using your local modified copy.

I have a directory inside my base folder (the folder that contains all the Assets, Library, Packages, etc folders) called "LocalPackage". You can then modify the Packages/manifest.json by hand to repoint the Spout package to your new local copy.

Mine looks like this:

"jp.keijiro.klak.spout": "file:../LocalPackage/[email protected]"

@WoutStandaert
Copy link

Thanks a lot @MrMahgu that worked perfectly

@Gabana
Copy link

Gabana commented Oct 26, 2022

Hi, I upgraded Unity from 2021.2.7 to 2022.2.0b11 and i am getting this error.

I am using URP and the proposed fix by MrMahgu does not work for me.

@keijiro could you please have a look at this error? Seems like it is affecting all Unity 2022 versions

@GeorgeAdamon
Copy link

@MrMahgu You are a legend! Your solution worked in Unity 2022.1.23f1.

@Gamgie
Copy link

Gamgie commented Jan 13, 2023

You can fix (not sure if correct fix) by changing \Runtime\Internal\Receiver.cs line 88/89 (I'm using HDRP)

TextureFormat.RGBA32, false, false to TextureFormat.BGRA32, false, true

This solution fix the bug for me in 2022.1.6f1

@silverngx
Copy link

Did anyone else have this issue? The solution did not work for 2022.2.2f1

@PikaChokeMe
Copy link

Did anyone else have this issue? The solution did not work for 2022.2.2f1

This works for me on 2022.2.21, make sure you change the texture format and the true false argument and make sure it actually saves.

Initially, I didn't realise we were also changing the texture format from
TextureFormat.RGBA32 to TextureFormat.BGRA32

@tastez
Copy link

tastez commented Aug 30, 2023

This fix works in beta 2023.1 !

@arghhhhh
Copy link

arghhhhh commented Nov 2, 2023

You can fix (not sure if correct fix) by changing \Runtime\Internal\Receiver.cs line 88/89 (I'm using HDRP)

TextureFormat.RGBA32, false, false to TextureFormat.BGRA32, false, true

For me, in Unity 2021 (URP), this fixes spout senders from external apps but breaks the senders inside the KlakSpout demo scene (alpha, gradient, timecode). I did not see a difference changing the mipmaps bool from false to true.

I was able to fix everything (external and unity spout senders) using texture format RGBA4444, but that causes a loss of image data (although I did not notice a difference in quality on my end).

@RayneYoruka
Copy link

Having this same issue, it works fine in unity 2020 but not in unity 2022.3.6f1

@KamePoon
Copy link

thanks @MrMahgu and @PikaChokeMe, this works for me in 2022.3.6f1 and 2023.2.14f1

@Nohealforu
Copy link

Using 2022.3.22f1 and changing the second bool to true, but leaving the texture format the same worked for me to receive from senders using this package and also other sender application (VTube Studio)

@tastez
Copy link

tastez commented Apr 29, 2024

Headsup to anyone using latest MaxMSP and Spout package - tested in Unity 6000 and 2022 and 2023 - you'll need to init the texture as RGBAfloat as the output format has been changed upgraded

              ((int)data.width, (int)data.height, TextureFormat.RGBAFloat,
               false, true, data.texturePointer);

so depending on what spout is outputting (check with Spout Panel), you'll need to change the receiver script to init the texture correctly.
here are the format names
https://docs.unity3d.com/ScriptReference/TextureFormat.html

from what i understand the function in the script has 2 booleans for Mipmaps and Linear colorspace, then the format.
I kept trying RGBA32 in the unity spout script to match 32bit RGBA Float out of my spout, but looking up the format names led me to RGBAFloat as being the correct one for my case.

so dont expect it to work for all software.
Spout Demo Sender, for example sends, 8bit BGRA so the fix in this thread mentioned above works correctly - and this also used to be the format for MaxMSP's spout package until a couple of months ago or so.

@kaushalkumar86
Copy link

Receiver.cs

Where to find that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests