From 358b6d55ce51a4755c80700b7da4a7eafb98f489 Mon Sep 17 00:00:00 2001 From: chrisf Date: Sat, 7 Jul 2007 09:07:09 +0000 Subject: [PATCH] git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1141 993157c7-ee19-0410-b2c4-bb4e9862e678 --- diffuse.fx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diffuse.fx b/diffuse.fx index e22f1c1386..5ac83422a0 100644 --- a/diffuse.fx +++ b/diffuse.fx @@ -4,6 +4,7 @@ shared texture DiffuseTexture; shared float2 Scroll; +const float2 ScreenSize = { 640, 400 }; sampler s_DiffuseTexture = sampler_state { Texture = ; @@ -32,7 +33,10 @@ struct FragmentIn { VertexOut Simple_vp(VertexIn v) { VertexOut o; - o.Position = float4( v.Position.x / 320.0f - 0.5f - Scroll.x, Scroll.y - v.Position.y / 240.0f, 0, 1 ); + o.Position = float4( + v.Position.x / ScreenSize.x - 0.5f - Scroll.x, + Scroll.y - v.Position.y / ScreenSize.y, + 0, 1 ); o.Tex0 = v.Tex0; return o; }