Carbon fiber wrap

Shader code
shader_type spatial;

const float shade = 0.1;
uniform float reflection = 1.0;
uniform float scale_control = 1.0;

void fragment(){
	float scale = scale_control * 50.0;
	
	float y = UV.y * scale;
	float x = UV.x * scale;
	int surface = int( float(int(y)) / (2.0/5.0) +x ) % 2;
	
	ALBEDO = vec3(shade, shade, shade);
	ROUGHNESS = 0.65;
	METALLIC = 0.75;
	
	if(surface == 1){
		NORMALMAP = vec3(sin(UV.x*scale*reflection*0.1), 1.0, 1.0);
	}else{
		NORMALMAP = vec3(cos(UV.y*scale*reflection*0.1), 1.0, 1.0);
	}
}
Tags
car, carbonfiber, vinyl, wrap
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 Matthias

Matrix style 3D hologram

Brick Wall

spinning propeller blade

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments