Simple 3D Glass

This shader gives a simple glass look to 3D meshes, just adjust the shader parameters to your liking.

Shader code
shader_type spatial;
render_mode specular_schlick_ggx, ambient_light_disabled;

uniform vec4 Color : hint_color;
uniform float Shine = 0.2;
uniform float Roughness = 0.2;

void vertex() {
// Output:0


void fragment() {
// ColorUniform:6
	vec3 n_out6p0 = Color.rgb;
	float n_out6p1 = Color.a;

// ScalarUniform:3
	float n_out3p0 = Shine;

// ScalarUniform:4
	float n_out4p0 = Roughness;

// Output:0
	ALBEDO = n_out6p0;
	ALPHA = n_out6p1;
	METALLIC = n_out3p0;
	ROUGHNESS = n_out4p0;


void light() {
// Output:0

3d, glass, simple, Spatial, Transparent
The shader code and all code snippets in this post are under MIT license and can be used freely. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from SamWise

Simple 3D Metal

2D reflective ice

Related shaders

3D Low Distortion Refraction (Low Poly Glass)

Glass shader

Frosted glass

Notify of

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
3 years ago