Hi there,
Do you know any examples of how to implement the “roughness” property on a shaderMaterial similar to this example? https://threejs.org/examples/webgl_materials_envmaps_hdr.html
Am I correct into looking stuff like this?
Thanks,
Nick
Hi there,
Do you know any examples of how to implement the “roughness” property on a shaderMaterial similar to this example? https://threejs.org/examples/webgl_materials_envmaps_hdr.html
Am I correct into looking stuff like this?
Thanks,
Nick
I’m afraid it’s not 100% clear what you want to do. Do you want to use roughness/metalness material parameters for a custom shader material? I mean an instance of THREE.ShaderMaterial
or THREE.RawShaderMaterial
?
Yes, I’m trying to write my own THREE.ShaderMaterial and I want to add a similar “roughness” parameter. Meanwhile I realised that all the related JS files (HDRCubeTextureLoader.js, PMREMCubeUVPacker.js, PMREMGenerator.js, RGBELoader.js) require the threejs module, so I just detached them (is that a bad practice btw?).
In case anyone interested, I just found this example, so I think I’ll manage to figure it out from here.
https://codepen.io/sentimetalboy/pen/wzQVKp?editors=1010
For anyone still trying to implement cubemap textures for envmaps in shadermaterials here is an updated version of the codepen above, since you no longer need to use the extension for LOD. https://codepen.io/lablr/pen/rNpVLeK