Rick Posted February 22, 2010 Share Posted February 22, 2010 1. I try to create the material from code (to try and remove an external mat file dependency) but when I do it, it doesn't seem to have transparent BG. (I apply this to a plane created in the transparent world of the framework. My code mat = CreateMaterial(); SetMaterialKey(mat, "depthtest", "1"); SetMaterialKey(mat, "overlay", "1"); SetMaterialKey(mat, "blend", "alpha"); SetMaterialKey(mat, "zsort", "0"); SetMaterialKey(mat, "castshadows", "0"); SetMaterialKey(mat, "collisiontype", "0"); SetMaterialShader(mat, LoadShader("abstract::mesh_diffuse_billboard.vert","abstract::mesh_diffuse.frag")); Mat File, that when loaded, works perfectly texture0="abstract::nametag.dds" depthtest=1 overlay=1 blend=alpha zsort=0 castshadows=0 collisiontype=0 shader="abstract::mesh_diffuse_billboard.vert","abstract::mesh_diffuse.frag" Note that the texture is just a dummy placeholder as we replace that with a buffer later. So in the mat file above it's really pointless. Quote Link to comment Share on other sites More sharing options...
Masterxilo Posted February 22, 2010 Share Posted February 22, 2010 Yeah, obviously, materials STILL can't be created in completely code. Unless you write to a file and load that later. Old posts on this: http://forum.leadwerks.com/viewtopic.php?p=34375#p34375 http://forum.leadwerks.com/viewtopic.php?f=16&t=4168 ... Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Rick Posted February 22, 2010 Author Share Posted February 22, 2010 Interesting. I mean how hard would this be to get it working? LoadMaterial() obviously already does what is needed. Quote Link to comment Share on other sites More sharing options...
Masterxilo Posted February 22, 2010 Share Posted February 22, 2010 So true... Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Sanctus Posted March 17, 2010 Share Posted March 17, 2010 Hm.. When I tried this I tought I wasn't doing something right. Quote I create the game you play. I create the rulles you will obey. 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.