EmissiveWithCppFunctors.materialtype 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. {
  2. "description": "Simple material for comparing the performance of hard-coded C++ material functors.",
  3. "version": 3,
  4. "propertyLayout": {
  5. "groups": [
  6. {
  7. "id": "emissive",
  8. "displayName": "Settings"
  9. }
  10. ],
  11. "properties": {
  12. "emissive": [
  13. {
  14. "id": "unit",
  15. "displayName": "Units",
  16. "description": "The photometric units of the Intensity property.",
  17. "type": "Enum",
  18. "enumValues": ["Ev100"],
  19. "defaultValue": "Ev100"
  20. },
  21. {
  22. "id": "color",
  23. "displayName": "Color",
  24. "description": "Color is displayed as sRGB but the values are stored as linear color.",
  25. "type": "Color",
  26. "defaultValue": [ 1.0, 1.0, 1.0 ],
  27. "connection": {
  28. "type": "ShaderInput",
  29. "id": "m_emissiveColor"
  30. }
  31. },
  32. {
  33. "id": "intensity",
  34. "displayName": "Intensity",
  35. "description": "The amount of energy emitted.",
  36. "type": "Float",
  37. "defaultValue": 4,
  38. "min": -10,
  39. "max": 20,
  40. "softMin": -6,
  41. "softMax": 16
  42. },
  43. {
  44. "id": "textureMap",
  45. "displayName": "Texture Map",
  46. "description": "Texture map for defining emissive area.",
  47. "type": "Image",
  48. "connection": {
  49. "type": "ShaderInput",
  50. "id": "m_emissiveMap"
  51. }
  52. },
  53. {
  54. "id": "useTexture",
  55. "displayName": "Use Texture",
  56. "description": "Whether to use the texture map.",
  57. "type": "Bool",
  58. "defaultValue": true
  59. }
  60. ]
  61. }
  62. },
  63. "shaders": [
  64. {
  65. "file": "./EmissiveMaterial.shader"
  66. },
  67. {
  68. "file": "Shaders/Shadow/Shadowmap.shader"
  69. },
  70. {
  71. "file": "Shaders/Depth/DepthPass.shader"
  72. }
  73. ],
  74. "functors": [
  75. {
  76. "type": "ConvertEmissiveUnit",
  77. "args": {
  78. "intensityProperty": "emissive.intensity",
  79. "lightUnitProperty": "emissive.unit",
  80. "shaderInput": "m_emissiveIntensity",
  81. "ev100Index": 0,
  82. "nitIndex" : 1,
  83. "ev100MinMax": [-10, 20],
  84. "nitMinMax": [0.001, 100000.0],
  85. "shaderParameters": [
  86. {
  87. "name": "m_emissiveIntensity",
  88. "type": "float"
  89. }
  90. ]
  91. }
  92. },
  93. {
  94. "type": "UseTexture",
  95. "args": {
  96. "textureProperty": "emissive.textureMap",
  97. "useTextureProperty": "emissive.useTexture",
  98. "shaderOption": "o_emissive_useTexture"
  99. }
  100. }
  101. ]
  102. }