ValveSoftware / source-sdk-2013

The 2013 edition of the Source SDK
https://developer.valvesoftware.com/wiki/SDK2013_GettingStarted
Other
3.69k stars 1.99k forks source link

Standard shaders have tons of problems #504

Open InevitablyDivinity opened 3 years ago

InevitablyDivinity commented 3 years ago

The materialsystem does not allow stdshader_dx9 to be overridden. Not all standard shaders in the SDK compile, and many of the standard shaders are even missing. All of these problems make graphics programming within the SDK a difficult task if you wish to base off any of the existing shaders.

RusJJ commented 3 years ago

There's interface for materials overriding. Using that interface you can tell the engine that instead of LightmappedGeneric (for ex.) it must use MYOWN_LightmappedGeneric (for ex., again). Check g-string's repository for replmats.cpp

InevitablyDivinity commented 3 years ago

I'm aware of the materialsystem pass-through, but I'm not particularly happy with that solution, as I'm not sure about the performance impact it may have when loading/pre-caching materials. It would be nicer if the SDK just allowed us to override stdshader_dx9 in the first place, as the feature only exists for TF2 presumably.

InevitablyDivinity commented 3 years ago

On top of this, the 2007 SDK at least supplies all the shaders it had, and with a valid list of shaders to compile. It even had all of them appropriately named with the SDK_ prefix so you could at least modify the standard shaders from the get-go.

RusJJ commented 3 years ago

Precaching wont use shader settings. Performance impact: yeah, sure. Need to test, but i dont think its to big.