Skip to content

Commit

Permalink
Fix build & keep textures as RGBA (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Jul 12, 2022
1 parent 3034c63 commit 788244a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Bridge~/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@livekit/livekit-unity",
"version": "1.2.1",
"version": "1.2.2",
"description": "LiveKit Unity Bridge for WebGL",
"main": "./dist/index.js",
"source": "./src/index.ts",
Expand All @@ -20,7 +20,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"livekit-client": "^1.2.1",
"livekit-client": "^1.2.2",
"typed-emitter": "^2.1.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions Bridge~/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,10 @@ kind-of@^6.0.2:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==

livekit-client@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-1.2.1.tgz#20a7064bad12880c5fbf48503a48eaf51a837693"
integrity sha512-eegFf/phgk99NoFjGSPiwYSGCz/GRxrz1cQ47rcnRlOaE6SuKMo2Og7PKVGjP7Ll8aBT8WlvRnYj66o+WgNJBA==
livekit-client@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-1.2.2.tgz#72d2330b35f0beb902deec98b242fa4872cd0db2"
integrity sha512-BHtVwR6eFewzLti4J3zzP+ZM24Tjsy4eVkRjkNwFISM5MPH2nyTt6nM2wowhP0QEW74fBzc66noBToHj5i2Oxw==
dependencies:
async-await-queue "^1.2.1"
events "^3.3.0"
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Plugins/livekit-bridge.jslib
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ var NativeLib = {

// Flip Y
GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, true);
GLctx.texImage2D(GLctx.TEXTURE_2D, 0, GLctx.SRGB8, GLctx.SRGB8, GLctx.UNSIGNED_BYTE, video);
GLctx.texImage2D(GLctx.TEXTURE_2D, 0, GLctx.RGBA, GLctx.RGBA, GLctx.UNSIGNED_BYTE, video);
GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, false);

GLctx.texParameteri(GLctx.TEXTURE_2D, GLctx.TEXTURE_MAG_FILTER, GLctx.LINEAR);
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Plugins/livekit-client.jspre

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Runtime/Scripts/Internal/HTMLVideoElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void SetupTexture()
if (Texture != null)
Object.Destroy(Texture);

Texture = Texture2D.CreateExternalTexture(VideoWidth, VideoHeight, TextureFormat.RGB24, false, true, (IntPtr) m_TextureId);
Texture = Texture2D.CreateExternalTexture(VideoWidth, VideoHeight, TextureFormat.RGBA32, false, true, (IntPtr) m_TextureId);
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "io.livekit.unity",
"version": "1.2.1",
"version": "1.2.2",
"displayName": "LiveKit WebGL SDK",
"description": "LiveKit Unity Bridge for WebGL",
"unity": "2021.3",
Expand Down

0 comments on commit 788244a

Please sign in to comment.