Removes Direct3D9 functionality.

This commit is contained in:
Areloch 2017-05-28 16:51:31 -05:00
parent 5ac6f6beb3
commit edd1e0a270
86 changed files with 382 additions and 10445 deletions

View file

@ -666,15 +666,11 @@ void PostEffect::_setupConstants( const SceneRenderState *state )
Point2F offset((F32)viewport.point.x / (F32)targetSize.x, (F32)viewport.point.y / (F32)targetSize.y );
Point2F scale((F32)viewport.extent.x / (F32)targetSize.x, (F32)viewport.extent.y / (F32)targetSize.y );
const bool hasTexelPixelOffset = GFX->getAdapterType() == Direct3D9;
const Point2F halfPixel( hasTexelPixelOffset ? (0.5f / targetSize.x) : 0.0f,
hasTexelPixelOffset ? (0.5f / targetSize.y) : 0.0f );
Point4F targetParams;
targetParams.x = offset.x + halfPixel.x;
targetParams.y = offset.y + halfPixel.y;
targetParams.z = offset.x + scale.x - halfPixel.x;
targetParams.w = offset.y + scale.y - halfPixel.y;
targetParams.x = offset.x;
targetParams.y = offset.y;
targetParams.z = offset.x + scale.x;
targetParams.w = offset.y + scale.y;
mShaderConsts->set( mTargetViewportSC, targetParams );
}