I get a couple of errors when i'm calling SSGI in the latest version of the repo. I built this myself since npm was a little behind. I also tested this on the older npm version and i get the same errors. I'm using a couple gltf's and a boxGeometry. I thought this had to do with uv's but it seems boxGeometry has accurate uv's so that can't be the issue. And my GLTF's rendered fine in the previous version but now they don't render at all with the updated build.
THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false
Material Name: undefined
Material Type: MeshPhysicalMaterial
Program Info Log: Vertex shader is not compiled.
VERTEX
ERROR: 0:400: 'uvundefined' : undeclared identifier
ERROR: 0:400: 'constructor' : not enough data provided for construction
395: void main() {
396: #if defined( USE_UV ) || defined( USE_ANISOTROPY )
397: vUv = vec3( uv, 1 ).xy;
398: #endif
399: #ifdef USE_MAP
> 400: vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
401: #endif
402: #ifdef USE_ALPHAMAP
403: vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
404: #endif
405: #ifdef USE_LIGHTMAP
406: vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
I tried these configurations
Latest Github Repo build:
<postEffectsComposer ref={composerRef} args={[gl]}>
<postRenderPass args={[scene, camera]} attach={(parent, self) => parent.addPass(self)} />
<velocityDepthNormalPass
ref={velocityDepthNormalPassRef}
args={[scene, camera]}
attach={(parent, self) => parent.addPass(self)}
/>
{velocityDepthNormalPassRef.current && composerRef.current && (
<postEffectPass
args={[camera, new SSGIEffect(composerRef.current, scene, camera, velocityDepthNormalPassRef.current)]}
attach={(parent, self) => parent.addPass(self)}
/>
)}
Previous NPM install 1.1.2:
<postEffectsComposer ref={composerRef} args={[gl]}>
<postRenderPass args={[scene, camera]} attach={(parent, self) => parent.addPass(self)} />
<velocityDepthNormalPass
ref={velocityDepthNormalPassRef}
args={[scene, camera]}
attach={(parent, self) => parent.addPass(self)}
/>
{velocityDepthNormalPassRef.current && (
<postEffectPass
args={[camera, new SSGIEffect(scene, camera, velocityDepthNormalPassRef.current)]}
attach={(parent, self) => parent.addPass(self)}
/>
)}
)
One thing i want to note is that i'm able to successfully utilize the following:
{velocityDepthNormalPassRef.current && composerRef.current && (
<postEffectPass
args={[
camera,
// new HBAOEffect(composerRef.current, camera, scene),
new MotionBlurEffect(velocityDepthNormalPassRef.current),
new SharpnessEffect(0.5),
// new TRAAEffect(scene, camera, velocityDepthNormalPassRef.current),
(() => {
const effect = new SMAAEffect({
preset: SMAAPreset.MEDIUM,
edgeDetectionMode: EdgeDetectionMode.COLOR,
predicationMode: PredicationMode.DEPTH,
});
if (effect.edgeDetectionMaterial) {
const edgeDetectionMaterial = effect.edgeDetectionMaterial;
edgeDetectionMaterial.edgeDetectionThreshold = 0.02;
edgeDetectionMaterial.predicationThreshold = 0.002;
edgeDetectionMaterial.predicationScale = 1;
}
return effect;
})(),
]}
attach={(parent, self) => {
parent.addPass(self);
return () => {
};
}}
/>
)}
specifically MotionBlur and SharpnessEffect
I get a couple of errors when i'm calling SSGI in the latest version of the repo. I built this myself since npm was a little behind. I also tested this on the older npm version and i get the same errors. I'm using a couple gltf's and a boxGeometry. I thought this had to do with uv's but it seems boxGeometry has accurate uv's so that can't be the issue. And my GLTF's rendered fine in the previous version but now they don't render at all with the updated build.
I tried these configurations
Latest Github Repo build:
Previous NPM install 1.1.2:
One thing i want to note is that i'm able to successfully utilize the following:
specifically MotionBlur and SharpnessEffect