float4 origin : TRANSFORM0;
float2 offset : TRANSFORM1;
float rotation : TRANSFORM2;
- float4 color : COLOR0;
+ float4 textureCellInfo : TRANSFORM3;
+ float4 color : COLOR0;
};
struct PixelShaderInput
sincos(input[0].rotation, sinRotation, cosRotation);
float2 texCoord[4];
- texCoord[0] = float2(0,0);
- texCoord[1] = float2(1,0);
- texCoord[2] = float2(0,1);
- texCoord[3] = float2(1,1);
+ texCoord[0] = float2(input[0].textureCellInfo.x ,input[0].textureCellInfo.y);
+ texCoord[1] = float2(input[0].textureCellInfo.x + input[0].textureCellInfo.z,input[0].textureCellInfo.y);
+ texCoord[2] = float2(input[0].textureCellInfo.x ,input[0].textureCellInfo.y + input[0].textureCellInfo.w);
+ texCoord[3] = float2(input[0].textureCellInfo.x + input[0].textureCellInfo.z,input[0].textureCellInfo.y + input[0].textureCellInfo.w);
float2 posDelta[4];
posDelta[0] = float2(-input[0].offset.x, input[0].offset.y);