Changeset 2566


Ignore:
Timestamp:
Mar 8, 2013, 12:47:50 PM (8 years ago)
Author:
sam
Message:

gpu: only add the half-texel offset on the X360.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/tile.lolfx

    r2558 r2566  
    4343          uniform float4x4 view_matrix,
    4444          uniform float4x4 model_matrix,
     45          uniform float2 in_TexSize,
    4546          out float2 out_TexCoord : TEXCOORD0,
    4647          out float4 out_Position : POSITION)
    4748{
     49#if _XBOX
     50    float2 delta = float2(-0.5, -0.5) / in_TexSize;
     51#else
     52    float2 delta = float2(0.0, 0.0);
     53#endif
    4854    out_Position = mul(proj_matrix, mul(view_matrix, mul(model_matrix, in_Position)));
    49     out_TexCoord = in_TexCoord;
     55    out_TexCoord = in_TexCoord + delta;
    5056}
    5157
     
    5460void main(float2 in_TexCoord : TEXCOORD0,
    5561          uniform sampler2D in_Texture,
    56           uniform float2 in_TexSize,
    5762          out float4 out_FragColor : COLOR)
    5863{
    59     float2 delta = float2(-0.5, -0.5) / in_TexSize;
    60     float4 col = tex2D(in_Texture, in_TexCoord + delta);
     64    float4 col = tex2D(in_Texture, in_TexCoord);
    6165    out_FragColor = col;
    6266}
Note: See TracChangeset for help on using the changeset viewer.