Toon glass

Simple toon shader for glass materials such as windows.

You can use any 2D image as the reflection. I’ve attached the one I used as the screenshot above.

Shader code
shader_type spatial;

uniform sampler2D glass_texture;

void fragment() {
    vec4 glass_color = texture(glass_texture, SCREEN_UV);
    ALBEDO = glass_color.rgb;
}
Tags
glass
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from babylon

Yakuza-style radial drag shader

wibbly wobbly

Related shaders

Improved frosted glass

Frosted Glass

Raindrops glass

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments