1

I want to create glass wall with some effect for more realistic look. (little smoked or blur effect). How can I add this effect to my material? (I have only color,opacity and transparency now). Sry if it is a stupid question, I am beginner.

Thx for reactions :)

user2894818
  • 11
  • 1
  • 2

2 Answers2

1

Blurring the framebuffer has nothing to do with refractive glass. Take a look at: http://mrdoob.github.io/three.js/examples/#webgl_materials_shaders_fresnel and http://mrdoob.github.io/three.js/examples/#webgl_materials_cubemap_refraction

and search for "refraction shader" or something like this.

GuyGood
  • 1,377
  • 1
  • 9
  • 12
0

You need to make use of the shaders. Basically for a blur:

  • you render your image into a frame buffer
  • you apply a first horizontal pass on the frame buffer and render into another frame buffer
  • you apply a second vertical pass on the the second fbo back to the original one
  • you need to render the frame buffer on the screen

Take a look on this thread: THREE.js blur the frame buffer

Community
  • 1
  • 1
Flavien Volken
  • 19,196
  • 12
  • 100
  • 133