I am requesting a modification to the shaders to enable detail texture support for added effects. These can be completely disabled with r_detailtextures 0. None of my modifications affect gameplay, due to its subtle nature.
Here is the jist of most of the shaders:
shaderpath
{
{ // this block is the default shader for entities without explicit shaders
map texturemappath
rgbGen lightingDiffuse
}
{ // enable specular lighting
map $whiteimage
blendFunc GL_DST_COLOR GL_SRC_ALPHA
detail
alphaGen lightingSpecular
}
{ // this part is for metal and alien flesh
map environmentmappath(such as models/buildables/mgturret/ref_map.jpg)
blendFunc GL_DST_COLOR GL_SRC_ALPHA
detail
tcGen environment
}
}
This modification enables specular lighting on all the players and structures, as well as an environment map on the metallic or slimy shaders(such as aliens and human structures/armor).
Yes, this is the ShinyTrem mod(check the forums), minus the map shader modifications. I am hoping to get this into SVN as it has the ability to be completely disabled if the player sees fit.
Some of the structures don't seem to work with these modifications, such as the armory. The Armory and Hovel both look like they do in 1.1.0 with and without this modification, as if the new shaders don't even work. It might have to do with the way the models reference the shaders.
Some surfaces look absolutely stunning with this(try looking at the Medistation!), and I think Tremulous would benefit from it.
Revised example shader(to fix vertex lighting mode)
shaderpath
{
{ // this block is the default shader for entities without explicit shaders
map texturemappath
rgbGen lightingDiffuse
}
{ // enable specular lighting
map $whiteimage
rgbGen lightingDiffuse
blendFunc GL_DST_COLOR GL_SRC_ALPHA
detail
alphaGen lightingSpecular
}
{ // this part is for metal and alien flesh
map environmentmappath(such as models/buildables/mgturret/ref_map.jpg)
blendFunc GL_DST_COLOR GL_ONE
detail
tcGen environment
}
}
Problem is now, in order to fix the shader from becoming completely white in r_vertexLight mode, a second rgbGen lightingDiffuse is needed, in order to keep the second stage(the specular stage) as a detail texture. This obviously darkens the resulting surfaces.
I have solved the problem by having the second stage use the texture of the first stage again. I don't know how much this impacts performance, but it can't be much.
shaderpath
{
{ // this block is the default shader for entities without explicit shaders
map texturemappath
rgbGen lightingDiffuse
}
{ // enable specular lighting
map texturemappath //again
blendFunc GL_DST_COLOR GL_ONE
detail
alphaGen lightingSpecular
}
{ // this part is for metal and alien flesh
map environmentmappath(such as models/buildables/mgturret/ref_map.jpg)
blendFunc GL_DST_COLOR GL_ONE
detail
tcGen environment
}
}
Created attachment 1884 [details] Proposed shader changes