- Status
- Offline
- Joined
- Mar 25, 2019
- Messages
- 45
- Reaction score
- 18
std::ofstream("csgo\\materials\\glowOverlay.vmt") << R"#("VertexLitGeneric"
{
"$additive" "1"
"$envmap" "models/effects/cube_white"
"$envmaptint" "[0 0.5 1]"
"$envmapfresnel" "1"
"$envmapfresnelminmaxexp" "[0 1 2]"
"$alpha" "0.8"
}
)#";
materialGlow = g_MatSystem->FindMaterial("glowOverlay", TEXTURE_GROUP_MODEL);
ye its possible, u make bool found, then material->findvar("$envmaptint",found) and if(found) material->setvector(colors) or something like that. or take a look in rifk sourceCan you change the color of this call? other than by "$ envmaptint" "[0 0.5 1]" RGB Type
bool bFound;
auto pVar = material->FindVar("$envmaptint", &bFound);
if (bFound)
pVar->set_vec_value(
rgba.r() / 255.0f,
rgba.g() / 255.0f,
rgba.b() / 255.0f);
class IMaterialVar
{
public:
void set_vec_value(float r, float g, float b) {
using original_fn = void(__thiscall*)(IMaterialVar*, float, float, float);
return (*(original_fn**)this)[11](this, r, g, b);
}
};