Andy Gilbert Posted April 2, 2013 Share Posted April 2, 2013 Ive had a quick look through the bugs but cant find a report for this (could have missed it though), there is also a possibility this isnt a bug but i cant figure a way around it. If i have a model and mat with an alpha, the "alpha" part seems to only let CSG stuff though and not other models through, if i move the camera around sometimes they appear other times they dont. Thanks Andy The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Josh Posted April 2, 2013 Share Posted April 2, 2013 There is a z-sorting option in the material settings. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Andy Gilbert Posted April 2, 2013 Author Share Posted April 2, 2013 Im aware of that, and rightly so that does sort the transparency, it doesnt however fix the bug mentioned above. Andy The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Josh Posted April 2, 2013 Share Posted April 2, 2013 I need an example so I can recreate this problem. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Andy Gilbert Posted April 2, 2013 Author Share Posted April 2, 2013 Okay ill try put one together, what do you need exactly? Here is a screen shot aswell. Andy The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Josh Posted April 2, 2013 Share Posted April 2, 2013 So you have multiple layers of alpha blending? Set the depth mask to 0. Beyond that, I can't tell without an actual example I can run. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Andy Gilbert Posted April 2, 2013 Author Share Posted April 2, 2013 Set the depth mask to 0. Beyond that, I can't tell without an actual example I can run. Can this be done in the editor? I asked previously what actual files do you need, map, models, whole project? Andy The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Josh Posted April 2, 2013 Share Posted April 2, 2013 I need all the files necessary to actually produce the problem on my own computer. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Andy Gilbert Posted April 2, 2013 Author Share Posted April 2, 2013 Files sent via PM. Andy The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d Link to comment Share on other sites More sharing options...
Josh Posted April 2, 2013 Share Posted April 2, 2013 The problem is you have multiple layers of alpha blending within one surface, and z-sorting does not work on a per-polygon basis. We normally use alpha masking for vegetation, not alpha blending. It's faster to render. It avoid z-sorting issues like this. Disable z-sorting in your material. Set the blend mode to solid. You then need a shader that does a discard if the alpha value is below 0.5. You can copy the shader you are using, then add this in the fragment shader source: //Modulate blend with diffuse map outcolor *= texture2D(texture0,ex_texcoords0); if (outcolor.a<0.5) discard; // ADD THIS LINE I will add some more shaders into the official SDK soon, including one for this purpose. Leadwerks 2 had an alpha mask setting, but we no longer support this because the functionality was dropped in OpenGL 3.2+. It's supposed to be done with a shader, now, and we want to be future proof. 1 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts