Skip to content

Commit

Permalink
Add the Cybran red channel (FAForever#4963)
Browse files Browse the repository at this point in the history
The red channel is used for various graphical effects. A lot of Cybran units did not have a red channel. These changes introduce that channel. Includes various tweaks to shaders to align the quality of Cybran units with those of other factions.
  • Loading branch information
BlackYps authored May 29, 2023
1 parent deb5632 commit c7cefe6
Show file tree
Hide file tree
Showing 205 changed files with 86 additions and 87 deletions.
9 changes: 4 additions & 5 deletions effects/mesh.fx
Original file line number Diff line number Diff line change
Expand Up @@ -3470,15 +3470,14 @@ float4 NormalMappedInsectPS_02( NORMALMAPPED_VERTEX vertex, uniform bool hiDefSh
light = light * 1.2;
float phongAmount = saturate( dot( reflect( sunDirection, normal), -vertex.viewDirection));
float3 phongAdditive = pow( phongAmount, 3) * specular.g * light * 0.5;
float3 phongMultiplicative = (phongAmount * environment * specular.r * light * 2);
float3 phongMultiplicative = (phongAmount * environment * specular.r * light * 0.2);

float emissive = glowMultiplier * specular.b;

//Finish it
float3 color = (albedo.rgb * 0.125) + emissive + (light * albedo.rgb) + (phongAdditive) + phongMultiplicative;

color = ApplyWaterColor(vertex.depth.x, color);

float alpha = mirrored ? 0.5 : specular.b + glowMinimum + (phongAdditive * 0.04);
//color = phongAdditive;
//alpha = 0;
return float4( color, alpha);
Expand Down Expand Up @@ -9556,7 +9555,7 @@ float4 PBR_Cybran(NORMALMAPPED_VERTEX vertex, float teamColorFactor, uniform boo
float4 albedo = tex2D( albedoSampler, vertex.texcoord0.xy);
float4 specular = tex2D( specularSampler, vertex.texcoord0.xy);

float metallic = saturate((pow(specular.r, 0.7) + specular.g * 0.2 - specular.a * 0.5) * 4.37);
float metallic = saturate(specular.r + saturate(specular.g - 0.1) * 0.87 - specular.a * 2.2);
float roughness = lerp(0.8 * (1 - specular.g), lerp(0.5, 0.25, specular.g), metallic);

albedo.rgb = min(lerp(albedo.rgb, albedo.rgb * 2.3, pow(metallic, 2.5)), float3(1, 1, 1));
Expand All @@ -9566,7 +9565,7 @@ float4 PBR_Cybran(NORMALMAPPED_VERTEX vertex, float teamColorFactor, uniform boo
float emission = pow(max(specular.b - 0.04, 0.0), 0.5);
color = ApplyWaterColorExponentially(vertex, color, emission * albedo);

float alpha = mirrored ? 0.5 : emission + glowMinimum;
float alpha = mirrored ? 0.5 : min(emission + glowMinimum, 0.3);

return float4(color, alpha);
}
Expand Down
Binary file added units/DRA0202/DRA0202_SpecTeam.dds
Binary file not shown.
Binary file added units/DRL0204/DRL0204_SpecTeam.dds
Binary file not shown.
Binary file modified units/DRLK001/DRLK001_SpecTeam.dds
Binary file not shown.
Binary file modified units/DRLK005/DRLK005_SpecTeam.dds
Binary file not shown.
Binary file modified units/URA0001O/URA0001O_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0101/URA0101_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0102/URA0102_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0103/URA0103_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0104/URA0104_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0107/URA0107_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0203/URA0203_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0204/URA0204_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0302/URA0302_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0303/URA0303_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0304/URA0304_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0310/URA0310_SpecTeam.dds
Binary file not shown.
Binary file added units/URA0401/URA0401_SpecTeam.dds
Binary file not shown.
Binary file modified units/URB0101/URB0101_SpecTeam.dds
Binary file not shown.
Binary file modified units/URB0102/URB0102_SpecTeam.dds
Binary file not shown.
Binary file modified units/URB0103/URB0103_SpecTeam.dds
Binary file not shown.
Binary file added units/URB0201/URB0201_SpecTeam.dds
Binary file not shown.
Binary file added units/URB0202/URB0202_SpecTeam.dds
Binary file not shown.
Binary file added units/URB0203/URB0203_SpecTeam.dds
Binary file not shown.
Binary file added units/URB0301/URB0301_SpecTeam.dds
Binary file not shown.
Binary file added units/URB0302/URB0302_SpecTeam.dds
Binary file not shown.
Binary file added units/URB0303/URB0303_SpecTeam.dds
Binary file not shown.
Binary file added units/URB0304/URB0304_SpecTeam.dds
Binary file not shown.
Binary file added units/URB0401/URB0401_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1101/URB1101_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1102/URB1102_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1103/URB1103_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1104/URB1104_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1105/URB1105_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1106/URB1106_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1201/URB1201_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1202/URB1202_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1301/URB1301_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1302/URB1302_SpecTeam.dds
Binary file not shown.
Binary file added units/URB1303/URB1303_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2101/URB2101_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2104/URB2104_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2108/URB2108_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2109/URB2109_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2204/URB2204_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2205/URB2205_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2301/URB2301_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2302/URB2302_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2303/URB2303_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2304/URB2304_SpecTeam.dds
Binary file not shown.
Binary file added units/URB2305/URB2305_SpecTeam.dds
Binary file not shown.
Binary file added units/URB3101/URB3101_SpecTeam.dds
Binary file not shown.
Binary file added units/URB3102/URB3102_SpecTeam.dds
Binary file not shown.
Binary file added units/URB3104/URB3104_SpecTeam.dds
Binary file not shown.
Binary file added units/URB3201/URB3201_SpecTeam.dds
Binary file not shown.
Binary file added units/URB3202/URB3202_SpecTeam.dds
Binary file not shown.
Binary file added units/URB3302/URB3302_SpecTeam.dds
Binary file not shown.
Binary file added units/URB4201/URB4201_SpecTeam.dds
Binary file not shown.
Binary file modified units/URB4202/URB4202_SpecTeam.dds
Binary file not shown.
Binary file added units/URB4203/URB4203_SpecTeam.dds
Binary file not shown.
Binary file added units/URB4204/URB4204_SpecTeam.dds
Binary file not shown.
Binary file added units/URB4205/URB4205_SpecTeam.dds
Binary file not shown.
Binary file added units/URB4206/URB4206_SpecTeam.dds
Binary file not shown.
Binary file added units/URB4207/URB4207_SpecTeam.dds
Binary file not shown.
Binary file added units/URB4301/URB4301_SpecTeam.dds
Binary file not shown.
Binary file added units/URB4302/URB4302_SpecTeam.dds
Binary file not shown.
Binary file added units/URB5101/URB5101_SpecTeam.dds
Binary file not shown.
Binary file added units/URB5103/URB5103_SpecTeam.dds
Binary file not shown.
Binary file added units/URB5202/URB5202_SpecTeam.dds
Binary file not shown.
Binary file added units/URC0001/URC0001_SpecTeam.dds
Binary file not shown.
Binary file added units/URC0002/URC0002_SpecTeam.dds
Binary file not shown.
Binary file added units/URC1101/URC1101_SpecTeam.dds
Binary file not shown.
Binary file added units/URC1201/URC1201_SpecTeam.dds
Binary file not shown.
Binary file added units/URC1301/URC1301_SpecTeam.dds
Binary file not shown.
Binary file added units/URC1302/URC1302_SpecTeam.dds
Binary file not shown.
Binary file added units/URC1401/URC1401_SpecTeam.dds
Binary file not shown.
Binary file added units/URC1501/URC1501_SpecTeam.dds
Binary file not shown.
Binary file added units/URC1901/URC1901_SpecTeam.dds
Binary file not shown.
Binary file added units/URC1902/URC1902_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0001/URL0001_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0101/URL0101_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0103/URL0103_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0104/URL0104_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0105/URL0105_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0106/URL0106_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0107/URL0107_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0111/URL0111_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0202/URL0202_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0203/URL0203_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0205/URL0205_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0208/URL0208_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0301/URL0301_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0303/URL0303_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0304/URL0304_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0306/URL0306_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0309/URL0309_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0401/URL0401_SpecTeam.dds
Binary file not shown.
Binary file added units/URL0402/URL0402_SpecTeam.dds
Binary file not shown.
Binary file added units/URS0103/URS0103_SpecTeam.dds
Binary file not shown.
Binary file added units/URS0201/URS0201_SpecTeam.dds
Binary file not shown.
Binary file added units/URS0202/URS0202_SpecTeam.dds
Binary file not shown.
Binary file added units/URS0203/URS0203_SpecTeam.dds
Binary file not shown.
Binary file added units/URS0302/URS0302_SpecTeam.dds
Binary file not shown.
Binary file added units/URS0303/URS0303_SpecTeam.dds
Binary file not shown.
Binary file added units/URS0304/URS0304_SpecTeam.dds
Binary file not shown.
Binary file added units/URS0305/URS0305_SpecTeam.dds
Binary file not shown.
Binary file added units/XRA0105/XRA0105_SpecTeam.dds
Binary file not shown.
Binary file added units/XRA0305/XRA0305_SpecTeam.dds
Binary file not shown.
Binary file added units/XRB0104/XRB0104_SpecTeam.dds
Binary file not shown.
Binary file added units/XRB0204/XRB0204_SpecTeam.dds
Binary file not shown.
Binary file added units/XRB0304/xrb0304_SpecTeam.dds
Binary file not shown.
Binary file added units/XRB2308/XRB2308_SpecTeam.dds
Binary file not shown.
Binary file added units/XRB3301/XRB3301_SpecTeam.dds
Binary file not shown.
Binary file added units/XRC1502/XRC1502_SpecTeam.dds
Binary file not shown.
Binary file added units/XRC2201/XRC2201_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC2201/XRC2201_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ UnitBlueprint {
{
LODCutoff = 250,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = 'xrc2201_lod1_albedo.dds',
LODCutoff = 900,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = 'xrc2201_lod1_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8001/XRC8001_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8001/XRC8001_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = 'xrc8001_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = 'xrc8001_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8002/XRC8002_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8002/XRC8002_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = '/units/xrc8001/xrc8001_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = '/units/xrc8001/xrc8001_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8003/XRC8003_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8003/XRC8003_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = '/units/xrc8001/xrc8001_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = '/units/xrc8001/xrc8001_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8004/XRC8004_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8004/XRC8004_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = '/units/xrc8001/xrc8001_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = '/units/xrc8001/xrc8001_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8005/XRC8005_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8005/XRC8005_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = 'xrc8005_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = 'xrc8005_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8006/XRC8006_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8006/XRC8006_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = '/units/xrc8005/xrc8005_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = '/units/xrc8005/xrc8005_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8007/XRC8007_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8007/XRC8007_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = '/units/xrc8005/xrc8005_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = '/units/xrc8005/xrc8005_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8008/XRC8008_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8008/XRC8008_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = '/units/xrc8005/xrc8005_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = '/units/xrc8005/xrc8005_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8009/XRC8009_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8009/XRC8009_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = 'xrc8009_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = 'xrc8009_specteam.dds',
},
},
Expand Down
Binary file added units/XRC8010/XRC8010_SpecTeam.dds
Binary file not shown.
4 changes: 2 additions & 2 deletions units/XRC8010/XRC8010_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ UnitBlueprint {
{
LODCutoff = 120,
Scrolling = true,
ShaderName = 'Unit',
ShaderName = 'Insect',
},
{
AlbedoName = '/units/xrc8009/xrc8009_albedo.dds',
LODCutoff = 300,
ShaderName = 'Unit',
ShaderName = 'Insect',
SpecularName = '/units/xrc8009/xrc8009_specteam.dds',
},
},
Expand Down
Loading

0 comments on commit c7cefe6

Please sign in to comment.