Fix texture channel for psvita

This commit is contained in:
sin365 2024-08-16 10:39:51 +08:00
parent 2d701d414d
commit c30df0b284
2 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,8 @@ namespace AxibugEmuOnline.Client
{ {
if (wrapTex == null) if (wrapTex == null)
{ {
wrapTex = new Texture2D(272, 240, TextureFormat.BGRA32, false); //wrapTex = new Texture2D(272, 240, TextureFormat.BGRA32, false);
wrapTex = new Texture2D(272, 240, TextureFormat.RGBA32, false);
wrapTex.filterMode = FilterMode.Point; wrapTex.filterMode = FilterMode.Point;
wrapTexBuffer = screenData; wrapTexBuffer = screenData;
@ -36,7 +37,8 @@ namespace AxibugEmuOnline.Client
TexBufferSize = wrapTexBuffer.Length * 4; TexBufferSize = wrapTexBuffer.Length * 4;
var palRaw = PaletteDefine.m_cnPalette[0]; var palRaw = PaletteDefine.m_cnPalette[0];
pPal = new Texture2D(palRaw.Length, 1, TextureFormat.BGRA32, 1, true); //pPal = new Texture2D(palRaw.Length, 1, TextureFormat.BGRA32, 1, true);
pPal = new Texture2D(palRaw.Length, 1, TextureFormat.RGBA32, false);
pPal.filterMode = FilterMode.Point; pPal.filterMode = FilterMode.Point;
for (int i = 0; i < palRaw.Length; i++) for (int i = 0; i < palRaw.Length; i++)
{ {

View File

@ -109,7 +109,8 @@
half4 color = tex2D(_MainTex,mapUV); half4 color = tex2D(_MainTex,mapUV);
float rawIndex = color.b; //float rawIndex = color.b;
float rawIndex = color.r;
color = tex2D(_PalTex,float2(rawIndex,0.5)); color = tex2D(_PalTex,float2(rawIndex,0.5));