Aeryes 0 Posted March 2, 2019 Hey modders!!! I am having an issue setting params for materials found in the graphics folder. I keep getting an error when I try to load my script ingame that says "materialColors is an incompatible parameter". static float VIGNETTE = 0.0; Material materialColors = GetGame().GetWorld().GetMaterial("graphics/materials/postprocess/glow"); // Function used to change the strength of the vignette effect. // Intensity value between 0-100. 0 been least instense, 100 most intense. void changeVignette(int intensity) { VIGNETTE = ((intensity * 0.01) - 5.0); materialColors.SetParam("Vignette", VIGNETTE); } Here is a sample from my code. The basic layout looks like this, where I define my materials and create my functions to change param values. However it will not work as expected and keeps giving me the error I mentioned above. All help is much appreciated. Share this post Link to post Share on other sites
lbmaster 21 Posted April 24, 2019 I found this example in the Files: Material matColors = GetGame().GetWorld().GetMaterial("postprocess/glow"); SetMaterialParam(matColors, "Saturation", 0.8); float color[4]; color[0] = 0.5; color[1] = 0.8; color[2] = 0.7; color[3] = 0.6; SetMaterialParam(matColors, "OverlayColor", color); Try to use this method Share this post Link to post Share on other sites