equal
deleted
inserted
replaced
31 |
31 |
32 implementation |
32 implementation |
33 uses uConsts, GLunit, uTypes, uVariables, uTextures, uDebug, uRender; |
33 uses uConsts, GLunit, uTypes, uVariables, uTextures, uDebug, uRender; |
34 |
34 |
35 const TEXSIZE = 128; |
35 const TEXSIZE = 128; |
|
36 // in avoid tile borders stretch the blurry texture by 1 pixel more |
|
37 BLURRYLANDOVERLAP = 1 / TEXSIZE / 2.0; // 1 pixel divided by texsize and blurry land scale factor |
36 |
38 |
37 type TLandRecord = record |
39 type TLandRecord = record |
38 shouldUpdate, landAdded: boolean; |
40 shouldUpdate, landAdded: boolean; |
39 tex: PTexture; |
41 tex: PTexture; |
40 end; |
42 end; |
179 for y:= 0 to LANDTEXARH - 1 do |
181 for y:= 0 to LANDTEXARH - 1 do |
180 with LandTextures[x, y] do |
182 with LandTextures[x, y] do |
181 if tex <> nil then |
183 if tex <> nil then |
182 if (cReducedQuality and rqBlurryLand) = 0 then |
184 if (cReducedQuality and rqBlurryLand) = 0 then |
183 DrawTexture(dX + x * TEXSIZE, dY + y * TEXSIZE, tex) |
185 DrawTexture(dX + x * TEXSIZE, dY + y * TEXSIZE, tex) |
|
186 else if (cReducedQuality and rqClampLess) = 0 then |
|
187 DrawTexture(dX + x * TEXSIZE * 2, dY + y * TEXSIZE * 2, tex, 2.0) |
184 else |
188 else |
185 DrawTexture(dX + x * TEXSIZE * 2, dY + y * TEXSIZE * 2, tex, 2.0) |
189 DrawTexture2(dX + x * TEXSIZE * 2, dY + y * TEXSIZE * 2, tex, 2.0, BLURRYLANDOVERLAP); |
186 |
|
187 end; |
190 end; |
188 |
191 |
189 procedure SetLandTexture; |
192 procedure SetLandTexture; |
190 begin |
193 begin |
191 if (cReducedQuality and rqBlurryLand) = 0 then |
194 if (cReducedQuality and rqBlurryLand) = 0 then |