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

}
Tags
3d, glass, simple, Spatial, Transparent

More from SamWise

2D reflective ice

Simple 3D Metal

Related shaders

Procedural Stained-Glass Shader

Simple 2d transition

Simple 2D dissolve

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.
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Ewobee
Ewobee
6 months ago

ok