aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-05-17 15:25:42 -0300
committergdkchan <gab.dark.100@gmail.com>2018-05-17 15:25:42 -0300
commitb19c4740823ed8fcebf62bf5741a7614a2ac0aa0 (patch)
tree8cdede3fdb90aa35ffe50c004559b80d4704bea3 /Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs
parent9b9ead94cd2f25a85468ecf91b7898bf34e10825 (diff)
Added more shader instructions, including BFE, BRA (partial), FMNMX, ISCADD, SHL, LD_C, some shader related fixes, added support for texture component selection
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs')
-rw-r--r--Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs
index 9ea25056..8dcfb2bd 100644
--- a/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs
+++ b/Ryujinx.Graphics/Gal/OpenGL/OGLTexture.cs
@@ -51,6 +51,16 @@ namespace Ryujinx.Graphics.Gal.OpenGL
Type,
Texture.Data);
}
+
+ int SwizzleR = (int)OGLEnumConverter.GetTextureSwizzle(Texture.XSource);
+ int SwizzleG = (int)OGLEnumConverter.GetTextureSwizzle(Texture.YSource);
+ int SwizzleB = (int)OGLEnumConverter.GetTextureSwizzle(Texture.ZSource);
+ int SwizzleA = (int)OGLEnumConverter.GetTextureSwizzle(Texture.WSource);
+
+ GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleR, SwizzleR);
+ GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleG, SwizzleG);
+ GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleB, SwizzleB);
+ GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureSwizzleA, SwizzleA);
}
public void Bind(int Index)