Skip to content

Commit 4b8b9e6

Browse files
authored
Fix MSAA when using rendering pipelines (#1282)
Brings in changes from BabylonJS/Babylon.js#14292 as part of the package version update. The main fix was a misunderstanding of the `BGFX_TEXTURE_MSAA_SAMPLE` flag in bgfx and how textures are resolved. Thanks to @sebavan for explaining to me how texture resolving works.
1 parent fdfa1f5 commit 4b8b9e6

File tree

3 files changed

+49
-54
lines changed

3 files changed

+49
-54
lines changed

Apps/package-lock.json

Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Apps/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"getNightly": "node scripts/getNightly.js"
77
},
88
"dependencies": {
9-
"babylonjs": "^6.14.2",
10-
"babylonjs-gltf2interface": "^6.14.2",
11-
"babylonjs-gui": "^6.14.2",
12-
"babylonjs-loaders": "^6.14.2",
13-
"babylonjs-materials": "^6.14.2",
9+
"babylonjs": "^6.20.2",
10+
"babylonjs-gltf2interface": "^6.20.2",
11+
"babylonjs-gui": "^6.20.2",
12+
"babylonjs-loaders": "^6.20.2",
13+
"babylonjs-materials": "^6.20.2",
1414
"chai": "^4.3.4",
1515
"jsc-android": "^241213.1.0",
1616
"mocha": "^9.2.2",

Plugins/NativeEngine/Source/NativeEngine.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,12 +1107,7 @@ namespace Babylon
11071107
auto flags = BGFX_TEXTURE_NONE;
11081108
if (renderTarget)
11091109
{
1110-
flags |= BGFX_TEXTURE_RT;
1111-
1112-
if (samples > 1)
1113-
{
1114-
flags |= BGFX_TEXTURE_MSAA_SAMPLE | RenderTargetSamplesToBgfxMsaaFlag(samples);
1115-
}
1110+
flags |= BGFX_TEXTURE_RT | RenderTargetSamplesToBgfxMsaaFlag(samples);
11161111
}
11171112
if (srgb)
11181113
{

0 commit comments

Comments
 (0)