Advertisement
Guest User

Diamond Finder *MINECRAFT GLSL*

a guest
May 24th, 2011
3,436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. // Shader that shows diamond ore locations by Pazaz.
  2. // This is a modified bash.vsh, The original one was a mob spawner by daxnitro.
  3. // Becareful when going for diamond ore... Some might be under lava.. Never dig
  4. // down... Trust me. I'm a doctor.
  5.  
  6. #version 120 // This will always get moved to the top of the code in pre-processing.
  7.  
  8. attribute vec4 mc_Entity;
  9.  
  10. #ifdef _ENABLE_GL_TEXTURE_2D
  11. centroid varying vec4 texCoord;
  12. #endif
  13.  
  14. varying vec4 vertColor;
  15.  
  16. void main() {
  17. gl_Position = ftransform();
  18.  
  19. #ifdef _ENABLE_GL_TEXTURE_2D
  20. texCoord = gl_MultiTexCoord0;
  21. #endif
  22. // The line under this big A** comment is where the magic happens, It works by BLOCK ID's. // 52 Was Mob Spawner, 56 is the Diamond Ore. Change it up if you want, You could have your // whole house glowing red depending on what you made it out of, And what you changed the
  23. // number below to..
  24. if (mc_Entity.x == 56.0) {
  25. // Diamond Ore
  26. gl_Position.z = 0.0;
  27. vertColor = vec4(1.0, 0.0, 0.0, 1.0);
  28. } else {
  29. vertColor = gl_Color;
  30. }
  31.  
  32. gl_FogFragCoord = gl_Position.z;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement