Facepunch / garrysmod-requests

Feature requests for Garry's Mod
83 stars 24 forks source link

Make Envmap to work with $phongalbedotint #2353

Open Goldermor opened 2 months ago

Goldermor commented 2 months ago

We can say that this is kinda a duplicate of #1527, but i just know what to do with one of the requests.

Just add envMapColor = (g_SpecularTint.r >= 0.0) ? envMapColor : envMapColor*vSpecularTint; in the same block after these lines. but you should also add code for $phongalbedoboost to that if you can, cuz i don't know what it looks like.

With this setup, envmap will still be controlled by $envmaptint and $phongexponenttexture green channel if $phongalbedotint is on. I don't think it will break existing materials much, cuz that's how it's supposed to work any way. Testing this on dev would be very helpful.

One-Trick-Viper commented 1 month ago

the things I'd do for this, it would allow for so many more possibilities

Goldermor commented 4 weeks ago

if you don't want to affect existing materials you can use g_SpecularTint.g or g_SpecularTint.b you can also choose not to create a parameter for it, so only if $phongtint "[-1,-1,0]" it will work anyway