Jakeukalane

Weak bridge fragmentarium parameters

Jan 2nd, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. // Output generated from file: ~/Programas/Ejecutables/Fragmentarium/Examples/Kali's Creations/Kalibox.frag
  2. // Created: sáb dic 28 03:01:41 2013
  3. #info Mandelbox Distance Estimator (Rrrola's version).
  4. #define providesInit
  5. #include "DE-Raytracer-v0.9.1.frag"
  6. #include "MathUtils.frag"
  7. #group Mandelbox
  8.  
  9. uniform int Iterations; slider[0,17,300]
  10. uniform int ColorIterations; slider[0,3,300]
  11. uniform float MinRad2; slider[0,0.25,2.0]
  12.  
  13. uniform float Scale; slider[-3.0,1.3,3.0]
  14. uniform vec3 Trans; slider[(-5,-5,-5),(0.5,0.5,0.5),(5,5,5)]
  15. uniform vec3 Julia; slider[(-5,-5,-5),(-1,-1,-1),(0,0,0)]
  16. vec4 scale = vec4(Scale, Scale, Scale, abs(Scale)) / MinRad2;
  17.  
  18. uniform vec3 RotVector; slider[(0,0,0),(1,1,1),(1,1,1)]
  19. uniform float RotAngle; slider[0.00,0,180]
  20.  
  21. mat3 rot;
  22.  
  23. void init() {
  24. rot = rotationMatrix3(normalize(RotVector), RotAngle);
  25. }
  26.  
  27. float absScalem1 = abs(Scale - 1.0);
  28. float AbsScaleRaisedTo1mIters = pow(abs(Scale), float(1-Iterations));
  29.  
  30.  
  31. float DE(vec3 pos) {
  32. vec4 p = vec4(pos,1), p0 = vec4(Julia,1); // p.w is the distance estimate
  33.  
  34. for (int i=0; i<Iterations; i++) {
  35. p.xyz*=rot;
  36. p.xyz=abs(p.xyz)+Trans;
  37. float r2 = dot(p.xyz, p.xyz);
  38. if (i<ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(p.xyz,r2)));
  39. p *= clamp(max(MinRad2/r2, MinRad2), 0.0, 1.0); // dp3,div,max.sat,mul
  40. p = p*scale + p0;
  41.  
  42. }
  43. return ((length(p.xyz) - absScalem1) / p.w - AbsScaleRaisedTo1mIters);
  44. }
  45.  
  46.  
  47. #preset default
  48. FOV = 1
  49. Eye = -1.08,1.215,1.1662
  50. Target = 8.3841,4.15869,-7.67443
  51. Up = 0.30148,0.802376,0.515076
  52. AntiAlias = 1
  53. Detail = -2.66371
  54. DetailAO = -1.35716
  55. FudgeFactor = 0.68224
  56. MaxRaySteps = 522
  57. BoundingSphere = 12
  58. Dither = 0
  59. NormalBackStep = 1
  60. AO = 0,0,0,1
  61. Specular = 4
  62. SpecularExp = 1.042
  63. SpotLight = 1,1,1,0.48913
  64. SpotLightDir = 0.61904,-0.06666
  65. CamLight = 1,1,1,0.60216
  66. CamLightMin = 0
  67. Glow = 1,1,1,0.01754
  68. GlowMax = 20
  69. Fog = 0.64814
  70. HardShadow = 0
  71. ShadowSoft = 2
  72. Reflection = 0
  73. BaseColor = 1,1,1
  74. OrbitStrength = 0.63636
  75. X = 0.5,0.6,0.6,0.16536
  76. Y = 1,0.6,0,0.4
  77. Z = 0.8,0.78,1,0.07084
  78. R = 0.4,0.7,1,0.03174
  79. BackgroundColor = 0.239216,0.239216,0.239216
  80. GradientBackground = 0.7143
  81. CycleColors = false
  82. Cycles = 9.51206
  83. EnableFloor = false
  84. FloorNormal = 0,0,1
  85. FloorHeight = 0
  86. FloorColor = 1,1,1
  87. Iterations = 15
  88. ColorIterations = 2
  89. MinRad2 = 0.3492
  90. Scale = 2.04348
  91. Trans = -0.3165,-1.8613,0.0365
  92. Julia = 0,-5,-0.45775
  93. RotVector = 0,1,0
  94. RotAngle = 10.413
  95. #endpreset
Advertisement
Add Comment
Please, Sign In to add comment