mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-19 15:31:53 +00:00
Bit of cleanup. Clean up my massive hack in the ShaderManagerFiles. Almost feature parity with Nvidia CG now I think. Just need to do Alpha test with Dual source blending now.
This commit is contained in:
parent
1201988fe4
commit
cecc3c3873
6 changed files with 52 additions and 40 deletions
|
@ -149,12 +149,12 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
|||
|
||||
WRITE(p, " sampleUv = sampleUv * "I_COLORS"[0].xy;\n");
|
||||
|
||||
if(ApiType == API_OPENGL)
|
||||
if(ApiType == API_OPENGL || ApiType == API_GLSL)
|
||||
WRITE(p," sampleUv.y = "I_COLORS"[1].y - sampleUv.y;\n");
|
||||
|
||||
WRITE(p, " sampleUv = sampleUv + "I_COLORS"[1].zw;\n");
|
||||
|
||||
if(ApiType != API_OPENGL)
|
||||
if(ApiType != API_OPENGL && ApiType != API_GLSL)
|
||||
{
|
||||
WRITE(p, " sampleUv = sampleUv + float2(0.0f,1.0f);\n");// still to determine the reason for this
|
||||
WRITE(p, " sampleUv = sampleUv / "I_COLORS"[0].zw;\n");
|
||||
|
@ -237,12 +237,12 @@ void Write32BitSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
|||
WRITE(p, " sampleUv.y = yb + xoff;\n");
|
||||
WRITE(p, " sampleUv = sampleUv * "I_COLORS"[0].xy;\n");
|
||||
|
||||
if(ApiType == API_OPENGL)
|
||||
if(ApiType == API_OPENGL || ApiType == API_GLSL)
|
||||
WRITE(p," sampleUv.y = "I_COLORS"[1].y - sampleUv.y;\n");
|
||||
|
||||
WRITE(p, " sampleUv = sampleUv + "I_COLORS"[1].zw;\n");
|
||||
|
||||
if(ApiType != API_OPENGL)
|
||||
if(ApiType != API_OPENGL && ApiType != API_GLSL)
|
||||
{
|
||||
WRITE(p, " sampleUv = sampleUv + float2(0.0f,1.0f);\n");// still to determine the reason for this
|
||||
WRITE(p, " sampleUv = sampleUv / "I_COLORS"[0].zw;\n");
|
||||
|
@ -263,7 +263,7 @@ void WriteSampleColor(char*& p, const char* colorComp, const char* dest, API_TYP
|
|||
|
||||
// the increment of sampleUv.x is delayed, so we perform it here. see WriteIncrementSampleX.
|
||||
const char* texSampleIncrementUnit;
|
||||
if(ApiType != API_OPENGL)
|
||||
if(ApiType != API_OPENGL || ApiType != API_GLSL)
|
||||
texSampleIncrementUnit = I_COLORS"[0].x / "I_COLORS"[0].z";
|
||||
else
|
||||
texSampleIncrementUnit = I_COLORS"[0].x";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue