Glass Shader

The new shader by default allows you to set the index of refraction, this combines nicely with roughness at very low rendering budget cost.
attribute 'class' not allowedattribute 'class' not allowedattribute 'contenteditable' not allowedattribute 'blocktype' not allowed
Since the Glass shader is available on the base addon, it can be used as a template to make your own glass effects.
attribute 'class' not allowed

attribute 'class' not allowed
We have a sights shader with thin film diffraction that we will use in our weapons that derives from the shader.attribute 'class' not allowed
attribute 'class' not allowedattribute 'contenteditable' not allowedattribute 'blocktype' not allowed
Real glass absorbs through some of the light and casts a shadow, usually games don't simulate that phenomenon but that's silly.
attribute 'class' not allowed

attribute 'class' not allowed
attribute 'class' not allowedattribute 'class' not allowed
We approximate diffraction with the BRDF, refraction index and other material properties of the glass, giving it a pretty convincing effect.attribute 'class' not allowed
attribute 'class' not allowedattribute 'class' not allowedattribute 'contenteditable' not allowedattribute 'blocktype' not allowed
attribute 'class' not allowedattribute 'contenteditable' not allowedattribute 'blocktype' not allowed

In real life, the more rough a glass surface is, the harder it gets to see what's behind it, photons scatter through all sorts of directions making what's refracted seem blurry.
attribute 'class' not allowedattribute 'contenteditable' not allowedattribute 'blocktype' not allowedattribute 'title' not allowedattribute 'data-image-style' not allowed

We try to approximate similar to how it'd be in real life, grazing angles would have higher index of incidence of the scattered ray, the effect is very cheap regardless of the blur level you have.
attribute 'class' not allowedattribute 'class' not allowedattribute 'contenteditable' not allowedattribute 'blocktype' not allowed
When we started authoring shaders we were experimenting until we found best practices that work for everyone, we have a good framework for that now that we can work towards the aim of the game's release.

We're aiming to rework all our built-in shaders to have a more unified pipeline, starting with the new glass shader, rewritten from scratch.
attribute 'class' not allowedattribute 'class' not allowedattribute 'contenteditable' not allowedattribute 'blocktype' not allowed
Glass is much simpler to use and looks a ton better, taking proper physically based energy conservation into account, and you can layer other materials on top of it.

Comments