Low Poly Fresnel

Color increases based on viewing angle of surface.
Can be used as next pass of another material (shown in the white ball example) (for some reason the effect only works where the first pass mesh is illuminated if not set to unshaded (shown in next image), this isn’t intended, pls comment below if anyone knows how to resolve this)


(tested in 4.2)

Shader code
shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_disabled,diffuse_burley,specular_schlick_ggx,unshaded;
uniform float inner_alpha = 0.0;
uniform vec4 albedo_f : source_color = vec4(1.0, 0.0, 0.0, 1.0);

uniform float Strength = 2.20;

void fragment() {
	//This was partly converted from a visual shader:
	// VectorOp:17
	vec3 n_out17p0 = NORMAL * VIEW;
	// VectorDecompose:18
	float n_out18p2 = n_out17p0.z;
	// FloatParameter:21
	float n_out21p0 = Strength;
	// FloatOp:20
	float n_out20p0 = n_out18p2 * n_out21p0;
	// FloatFunc:19
	float n_out19p0 = 1.0 - n_out20p0;
	// FloatOp:23
	float n_out23p0 = min(max(n_out19p0, 0.0),1.0);
	ALBEDO = albedo_f.rgb;
	ALPHA = min(inner_alpha+n_out23p0,1.0);
fresnel, Low Poly
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 KnightNine

The Pain Shader

3D Low Distortion Refraction (Low Poly Glass)

Related shaders

3D Low Distortion Refraction (Low Poly Glass)

Low poly water

Quick Example Fresnel Outline

Notify of

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
4 months ago

Works great in 3.5