I am using following code to import the .hdr file into the application
let hdrEquirect = new RGBELoader()
.setDataType( THREE.UnsignedByteType)
.setPath( 'textures/' )
.load( 'in.hdr', function ( texture ) {
init();
animate();
} );
And I am using following code for getting environment map from the hdr map
var pmremGenerator = new THREE.PMREMGenerator( renderer );
hdrCubeRenderTarget = pmremGenerator.fromEquirectangular( hdrEquirect );
hdrEquirect.dispose();
pmremGenerator.dispose();
I haven’t use any lights into my scene. Still the sufficient amount of lighting also I got from this hdr itself.
I have imported some glb files into the scene.
I set the material as below for setting light and reflection as needed.
let transparent_glass_material = new THREE.MeshPhysicalMaterial( {
color: 0x000000,
metalness: 0,
roughness: 0,
alphaTest: 0.5,
envMap:hdrCubeRenderTarget.texture,
envMapIntensity: 1,
depthWrite: false,
transmission: 0.5,
opacity: 1,
reflectivity:1,
clearcoat:1,
transparent: true
} );
Now one side of the object is being nice as per my need. But the other side also that reflection has takes place. I need to remove that reflection on one side. How to do that? Thanks in advance