pir.shader 602 B

12345678910111213141516171819202122232425
  1. shader_type spatial;
  2. render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_disabled;
  3. uniform sampler2D tx_x : hint_albedo;
  4. uniform sampler2D to_o : hint_albedo;
  5. varying vec3 ocol;
  6. void vertex() {
  7. COLOR=vec4(INSTANCE_CUSTOM.brg*vec3(1.,0.5,0.5),1.);
  8. ocol=INSTANCE_CUSTOM.rgb;
  9. }
  10. void fragment() {
  11. vec2 tuv = UV;
  12. float baa=(length(VERTEX)-3.);
  13. baa=1.-clamp(baa,0.,1.);
  14. vec3 col = pow(texture(tx_x,tuv).rgb*ocol,vec3(2.));
  15. vec3 col2 = texture(to_o,tuv).rgb;
  16. ALBEDO = col;
  17. METALLIC = 0.;
  18. ROUGHNESS = 1.;
  19. SPECULAR = 0.5;
  20. EMISSION = pow(col2*COLOR.rgb*baa,vec3(2.))+col;
  21. }