StacksShaderInputFunctorSourceData.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <MaterialFunctors/StacksShaderInputFunctor.h>
  10. #include <Atom/RPI.Edit/Material/MaterialFunctorSourceData.h>
  11. namespace AtomSampleViewer
  12. {
  13. //! This is an example of a ShaderInputFunctorSourceData subclass which creates a MaterialFunctor during asset processing.
  14. //! This is used with comprehensive.materialtype to transform angle values into a light direction vector.
  15. class StacksShaderInputFunctorSourceData final
  16. : public AZ::RPI::MaterialFunctorSourceData
  17. {
  18. public:
  19. AZ_RTTI(StacksShaderInputFunctorSourceData, "{6952C7F4-88F7-4840-8A29-4A3AE57F099C}", AZ::RPI::MaterialFunctorSourceData);
  20. static void Reflect(AZ::ReflectContext* context);
  21. private:
  22. using AZ::RPI::MaterialFunctorSourceData::CreateFunctor;
  23. FunctorResult CreateFunctor(const RuntimeContext& context) const override;
  24. };
  25. } // namespace AtomSampleViewer