Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. shader_type spatial;
  2. render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx, world_vertex_coords;
  3. uniform vec4 albedo : hint_color;
  4. uniform sampler2D texture_albedo : hint_albedo;
  5. uniform float roughness : hint_range(0,1);
  6. uniform float point_size : hint_range(0,128);
  7. uniform sampler2D texture_emission : hint_black_albedo;
  8. uniform vec4 emission : hint_color;
  9. uniform float emission_energy;
  10. uniform vec3 uv1_scale;
  11. uniform vec3 uv1_offset;
  12. uniform vec3 uv2_scale;
  13. uniform vec3 uv2_offset;
  14.  
  15. varying vec3 vxpos;
  16.  
  17. void vertex() {
  18.     UV=UV*uv1_scale.xy+uv1_offset.xy;
  19.     vxpos = VERTEX.xyz;
  20. }
  21.  
  22.  
  23. void fragment() {
  24.     vec2 base_uv = UV;
  25.     vec4 albedo_tex = texture(texture_albedo,base_uv);
  26.     ALBEDO = albedo.rgb * albedo_tex.rgb;
  27.  
  28.     vec3 emission_tex = texture(texture_emission,base_uv).rgb;
  29.     EMISSION = (emission.rgb+emission_tex)*emission_energy;
  30.     ALPHA = distance(vxpos, vec3(5.0, 0.0, 5.0));
  31.    
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement