Hi folks!
It looks like the PBR material has, at least 5.0.0-beta.4, a problem with prepass integration and velocity buffer.
In this playground (https://playground.babylonjs.com/#E5YGEL#2 ) the motion blur post-process works well with PBR and cloned meshes. Once we add instances, the shader throws an error:
VERTEX SHADER ERROR: 'previousWorld' : undeclared identifier
Using Standard Material, everything works well. My intuition is that PBR is missing some #ifdef or has too much but I prefer to let PBR masters confirm that @sebavan
Playground with PBR and instances (that fails): https://playground.babylonjs.com/#E5YGEL#21
Playground with STD and instances (that works): https://playground.babylonjs.com/#E5YGEL#22
PBR is life, thanks for your help!
This PR will fix the problem:
BabylonJS:master
← BabylonJS:Popov72-patch-1
opened 11:20AM - 17 Jan 22 UTC
See https://forum.babylonjs.com/t/problem-with-motion-blur-and-prepass-implement… ation-in-pbr/26819
1 Like
You are awesome, I’ll tag you as PBR master as well
Thanks a lot!
1 Like
sebavan
January 17, 2022, 9:38pm
#4
He is the true master now !!!
1 Like
Hey @Evgeni_Popov !
I just tested and it appears the fix you have shared is not enough
The error still appears in 5.0.0-beta.6 and it looks like the PR has been merge before beta.6:
react_devtools_backend.js:4061 BJS - [13:44:10]: Offending line [334] in vertex code: vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0);
react_devtools_backend.js:4061 BJS - [13:44:10]: Error: VERTEX SHADER ERROR: 0:334: 'previousWorld' : undeclared identifier
The playgrounds I shared are still valid as repro case.
Sorry for the inconvenience !
Thanks, it seems the bug was also in other locations (I don’t know how I missed that the first time…):
BabylonJS:master
← Popov72:misc-updates
opened 01:57PM - 07 Feb 22 UTC
2 Likes