mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-06 10:54:54 +00:00
ModelRenderer - Tried fixing alpha rendering issues
This commit is contained in:
@@ -208,11 +208,18 @@ namespace PckStudio.Rendering
|
||||
|
||||
GL.Enable(EnableCap.Texture2D); // Enable textures
|
||||
|
||||
GL.Enable(EnableCap.Blend);
|
||||
GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
|
||||
|
||||
GL.Enable(EnableCap.AlphaTest); // Enable transparent
|
||||
GL.AlphaFunc(AlphaFunction.Greater, 0.0f);
|
||||
GL.AlphaFunc(AlphaFunction.Greater, 0.01f);
|
||||
|
||||
GL.Enable(EnableCap.Blend);
|
||||
|
||||
// Emissive
|
||||
//GL.BlendFuncSeparate(BlendingFactorSrc.One, BlendingFactorDest.SrcColor, BlendingFactorSrc.One, BlendingFactorDest.One);
|
||||
GL.BlendFunc(BlendingFactor.One, BlendingFactor.Zero);
|
||||
|
||||
// Additive
|
||||
// GL.BlendFunc(BlendingFactor.One, BlendingFactor.One);
|
||||
|
||||
GL.DepthFunc(DepthFunction.Lequal);
|
||||
|
||||
ShaderProgram shader = GetShader("CubeShader");
|
||||
@@ -228,6 +235,8 @@ namespace PckStudio.Rendering
|
||||
}
|
||||
_modelRenderTexture.Unbind();
|
||||
|
||||
GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
|
||||
|
||||
if (!_highlightingInfo.IsEmpty)
|
||||
{
|
||||
Matrix4 highlightMatrix = Matrix4.Identity;
|
||||
|
||||
Reference in New Issue
Block a user