- added a few more texture coloring options to the shader.
Aside from adding an additive component it can now also do: - desaturation (not limited to the range of 0..1 so it can also be used for oversaturation by applying a negative number or negative saturation by going above 1.0. - invert the texture - apply a blend, including 3 special mode taken from EDuke32. Currently only the implementation is done, it is not exposed to UDMF yet.
This commit is contained in:
parent
41a9496bef
commit
3209d4ed23
7 changed files with 142 additions and 6 deletions
|
|
@ -242,10 +242,17 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
i_data += "uniform vec4 uObjectColor2;\n";
|
||||
i_data += "uniform vec4 uDynLightColor;\n";
|
||||
i_data += "uniform vec4 uAddColor;\n";
|
||||
i_data += "uniform vec4 uBlendColor;\n";
|
||||
i_data += "uniform vec4 uFogColor;\n";
|
||||
i_data += "uniform float uDesaturationFactor;\n";
|
||||
i_data += "uniform float uInterpolationFactor;\n";
|
||||
|
||||
i_data += "uniform float uObjectDesaturationFactor;\n";
|
||||
i_data += "uniform float uObjectColorizeFactor;\n";
|
||||
i_data += "uniform int uObjectBlendMode;\n";
|
||||
i_data += "uniform int uObjectInvertColor;\n";
|
||||
|
||||
|
||||
// Glowing walls stuff
|
||||
i_data += "uniform vec4 uGlowTopPlane;\n";
|
||||
i_data += "uniform vec4 uGlowTopColor;\n";
|
||||
|
|
@ -536,6 +543,11 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char *
|
|||
muAlphaThreshold.Init(hShader, "uAlphaThreshold");
|
||||
muSpecularMaterial.Init(hShader, "uSpecularMaterial");
|
||||
muAddColor.Init(hShader, "uAddColor");
|
||||
muBlendColor.Init(hShader, "uBlendColor");
|
||||
muObjectDesaturationFactor.Init(hShader, "uObjectDesaturationFactor");
|
||||
muObjectColorizeFactor.Init(hShader, "uObjectColorizeFactor");
|
||||
muObjectBlendMode.Init(hShader, "uObjectBlendMode");
|
||||
muObjectInvertColor.Init(hShader, "uObjectInvertColor");
|
||||
muTimer.Init(hShader, "timer");
|
||||
|
||||
lights_index = glGetUniformLocation(hShader, "lights");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue