Hello,
Apologies for the necro here, but for anyone else wanting this feature, you can do this with a simple hack. I am unsure what the minimum required gzdoom version is.
Code: Select all
HardwareShader TEXNAME
{
Shader "shaders/SHADERLUMP"
Speed 1.0
Texture brighttexture "brightmaps/BMNAME.png"
Define BRIGHTMAP
}
Should work with old-style Process and new-style ProcessTexel/ProcessMaterial types.
---------------------------------------------
UPDATE:
---------------------------------------------
If you want to have a shader applied, along with a material and brightmapping, you will need to specify the Material type in GLDEFS that matches what gzdoom selects (e.g. "specular" if using normal/specular without brightmaps; "specularbrightmap", if using bright map; "pbr" if using those). Then define the brightmap & material as you normally would.
In your shader, you will need to define ProcessMaterial, and provide an override that supports all of these, since the default does not for some reason.
EXAMPLE GLDEF ENTRY:
Code: Select all
HardwareShader texture TEXNAME
{
Shader "shaders/SHADERNAME"
Material specularbrightmap
}
brightmap texture TEXNAME { map "brightmaps/TEXNAME.png" }
material texture TEXNAME
{
normal materials/normalmaps/TEXNAME.png
specular materials/specular/TEXNAME.png
glossiness 100
specularlevel 40
}
Then the shader:
Code: Select all
vec4 ProcessTexel()
{
//this is your shader code here
return texture(tex, vTexCoord.st);
}
//this is basically a copy of shaders/glsl/func_spec.fp
//note: pbr will need to use whats in shaders/glsl/func_pbr.fp instead, which i didnt add here
Material ProcessMaterial()
{
Material material;
material.Base = ProcessTexel();
#ifdef NORMALMAP
material.Normal = ApplyNormalMap(vTexCoord.st);
#endif
#ifdef SPECULAR
material.Specular = texture(speculartexture, vTexCoord.st).rgb;
material.Glossiness = uSpecularMaterial.x;
material.SpecularLevel = uSpecularMaterial.y;
#endif
#if defined(BRIGHTMAP)
material.Bright = texture(brighttexture, vTexCoord.st);
#endif
return material;
}