From 42d191c73165a179a70fafe6df78c9178f85461c Mon Sep 17 00:00:00 2001 From: SoapyMan Date: Mon, 4 May 2026 22:57:46 +0300 Subject: [PATCH 1/2] - premake: emscripten build_web folder to not conflict with linux .o --- src_rebuild/premake5.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src_rebuild/premake5.lua b/src_rebuild/premake5.lua index 82a98bf8..bad766a3 100644 --- a/src_rebuild/premake5.lua +++ b/src_rebuild/premake5.lua @@ -37,7 +37,11 @@ end workspace "REDRIVER2" if _ACTION ~= "vscode" then - location "build" + if os.target() == "emscripten" then + location "build_web" + else + location "build" + end else -- setup VSCode generator settings vscode_makefile "build" From 43e99517c4f8da449d40d305e35da85ff6474c9d Mon Sep 17 00:00:00 2001 From: SoapyMan Date: Mon, 4 May 2026 22:58:31 +0300 Subject: [PATCH 2/2] #213 fix broken colors and color acne issues on certain HW/drivers and OpenGL ES --- src_rebuild/PsyCross | 2 +- src_rebuild/utils/video_source/VideoPlayer.cpp | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src_rebuild/PsyCross b/src_rebuild/PsyCross index 9a4811d5..980c3b35 160000 --- a/src_rebuild/PsyCross +++ b/src_rebuild/PsyCross @@ -1 +1 @@ -Subproject commit 9a4811d55d8111cdb902a3bb20c744d8050725f7 +Subproject commit 980c3b357813c1e1df8581cd9dbadb6eb767b76d diff --git a/src_rebuild/utils/video_source/VideoPlayer.cpp b/src_rebuild/utils/video_source/VideoPlayer.cpp index 139c49e9..e66519fa 100644 --- a/src_rebuild/utils/video_source/VideoPlayer.cpp +++ b/src_rebuild/utils/video_source/VideoPlayer.cpp @@ -253,6 +253,7 @@ const char* fmv_shader = TextureID g_FMVTexture = 0; ShaderID g_FMVShader = 0; +GLuint g_FMVTextureLoc = 0; #define DECODE_BUFFER_ALLOC (3840 * 2160 * 3) // RGB in 4K frame @@ -267,6 +268,7 @@ void FMVPlayerInitGL() #if defined(RENDERER_OGL) || defined(RENDERER_OGLES) glGenTextures(1, &g_FMVTexture); + glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, g_FMVTexture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); @@ -278,7 +280,8 @@ void FMVPlayerInitGL() if(!g_FMVShader) { - g_FMVShader = GR_Shader_Compile(fmv_shader); + g_FMVShader = GR_Shader_Compile(fmv_shader, false); + g_FMVTextureLoc = glGetUniformLocation(g_FMVShader, "s_texture"); } #endif } @@ -447,13 +450,13 @@ void DrawFrame(ReadAVI::stream_format_t& stream_format, int frame_number, int cr GR_Clear(0, 0, windowWidth, windowHeight, 0, 0, 0); - glBindTexture(GL_TEXTURE_2D, g_FMVTexture); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, image_w, image_h, 0, GL_RGB, GL_UNSIGNED_BYTE, g_FMVDecodedImageBuffer); - glBindTexture(GL_TEXTURE_2D, 0); - GR_SetShader(g_FMVShader); GR_SetTexture(g_FMVTexture, (TexFormat)-1); + glUniform1i(g_FMVTextureLoc, 0); + glBindTexture(GL_TEXTURE_2D, g_FMVTexture); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, image_w, image_h, 0, GL_RGB, GL_UNSIGNED_BYTE, g_FMVDecodedImageBuffer); + GR_SetScissorState(0); GR_EnableDepth(0); GR_SetStencilMode(0);