Rick Posted March 2, 2012 Share Posted March 2, 2012 I believe I asked this before but didn't get an answer, or the answer from Lum didn't seem to work. Does anyone know if you can do 2D masking with LE drawing commands? Quote Link to comment Share on other sites More sharing options...
Canardia Posted March 2, 2012 Share Posted March 2, 2012 I tested it, and it worked, you remember the MOD2X trick. Maybe you did the textures wrong, but I could make a demo, since the old demo is on my old PC, and it's not ready yet. 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...
Rick Posted March 2, 2012 Author Share Posted March 2, 2012 Ah bugger. Yeah if you don't have mind showing a really short demo that would be cool. I must have gotten the order wrong or something. I was trying to use pure pink as the mask color. Quote Link to comment Share on other sites More sharing options...
paramecij Posted March 3, 2012 Share Posted March 3, 2012 What do you mean by 2D masks? Do you mean color-keying (not drawing pixels of specific color), or actual grayscale masks (like in photoshop etc) ? What are you trying to do with the masks ? Quote Link to comment Share on other sites More sharing options...
Rick Posted March 3, 2012 Author Share Posted March 3, 2012 I believe it's more like color-keying. I'm specifically trying to create a circle health bar like in diablo. To do so the red health would actually be a rectangle image with the areas that aren't the circle aren't drawn. Quote Link to comment Share on other sites More sharing options...
Canardia Posted March 4, 2012 Share Posted March 4, 2012 Got it to work again: 2docclusion.zip You need to draw to a temporary buffer, which doesn't need to be bigger than your image (64x64 in this demo). Then you draw the occlusion image, which has transparent areas, with BLEND_ALPHA. Then you draw the actual image with BLEND_MOD2X. Then you draw the temporary buffer to your real background buffer. 1 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...
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.