TextureConversionShader: Remove an unused parameter
This commit is contained in:
parent
0e41b973c7
commit
8e17c710f3
|
@ -148,7 +148,7 @@ static void WriteToBitDepth(char*& p, u8 depth, const char* src, const char* des
|
|||
WRITE(p, " %s = floor(%s * 255.0 / exp2(8.0 - %d.0));\n", dest, src, depth);
|
||||
}
|
||||
|
||||
static void WriteEncoderEnd(char*& p, API_TYPE ApiType)
|
||||
static void WriteEncoderEnd(char*& p)
|
||||
{
|
||||
WRITE(p, "}\n");
|
||||
IntensityConstantAdded = false;
|
||||
|
@ -173,7 +173,7 @@ static void WriteI8Encoder(char*& p, API_TYPE ApiType)
|
|||
|
||||
WRITE(p, " ocol0.rgba += IntensityConst.aaaa;\n"); // see WriteColorToIntensity
|
||||
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteI4Encoder(char*& p, API_TYPE ApiType)
|
||||
|
@ -214,7 +214,7 @@ static void WriteI4Encoder(char*& p, API_TYPE ApiType)
|
|||
WriteToBitDepth(p, 4, "color1", "color1");
|
||||
|
||||
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteIA8Encoder(char*& p,API_TYPE ApiType)
|
||||
|
@ -232,7 +232,7 @@ static void WriteIA8Encoder(char*& p,API_TYPE ApiType)
|
|||
|
||||
WRITE(p, " ocol0.ga += IntensityConst.aa;\n");
|
||||
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteIA4Encoder(char*& p,API_TYPE ApiType)
|
||||
|
@ -264,7 +264,7 @@ static void WriteIA4Encoder(char*& p,API_TYPE ApiType)
|
|||
WriteToBitDepth(p, 4, "color1", "color1");
|
||||
|
||||
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteRGB565Encoder(char*& p,API_TYPE ApiType)
|
||||
|
@ -287,7 +287,7 @@ static void WriteRGB565Encoder(char*& p,API_TYPE ApiType)
|
|||
WRITE(p, " ocol0.ga = ocol0.ga + gLower * 32.0;\n");
|
||||
|
||||
WRITE(p, " ocol0 = ocol0 / 255.0;\n");
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteRGB5A3Encoder(char*& p,API_TYPE ApiType)
|
||||
|
@ -353,7 +353,7 @@ static void WriteRGB5A3Encoder(char*& p,API_TYPE ApiType)
|
|||
WRITE(p, "}\n");
|
||||
|
||||
WRITE(p, " ocol0 = ocol0 / 255.0;\n");
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteRGBA8Encoder(char*& p,API_TYPE ApiType)
|
||||
|
@ -378,7 +378,7 @@ static void WriteRGBA8Encoder(char*& p,API_TYPE ApiType)
|
|||
|
||||
WRITE(p, " ocol0 = first ? color0 : color1;\n");
|
||||
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
|
@ -400,7 +400,7 @@ static void WriteC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
|||
WriteToBitDepth(p, 4, "color1", "color1");
|
||||
|
||||
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteC8Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
|
@ -412,7 +412,7 @@ static void WriteC8Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
|||
WriteSampleColor(p, comp, "ocol0.r", 2, ApiType);
|
||||
WriteSampleColor(p, comp, "ocol0.a", 3, ApiType);
|
||||
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteCC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||
|
@ -442,7 +442,7 @@ static void WriteCC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
|||
WriteToBitDepth(p, 4, "color1", "color1");
|
||||
|
||||
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteCC8Encoder(char*& p, const char* comp, API_TYPE ApiType)
|
||||
|
@ -452,7 +452,7 @@ static void WriteCC8Encoder(char*& p, const char* comp, API_TYPE ApiType)
|
|||
WriteSampleColor(p, comp, "ocol0.bg", 0, ApiType);
|
||||
WriteSampleColor(p, comp, "ocol0.ra", 1, ApiType);
|
||||
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteZ8Encoder(char*& p, const char* multiplier,API_TYPE ApiType)
|
||||
|
@ -477,7 +477,7 @@ static void WriteZ8Encoder(char*& p, const char* multiplier,API_TYPE ApiType)
|
|||
if (ApiType == API_D3D) WRITE(p, "depth = 1.0f - depth;\n");
|
||||
WRITE(p, "ocol0.a = frac(depth * %s);\n", multiplier);
|
||||
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
||||
|
@ -511,7 +511,7 @@ static void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
|||
WRITE(p, " ocol0.r = expanded.g / 255.0;\n");
|
||||
WRITE(p, " ocol0.a = expanded.r / 255.0;\n");
|
||||
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
||||
|
@ -549,7 +549,7 @@ static void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
|||
WRITE(p, " ocol0.r = expanded.b / 255.0;\n");
|
||||
WRITE(p, " ocol0.a = expanded.g / 255.0;\n");
|
||||
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
static void WriteZ24Encoder(char*& p, API_TYPE ApiType)
|
||||
|
@ -591,7 +591,7 @@ static void WriteZ24Encoder(char*& p, API_TYPE ApiType)
|
|||
WRITE(p, " ocol0.a = expanded1.r / 255.0;\n");
|
||||
WRITE(p, " }\n");
|
||||
|
||||
WriteEncoderEnd(p, ApiType);
|
||||
WriteEncoderEnd(p);
|
||||
}
|
||||
|
||||
const char *GenerateEncodingShader(u32 format,API_TYPE ApiType)
|
||||
|
|
Loading…
Reference in New Issue