Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // NOTE: Shader automatically converted from Godot Engine 3.4.stable's SpatialMaterial.
- shader_type spatial;
- render_mode blend_mix,depth_draw_opaque,cull_disabled,diffuse_burley,specular_schlick_ggx;
- uniform vec4 albedo : hint_color;
- uniform sampler2D texture_albedo : hint_albedo;
- uniform float specular;
- uniform float metallic;
- uniform float alpha_scissor_threshold;
- uniform float roughness : hint_range(0,1);
- uniform float point_size : hint_range(0,128);
- uniform sampler2D texture_normal : hint_normal;
- uniform float normal_scale : hint_range(-16,16);
- uniform vec2 uv1_scale;
- uniform vec2 uv1_offset;
- uniform vec2 uv2_scale;
- uniform vec2 uv2_offset;
- uniform vec3 emission = vec3(0,0,0);
- uniform float Albedo_on_off = 0.0;
- uniform float texture_1_on = 0;
- uniform float texture_2_on = 1;
- uniform float alpha_1_on = 1;
- uniform float alpha_2_on = 0;
- void vertex() {
- UV=UV*uv1_scale.xy+uv1_offset.xy;
- }
- void fragment() {
- vec2 base_uv = UV * uv1_scale + uv1_offset;
- vec2 base_uv2 = UV2 * uv2_scale + uv2_offset;
- vec4 albedo_tex = texture(texture_albedo,base_uv);
- vec4 albedo_tex2 = texture(texture_albedo,base_uv2);
- albedo_tex *= COLOR;
- ALBEDO = (albedo.rgb * albedo_tex.rgb * texture_1_on) + (albedo.rgb * albedo_tex2.rgb * texture_2_on) ;
- METALLIC = metallic;
- ROUGHNESS = roughness;
- SPECULAR = specular;
- NORMALMAP = texture(texture_normal,base_uv).rgb;
- NORMALMAP_DEPTH = normal_scale;
- ALPHA =(albedo.a * albedo_tex.a* alpha_1_on) + (albedo.a * albedo_tex2.a * alpha_2_on);
- ALPHA_SCISSOR=alpha_scissor_threshold;
- EMISSION = emission + (ALBEDO * Albedo_on_off);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement