hatfield-c / hop

Repository for "HopTo" game
0 stars 0 forks source link

[HOP-21] Fade shaders won't cause render problems #21

Open hatfield-c opened 4 years ago

hatfield-c commented 4 years ago

The present shaders which "fade" when the camera get close do so by modifying the opacity of object, with the shader type set to "transparent" in the shader graph. This works for for individual transparent objects in a scene full of opaque objects, but given that the majority of the scene should be see-through when the camera gets close, this inevitably causes problems when multiple objects with transparent material stack on top of one another.

hatfield-c commented 4 years ago

A potential solution might involve using alpha masking for opaque objects, where the solid edge between opaque and transparent is blurred via some variation of the Fresnel Effect material.

hatfield-c commented 4 years ago

The Fresnel Effect probably won't work, as it centers itself within the middle of a sphere. However, a similar concept of a sphere of transparency surrounding the player object should apply.