diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c
index 0d7404c7740760c81793912f58d5b2781c2e01bf..0db7a2a4cec6df4d9b22a4850ef79f7c1c1d2d8b 100644
--- a/src/hardware/hw_main.c
+++ b/src/hardware/hw_main.c
@@ -2757,8 +2757,8 @@ static void HWR_RenderPolyObjectPlane(polyobj_t *polysector, boolean isceiling,
 		HWR_SetCurrentTexture(NULL);
 
 	// reference point for flat texture coord for each vertex around the polygon
-	flatxref = (float)((polysector->origVerts[0].x & (~flatflag)) / fflatwidth);
-	flatyref = (float)((polysector->origVerts[0].y & (~flatflag)) / fflatheight);
+	flatxref = (float)(((fixed_t)FIXED_TO_FLOAT(polysector->origVerts[0].x) & (~flatflag)) / fflatwidth);
+	flatyref = (float)(((fixed_t)FIXED_TO_FLOAT(polysector->origVerts[0].y) & (~flatflag)) / fflatheight);
 
 	// transform
 	v3d = planeVerts;