Matcap + NormalMap

Shader code
shader_type spatial;
render_mode unshaded;

uniform sampler2D matcap: hint_albedo;
uniform sampler2D normal_map: hint_normal;

void fragment(){
	vec4 normal = (texture(normal_map, UV) * 2.0 - 1.0);
	vec3 normalV = mat3(TANGENT, BINORMAL, NORMAL) * normal.xyz;
	vec2 uv = normalV.xy * vec2(0.49, -0.49) + 0.5;
	ALBEDO = texture(matcap, uv).rgb;
}
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 Menrush

Matcap + NormalMap + Triplanar

Related shaders

Matcap + NormalMap + Triplanar

View-MatCap

XR-Safe Matcap

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments