Jump to content

Creating transparent buffers


Raz
 Share

Recommended Posts

Hey there!

Thanks to the kind help of klepto2 I've managed to get rendering to a texture working just fine.

My current issue is that for some reason, even though the texture's format is RGBA, the buffer I'm rendering to doesn't seem to store any alpha values or is not set up to use alpha channels.

I've looked through the flags for CreateBuffer() but haven't found anything useful.

Would be really nice if someone could clarify whether there's any possibility to store alpha values in a buffer as well.

 

Probably related to that, has anyone had the issue where a call to RenderFramework() AFTER rendering a scene, meshes, etc., e.g. to put the FPS info topmost, results in the previously rendered content being obstructed because apparently the buffer's overwritten with a black background color?

 

[EDIT]

Okay, I managed to fix my first issue using SetBlend(). Nevertheless, I'm unable to use RenderFramework() to render debug info topmost. If I add RenderFramework() inside a block of SetBlend(Alpha) and SetBlend(None) after my transparent images, I only get my solid 3D meshes and the debug info, no transparent images. If I add it afterwards, logically I don't get neither meshes, nor images, only the debug info. Only if I add it before the SetBlend() block, e.g. as the first rendering command, I get the debug info and everything else to display, with the issue of the debug info being overlaid by every other element I'm rendering.

 

Greets,

Philipp

Link to comment
Share on other sites

I managed to get transparent buffers somehow by painting the buffer with an alpha value. You can see the complete code in GameLib's AddNameTag() function: http://www.leadwerks.com/wiki/index.php?title=GameLib#AddNameTag

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...