More work.

This commit is contained in:
magumagu
2015-01-25 17:22:29 -08:00
parent ef75f3005d
commit 6c1bdfe04c
2 changed files with 10 additions and 10 deletions

View File

@ -84,7 +84,7 @@ static void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
WRITE(p, " out float4 ocol0 : SV_Target, in float4 rawpos : SV_Position)\n");
WRITE(p, "{\n"
" int2 sampleUv;\n"
" int2 uv1 = int2((rawpos + 1) / 2 * float2(640, 528));\n"
" int2 uv1 = int2(rawpos.xy);\n"
);
}
@ -127,7 +127,7 @@ static void WriteSampleColor(char*& p, const char* colorComp, const char* dest,
}
else
{
WRITE(p, " %s = Tex0.Sample(samp0, float3(uv0 + float2(%d, 0) * sample_offset, 0.0)).%s;\n",
WRITE(p, " %s = Tex0.Sample(samp0, uv0 + float2(%d, 0) * sample_offset).%s;\n",
dest, xoffset, colorComp
);
}
@ -146,7 +146,6 @@ static void WriteColorToIntensity(char*& p, const char* src, const char* dest)
static void WriteToBitDepth(char*& p, u8 depth, const char* src, const char* dest)
{
//WRITE(p, " ocol0 = float4(1,1,1,1;\n");
WRITE(p, " %s = floor(%s * 255.0 / exp2(8.0 - %d.0));\n", dest, src, depth);
}