White textures on Mac/Linux

Users who are viewing this thread

Dejan

Community Manager
Hello!

In an attempt to iron out all the bugs present in PW I am trying to fix the issue of white textures on Mac.

Vornne said:
Zebulon11 said:
Hey trying to run PW on my Mac.. But all the textures come up as white in game... Any fixes?
Due to some custom shaders used in PW, made with the Windows HLSL format before the Steam Mac / Linux versions were available: since they don't exist in the GLSL shader format necessary for your system, the meshes are rendered blank white. I have heard it should be possible to write / convert to GLSL shaders, but I don't have the time. You could try this patch I posted for someone else with the same problem; it reverts usages of custom PW shaders to similar shaders in Native, and should at least look better than white meshes. I haven't tested it, or got feedback on whether it works, so it hasn't been listed in the download section.

I haven't tested that particular patch but I've tried replacing the PW custom shaders with similar shaders in Native however the scene props then turned green. Replacing the custom shaders with native shaders is probably the easiest way to resolve this (not sure how much that would hurt the way things look). Ideally, this would be resolved in a way that a separate download for Mac users isn't required but can be released as a full version for everyone.

If the problem can't be resolved using the native shaders then I would turn towards what was mentioned above -> HLSL to GLSL conversion which I honestly have no clue about. (More information and conversation with Swyter about it can be found here: https://pastebin.com/DY4xBu1b).

To finally get to my questions:

5fb3f1783df949ff27daed5c82b025d5.png


1. Which native shaders are suited to act as a replacement for the custom PW shaders posted above?
2. How much will that affect the way things look in-game?
3. If anybody has experience converting shaders from HLSL to GLSL, your help & guidance would be very much appreciated.

If we end up fixing this for PK I would be more than happy to do it for PW as well (if the patch above doesn't do that already).

Thanks.
 
I know very little about shader programming or the M&B code in particular, I just disliked the "green reflections" on new Warband scene props, so tweaked those shaders very slightly to disable that aspect, and also tweaked some other shaders used for wood and stone walls to work better with dynamic point lights (mainly hand held torches), named with "greenbump" for lack of a better term, since that type of bumpmap appears green and black rather than blue and purple. These commits show the only changes from the standard Warband shaders: https://github.com/vornne/pw_module_system/commits/pw/shaders

Unfortunately I have forgotten what I ever learned about the shader code: I was intending one day to try rewrite the whole shader file to try learn about and maybe optimise it, but never got around to that; other people on the forums have already done that sort of thing, so it would probably be "reinventing the wheel", with the sole benefit of personal learning.

To fix the white textures on Mac and keep the same appearance as on Windows, the simplest thing would probably be to reproduce the same small tweaks compared to Native (shown in the commits linked above) in the shader source for the GLSL Mac/Linux version: I don't know if that is available, but someone else on the forums might have access to it.

I can't reply directly to your numbered questions, since I don't know the best alternatives compatible with Mac - other than removing the _greenbump and _noterraincolor parts to use the Warband shaders they were based on, the same as the "revert to Native" patch does.
 
Back
Top Bottom