When creating SSR, setting the textureType to BABYLON.Constants.TEXTURETYPE_HALF_FLOAT mode affects the skybox effect.
This texture type must be used, how should I solve this problem?
The problem comes from the attenuateFacingCamera=true
parameter. It also exists when the texture type is “unsigned byte”, but is less visible.
You’ll see it better if you enable SSR debugging:
The large sphere is due to reflected rays coming towards the camera and being rejected because of attenuateFacingCamera=true
(see this section of the doc for more information).
Setting attenuateFacingCamera=false
therefore solves the problem. However, I would advise using a standard material for the skybox if possible. This would be computationally lighter (standard materials are more GPU friendly than PBR materials), and you could easily disable SSR by setting specularColor = (0,0,0), which means you could keep attenuateFacingCamera=true
if you wished: