SpiderPig Posted April 13, 2014 Share Posted April 13, 2014 Hello. I've taken a close look at my 2D images when they are drawn with DrawImage() and there is a notable quality loss. Not sure if this is a bug in the conversion process or not or if it's my textures... So I've attached the images to see what you all think. One is the original image rendered in Blender. And the other two are screen shots in game; one with the filter mode set to pixel and the other to smooth. Thanks Data.zip Quote Link to comment Share on other sites More sharing options...
DudeAwesome Posted April 13, 2014 Share Posted April 13, 2014 post your code. dont think its because of your files. Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
SpiderPig Posted April 13, 2014 Author Share Posted April 13, 2014 I put together a quick little app to test it and get the same results. Here's the code; --This function will be called once when the program starts tex=nil function App:Start() --Initialize Steamworks (optional) Steamworks:Initialize() --Set the application title self.title="MyGame" --Create a window self.window=Window:Create(self.title) self.window:HideMouse() --Create the graphics context self.context=Context:Create(self.window,0) if self.context==nil then return false end --Create a world self.world=World:Create() --Load a map local mapfile = System:GetProperty("map","Maps/start.map") if Map:Load(mapfile)==false then return false end tex=Texture:Load("Origanal.tex") return true end --This is our main program loop and will be called continuously until the program ends function App:Loop() --If window has been closed, end the program if self.window:Closed() or self.window:KeyDown(Key.Escape) then return false end --Update the app timing Time:Update() --Update the world self.world:Update() --Render the world self.world:Render() --Render statistics self.context:SetBlendMode(Blend.Alpha) if DEBUG then self.context:SetColor(1,0,0,1) self.context:DrawText("Debug Mode",2,2) self.context:SetColor(1,1,1,1) self.context:DrawStats(2,22) self.context:SetBlendMode(Blend.Solid) else --Toggle statistics on and off if (self.window:KeyHit(Key.F11)) then self.showstats = not self.showstats end if self.showstats then self.context:SetColor(1,1,1,1) self.context:DrawText("FPS: "..Math:Round(Time:UPS()),2,2) end end self.context:DrawImage(tex,200,200) --Refresh the screen self.context:Sync(false) --Returning true tells the main program to keep looping return true end Quote Link to comment Share on other sites More sharing options...
tjheldna Posted April 13, 2014 Share Posted April 13, 2014 Double click on the texture in the editor turn off "Generate mipmaps". Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted April 13, 2014 Author Share Posted April 13, 2014 Have done that allready. Still the same quality. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted April 13, 2014 Author Share Posted April 13, 2014 In the editor the image displays okay. It's just when using DrawImage () does it look bad. It also produces a line one pixle high, right at the bottom of the rendered image... im pretty sure that line belongs at the top. Quote Link to comment Share on other sites More sharing options...
tempest Posted April 13, 2014 Share Posted April 13, 2014 it's probably the way LE handles .png files. try using a different file format. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted April 13, 2014 Author Share Posted April 13, 2014 Shall try .dds tomorrow. Thanks Quote Link to comment Share on other sites More sharing options...
bandrewk Posted April 13, 2014 Share Posted April 13, 2014 It works fine for me. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted April 13, 2014 Author Share Posted April 13, 2014 Hmm, what version are you using? I'm using Steam Indie Edition 3.1. Have tried different formats; dds, tga and bmp, but all have the same problem - bmp is actually worse (attached) Screenshot.zip Quote Link to comment Share on other sites More sharing options...
bandrewk Posted April 14, 2014 Share Posted April 14, 2014 I was actually using Leadwerks 3.0. In 3.1 I get the same results as you do: You should post a bug report. Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted April 14, 2014 Author Share Posted April 14, 2014 Thanks. Shall do. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.