Comprehensive.materialtype 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. {
  2. "description": "This material tests as many material system features as possible in one place. It splits an object into several stacks of slices, with each stack oscillating independently. This is achieved by rendering a separate pass for each stack, demonstrating multi-pass rendering. The stacks/passes can be disabled independently, demonstrating the ShaderCollectionFunctor feature. There is also a light source, which can be moved using angle values, and these values are converted to a direction vector before being sent to the shader, which demonstrates the use of a ShaderInputFunctor.",
  3. "version": 1,
  4. "propertyLayout": {
  5. "groups": [
  6. {
  7. "id": "stacks",
  8. "displayName": "Stack Settings",
  9. "description": "Settings for the oscillating stack of slices that form the shell."
  10. },
  11. {
  12. "id": "light",
  13. "displayName": "Light Settings",
  14. "description": "Controls the direction of the light."
  15. }
  16. ],
  17. "properties": {
  18. "stacks": [
  19. {
  20. "id": "color",
  21. "displayName": "Stacks Color",
  22. "description": "The color for the stacks.",
  23. "type": "color",
  24. "defaultValue": [ 0.9, 0.9, 0.9 ],
  25. "connection": {
  26. "type": "shaderInput",
  27. "id": "m_color"
  28. }
  29. },
  30. {
  31. "id": "stackCount",
  32. "displayName": "Stack Count",
  33. "description": "The number of independent stacks. This demonstrates a shader option connection that applies to all shaders in the list, because it doesn't specify a shaderIndex.",
  34. "type": "uint",
  35. "defaultValue": 4,
  36. "min": 2,
  37. "max": 4,
  38. "step": 1,
  39. "connection": {
  40. "type": "shaderOption",
  41. "id": "o_stackCount"
  42. }
  43. },
  44. {
  45. "id": "sliceThickness",
  46. "displayName": "Slice Thickness",
  47. "description": "Sets how thick each slice should be. Thicker slices will reduce the number of slices composing the object.",
  48. "type": "float",
  49. "defaultValue": 0.1,
  50. "min": 0.01,
  51. "max": 1.0,
  52. "step": 0.001,
  53. "connection": {
  54. "type": "shaderInput",
  55. "id": "m_sliceThickness"
  56. }
  57. },
  58. {
  59. "id": "animate1",
  60. "displayName": "Animate Stack 1",
  61. "description": "Whether the first stack of slices should be animated. This demonstrates a shader option connection to a specific shaders in the list, because it specifies a shaderIndex.",
  62. "type": "bool",
  63. "defaultValue": true,
  64. "connection": {
  65. "type": "shaderOption",
  66. "id": "o_animated",
  67. "shaderIndex": 0
  68. }
  69. },
  70. {
  71. "id": "animate2",
  72. "displayName": "Animate Stack 2",
  73. "description": "Whether the second stack of slices should be animated. This demonstrates a shader option connection to a specific shaders in the list, because it specifies a shaderIndex.",
  74. "type": "bool",
  75. "defaultValue": true,
  76. "connection": {
  77. "type": "shaderOption",
  78. "id": "o_animated",
  79. "shaderIndex": 1
  80. }
  81. },
  82. {
  83. "id": "animate3",
  84. "displayName": "Animate Stack 3",
  85. "description": "Whether the third stack of slices should be animated. This demonstrates a shader option connection to a specific shaders in the list, because it specifies a shaderIndex.",
  86. "type": "bool",
  87. "defaultValue": true,
  88. "connection": {
  89. "type": "shaderOption",
  90. "id": "o_animated",
  91. "shaderIndex": 2
  92. }
  93. },
  94. {
  95. "id": "animate4",
  96. "displayName": "Animate Stack 4",
  97. "description": "Whether the fourth stack of slices should be animated. This demonstrates a shader option connection to a specific shaders in the list, because it specifies a shaderIndex.",
  98. "type": "bool",
  99. "defaultValue": true,
  100. "connection": {
  101. "type": "shaderOption",
  102. "id": "o_animated",
  103. "shaderIndex": 3
  104. }
  105. },
  106. {
  107. "id": "highlightMainSlices",
  108. "displayName": "Highlight Permanent Slices",
  109. "description": "Highlight the first two stacks of slices, which are always present. This demonstrates a property that is connected to multiple shader settings.",
  110. "type": "bool",
  111. "defaultValue": false,
  112. "connection": [
  113. {
  114. "type": "shaderOption",
  115. "id": "o_highlighted",
  116. "shaderIndex": 0
  117. },
  118. {
  119. "type": "shaderOption",
  120. "id": "o_highlighted",
  121. "shaderIndex": 1
  122. }
  123. ]
  124. },
  125. {
  126. "id": "highlightLastStack",
  127. "displayName": "Highlight Last Stack",
  128. "description": "Highlight the last stack of slices. This demonstrates a shader option that is applied by a functor rather than a direct connection. See StacksShaderCollectionFunctor and 'o_highlighted2'.",
  129. "type": "bool",
  130. "defaultValue": false
  131. }
  132. ],
  133. "light": [
  134. {
  135. "id": "azimuthDegrees",
  136. "displayName": "Azimuth (degrees)",
  137. "type": "float",
  138. "min": 0.0,
  139. "max": 360.0,
  140. "step": 1.0
  141. },
  142. {
  143. "id": "elevationDegrees",
  144. "displayName": "Elevation (degrees)",
  145. "type": "float",
  146. "min": -90.0,
  147. "max": 90.0,
  148. "step": 1.0
  149. }
  150. ]
  151. }
  152. },
  153. "shaders": [
  154. {
  155. "file": "Stacks.shader",
  156. "options": {
  157. "o_wobbleDirection": "Direction::Left",
  158. "o_stackIndex": 0
  159. }
  160. },
  161. {
  162. "file": "Stacks.shader",
  163. "options": {
  164. "o_wobbleDirection": "Direction::Right",
  165. "o_stackIndex": 1
  166. }
  167. },
  168. {
  169. "file": "Stacks.shader",
  170. "options": {
  171. "o_wobbleDirection": "Direction::Up",
  172. "o_stackIndex": 2
  173. }
  174. },
  175. {
  176. "file": "Stacks.shader",
  177. "options": {
  178. "o_wobbleDirection": "Direction::Down",
  179. "o_stackIndex": 3
  180. }
  181. }
  182. ]
  183. }