xzxADIxzx / Join-and-kill-em-together

Multikill is still in development, so I created my own multiplayer mod for Ultrakill
GNU Affero General Public License v3.0
141 stars 26 forks source link

Trails lack shaders in OpenGL renderer #113

Closed coatlessali closed 2 months ago

coatlessali commented 2 months ago

When using the OpenGL renderer via -force-glcore, the trails behind players appear purple and do not have shaders.

image

xzxADIxzx commented 2 months ago

I will check it, but it's mostly an issue of Unity, as I use their shaders. Also, check if V2 have purple trail or not.

coatlessali commented 2 months ago

You likely do not have OpenGL enabled as a rendering backend in your project settings. V2's trails are fine.

image

xzxADIxzx commented 2 months ago

Wdym "OpenGL enabled" and what project do you mean?

coatlessali commented 2 months ago

Do you use Unity to generate your jaket-assets.bundle file?

coatlessali commented 2 months ago

Also, I made this image a long time ago for UKDS, but it should prove useful. image image

xzxADIxzx commented 2 months ago

Yeah, I use Unity, but who cares? I don't build the game, and I use either Unity standard shaders that must be included in the game or ultrakill shaders, so it does not matter

coatlessali commented 2 months ago

Unity is not exporting your assetbundles with OpenGL support. If there is some other way of generating assetbundles I would like to know exactly what it is.

"Who cares" includes:

xzxADIxzx commented 2 months ago

I didn't mean the issue when said "who cares". I said that because there are no shader assets in the bundle, I use shaders from the game.

coatlessali commented 2 months ago

I believe any assets in the bundle, even if they use shaders from the game, will have those shaders compiled from an intermediary language to a per-renderer format, which by default is only D3D11. I have reason to believe that enabling OpenGL as a target in the Unity settings would fix this.

I could very well be wrong, but I think it's worth a shot.

xzxADIxzx commented 2 months ago

Okay I will try 2 build it with OpenGL enabled and then send you

xzxADIxzx commented 2 months ago

But I would also appreciate you telling me how to enable OpenGL on Windows, so that I will not have to download Ultrakill on my slow hard drive with Linux

coatlessali commented 2 months ago

The process is no different. If the assetbundle has OpenGL shaders embedded, it will work on all Platforms. A Linux version is not needed. Most people playing the game on MacOS/Linux will be playing the Windows version with a compatibility layer anyways. https://docs.unity3d.com/2020.1/Documentation/Manual/OpenGLCoreDetails.html This page explains it, but be sure to choose both OpenGLCore and Direct3D 11. Otherwise, you will end up with only OpenGL shaders.

xzxADIxzx commented 2 months ago

I mean, how do I force Ultrakill to use OpenGL, so that I will not have to wait for u to test my bundle

coatlessali commented 2 months ago

Simply put -force-glcore in your launch options in Steam. A full list of arguments can be found here: https://docs.unity3d.com/2019.4/Documentation/Manual/PlayerCommandLineArguments.html

xzxADIxzx commented 2 months ago

Thanks, I'll test it as soon as my classes end (around 3 p.m. by MSK)

xzxADIxzx commented 2 months ago

Okay, I was able to reproduce this bug and now I see that I have chosen a wrong material x-x

xzxADIxzx commented 2 months ago

Fixed