garrysmod-issues icon indicating copy to clipboard operation
garrysmod-issues copied to clipboard

Linux build missing mat_depthbias_shadowmap command

Open Zedimation opened this issue 7 months ago • 4 comments

Details

Using the x86-64 - Chromium + 64-bit build on Linux with the CEFCodecFix.

mat_depthbias_shadowmap appears to be missing on the Linux build of Garry's Mod, env_projectedtexture lights suffer large loss in quality, especially when placed at a distance, and seems to stop working on models entirely.

FarZ and NearZ seem to act differently too, but I'm unsure if it's related or not.

Image

Zedimation avatar May 01 '25 05:05 Zedimation

It's not missing. Try using mat_info and see if m_ZBiasAndSlopeScaledDepthBiasSupported says yes.

robotboy655 avatar May 01 '25 12:05 robotboy655

m_ZBiasAndSlopeScaledDepthBiasSupported does turn up as yes. Attempting to use mat_depthbias_shadowmap results in "Unknown command: mat_depthbias_shadowmap" in the console.

Using Proton brings the command back (though there are color-banding and shading issues), but the loading times become exponentially longer to the point where it may as well be frozen.

Zedimation avatar May 01 '25 22:05 Zedimation

I see that it is hidden on Linux/OSX and is set to 20 by default. Not sure if this value is actually used, the convar is defined in multiple places for some reason.

I am also unsure if unhiding the convar would have any benefit, as the rendering system on Linux is slightly different in many ways, which is why I suspect the default value is what it is on Linux, and why the convar is hidden in the first place.

robotboy655 avatar May 07 '25 17:05 robotboy655

Shadows on models seem mostly to work fine in Half-Life 2, but the convar is hidden there too, so I can't compare anything.

Hopefully there's a fix in the near future.

Zedimation avatar May 09 '25 02:05 Zedimation