tjheldna Posted September 20, 2012 Share Posted September 20, 2012 Hi All, I have a Color Buffer going and rendering an alpha image, but I am having one issue with it. See Image below... I can't seem to get rid of these artefacts. They only seem to appear in transparent areas and the amount of them vary every level load from 0 to pretty bad like the image. Any ideas of what this could be? Quote Link to comment Share on other sites More sharing options...
macklebee Posted September 20, 2012 Share Posted September 20, 2012 are you sometimes changing what is drawn in the other buffer? i have seen it leave artifacts like that... i got around it by clearing the buffer before each time the image was drawn in it if i remember correctly... that or its an issue with the texture itself... looks almost like a compression issue causing artifacts with the alpha transparency... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
tjheldna Posted September 20, 2012 Author Share Posted September 20, 2012 Yeah I've got a few things being drawn. So I clear the buffer, but I seem to loose my alpha channel. Is there something I need to call to get it back? I'll redo the textures and see if that helps. Cheers! Quote Link to comment Share on other sites More sharing options...
tjheldna Posted September 20, 2012 Author Share Posted September 20, 2012 Also is it normal to loose 20fps when using another buffer? If so its a big hit! Quote Link to comment Share on other sites More sharing options...
Canardia Posted September 20, 2012 Share Posted September 20, 2012 FPS depends mostly on buffer size and render passes. When you make buffers for animated textures, use a small buffer size, like 512x512 or 256x256, and don't render lights (=RenderLights) on it, but only geometry (=RenderWorld), also use Flip(0) because it doesn't need vsync. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
macklebee Posted September 20, 2012 Share Posted September 20, 2012 well i just tried an image that had a transparent border all the way around it and it seemed to take care of the fact that clearing the buffer makes the buffer white... so maybe add a small transparent border completely around the image? Or you can do a lil cheat like I just tried and create a completely transparent image and then draw that fullsize covering the buffer completely before drawing your other image... and it looks like you dont have to use ClearBuffer() anymore when you do that... FPS depends mostly on buffer size and render passes. When you make buffers for animated textures, use a small buffer size, like 512x512 or 256x256, and don't render lights (=RenderLights) on it, but only geometry (=RenderWorld), also use Flip(0) because it doesn't need vsync. why use render or flip at all? he is just drawing an image to a separate buffer not rendering another world... unless i am reading wrong what he is doing... EDIT: you might also want to check that texture... it really does look like the artifacts you get from using compression on an alpha texture... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Canardia Posted September 20, 2012 Share Posted September 20, 2012 As far I know you have to RenderWorld and Flip to make even text or images appear of buffers. But you can you a blank world, so it doesn't actually render anything, but only populates the buffer with the text. The artifacts look like a non-renderworlded buffer. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
macklebee Posted September 20, 2012 Share Posted September 20, 2012 As far I know you have to RenderWorld and Flip to make even text or images appear of buffers. But you can you a blank world, so it doesn't actually render anything, but only populates the buffer with the text. The artifacts look like a non-renderworlded buffer. No. Thats wrong. If he is using a separate buffer to draw into then using getcolorbuffer to draw that onto his main screen, the only render/flip needed is for the main world drawing. He doesnt need a separate render/flip for the image to appear in the other buffer. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Canardia Posted September 20, 2012 Share Posted September 20, 2012 He will still need a ClearBuffer() or DrawImage(blackrectable) to clean the buffer after initialization, because it's filled with random pixels. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
macklebee Posted September 20, 2012 Share Posted September 20, 2012 yes i suggested clearing the buffer and/or drawing a transparent texture to the buffer before drawing his image already in the posts above. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
tjheldna Posted September 20, 2012 Author Share Posted September 20, 2012 Thanks macklebee and metatron using a blank texture to clear the buffer seems to have worked. I need to do a little more testing though. Many Thanks Quote Link to comment Share on other sites More sharing options...
tjheldna Posted September 21, 2012 Author Share Posted September 21, 2012 Together with Daimour's help and the two of you guys help. I've finally got this issue sorted with no FPS drop at all. I've been on this problem for sooo long , such a relief! 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.