Project-Summer-Island icon indicating copy to clipboard operation
Project-Summer-Island copied to clipboard

Find something to emulate refraction on glass

Open sunkper opened this issue 5 years ago • 2 comments

Due to the limitation of current Godot renderer, transparent materials behind objects with refraction are not visible. Now I have to remove refraction from glasses... https://twitter.com/SunkPer/status/1228087270281887744

Glasses without refraction feels very flat. I have to find something to emulate the "feeling" of refraction.

Possibly..

  • Normal or roughness, or combination of both
  • Depth?

Or maybe, reversely, remove transparency from sea face. Some clever texturing? Interior mapping shader???

sunkper avatar Feb 15 '20 16:02 sunkper

Possible workaround: Set water shader opaque when it's viewed through the glasses. Water doesn't need to be transparent unless camera is looking at it closely.

How?:

  • Set it opaque if player or camera is inside the house. Possibly using anim? Shader params?
  • Cast rays and check if the sea is viewed through the glasses (convoluted)

sunkper avatar Feb 18 '20 09:02 sunkper

Decided to just live with it for this project.

sunkper avatar Apr 20 '20 16:04 sunkper