瀏覽代碼

Removed defunct "Comprehensive" test material.

It was using a functor that isn't compatible with the new material functor design.

Signed-off-by: santorac <[email protected]>
santorac 2 年之前
父節點
當前提交
f3394adb6e

+ 0 - 44
Gem/Code/Lib/MaterialFunctors/StacksShaderCollectionFunctor.cpp

@@ -1,44 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#include <MaterialFunctors/StacksShaderCollectionFunctor.h>
-#include <Atom/RPI.Public/Material/Material.h>
-#include <Atom/RPI.Reflect/Shader/ShaderOptionGroup.h>
-
-namespace AtomSampleViewer
-{
-    void StacksShaderCollectionFunctor::Reflect(AZ::ReflectContext* context)
-    {
-        if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
-        {
-            serializeContext->Class<StacksShaderCollectionFunctor, AZ::RPI::MaterialFunctor>()
-                ->Version(1)
-                ->Field("m_stackCountProperty", &StacksShaderCollectionFunctor::m_stackCountProperty)
-                ->Field("m_highlightLastStackProperty", &StacksShaderCollectionFunctor::m_highlightLastStackProperty)
-                ->Field("m_highlightLastStackOption", &StacksShaderCollectionFunctor::m_highlightLastStackOption)
-                ;
-        }
-    }
-
-    void StacksShaderCollectionFunctor::Process(RuntimeContext& context)
-    {
-        using namespace AZ::RPI;
-
-        const uint32_t stackCount = context.GetMaterialPropertyValue<uint32_t>(m_stackCountProperty);
-        const bool highlightLastStack = context.GetMaterialPropertyValue<bool>(m_highlightLastStackProperty);
-
-        static const int AvailableStackCount = 4;
-        for (uint32_t i = 0; i < AvailableStackCount; ++i)
-        {
-            const bool isLastStack = (i == stackCount - 1);
-            const bool shouldHighlight = highlightLastStack && isLastStack;
-            context.SetShaderOptionValue(i, m_highlightLastStackOption, ShaderOptionValue{ shouldHighlight });
-            context.SetShaderEnabled(i, i < stackCount);
-        }
-    }
-} // namespace AtomSampleViewer

+ 0 - 39
Gem/Code/Lib/MaterialFunctors/StacksShaderCollectionFunctor.h

@@ -1,39 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#pragma once
-
-#include <Atom/RPI.Reflect/Material/MaterialFunctor.h>
-#include <Atom/RPI.Reflect/Material/MaterialPropertyDescriptor.h>
-
-namespace AtomSampleViewer
-{
-    //! This is an example of a custom hard-coded MaterialFunctor used to dynamically select shaders/variants/passes.
-    //! It is used by comprehensive.materialtype to enable/disable variants of the "stacks" shader.
-    class StacksShaderCollectionFunctor final
-        : public AZ::RPI::MaterialFunctor
-    {
-        friend class StacksShaderCollectionFunctorSourceData;
-    public:
-        AZ_RTTI(StacksShaderCollectionFunctor, "{4E51A7D5-7DF1-4402-8975-F6C9DFDEDC1E}", AZ::RPI::MaterialFunctor);
-
-        static void Reflect(AZ::ReflectContext* context);
-        
-        using AZ::RPI::MaterialFunctor::Process;
-        void Process(RuntimeContext& context) override;
-
-    private:
-
-        // Indexes used to look up material property values at runtime
-        AZ::RPI::MaterialPropertyIndex m_stackCountProperty;
-        AZ::RPI::MaterialPropertyIndex m_highlightLastStackProperty;
-
-        // Indexes used to access ShaderOption values at runtime
-        AZ::RPI::ShaderOptionIndex m_highlightLastStackOption;
-    };
-} // namespace AtomSampleViewer

+ 0 - 41
Gem/Code/Lib/MaterialFunctors/StacksShaderInputFunctor.cpp

@@ -1,41 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#include <MaterialFunctors/StacksShaderInputFunctor.h>
-#include <Atom/RPI.Public/Material/Material.h>
-#include <Atom/RPI.Public/Shader/ShaderResourceGroup.h>
-#include <AzCore/Math/Matrix4x4.h>
-
-namespace AtomSampleViewer
-{
-    void StacksShaderInputFunctor::Reflect(AZ::ReflectContext* context)
-    {
-        if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
-        {
-            serializeContext->Class<StacksShaderInputFunctor, AZ::RPI::MaterialFunctor>()
-                ->Version(1)
-                ->Field("m_azimuthDegreesIndex", &StacksShaderInputFunctor::m_azimuthDegreesIndex)
-                ->Field("m_elevationDegreesIndex", &StacksShaderInputFunctor::m_elevationDegreesIndex)
-                ->Field("m_lightDirectionIndex", &StacksShaderInputFunctor::m_lightDirectionIndex)
-                ;
-        }
-    }
-
-    void StacksShaderInputFunctor::Process(RuntimeContext& context)
-    {
-        float azimuthDegrees = context.GetMaterialPropertyValue<float>(m_azimuthDegreesIndex);
-        float elevationDegrees = context.GetMaterialPropertyValue<float>(m_elevationDegreesIndex);
-
-        AZ::Vector3 lightDir = AZ::Vector3(1,0,0) * AZ::Matrix4x4::CreateRotationZ(AZ::DegToRad(elevationDegrees)) * AZ::Matrix4x4::CreateRotationY(AZ::DegToRad(azimuthDegrees));
-
-        float floats[3];
-        lightDir.StoreToFloat3(floats);
-        context.GetShaderResourceGroup()->SetConstantRaw(m_lightDirectionIndex, floats, 3 * sizeof(float));
-    }
-
-} // namespace AtomSampleViewer

+ 0 - 41
Gem/Code/Lib/MaterialFunctors/StacksShaderInputFunctor.h

@@ -1,41 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#pragma once
-
-#include <Atom/RPI.Reflect/Material/MaterialFunctor.h>
-#include <Atom/RPI.Reflect/Material/MaterialPropertyDescriptor.h>
-
-namespace AtomSampleViewer
-{
-    //! This is an example of a custom hard-coded MaterialFunctor used to perform calculations on material 
-    //! property values to produce shader input values.
-    //! It is used by comprehensive.materialtype to transform angle values into a light direction vector.
-    class StacksShaderInputFunctor final
-        : public AZ::RPI::MaterialFunctor
-    {
-        friend class StacksShaderInputFunctorSourceData;
-    public:
-        AZ_RTTI(StacksShaderInputFunctor, "{7F607170-1BC2-4510-A252-8A665FC02052}", AZ::RPI::MaterialFunctor);
-
-        static void Reflect(AZ::ReflectContext* context);
-        
-        using AZ::RPI::MaterialFunctor::Process;
-        void Process(RuntimeContext& context) override;
-
-    private:
-
-        // Indices used to look up material property values at runtime
-        AZ::RPI::MaterialPropertyIndex m_azimuthDegreesIndex;
-        AZ::RPI::MaterialPropertyIndex m_elevationDegreesIndex;
-
-        // Indices used to look up ShaderResourceGroup inputs at runtime
-        AZ::RHI::ShaderInputConstantIndex m_lightDirectionIndex;
-    };
-
-} // namespace AtomSampleViewer

+ 0 - 4
Gem/Code/Source/AtomSampleViewerSystemComponent.cpp

@@ -7,8 +7,6 @@
  */
 
 #include <AtomSampleViewerSystemComponent.h>
-#include <MaterialFunctors/StacksShaderCollectionFunctor.h>
-#include <MaterialFunctors/StacksShaderInputFunctor.h>
 #include <Automation/ImageComparisonConfig.h>
 
 #include <EntityLatticeTestComponent.h>
@@ -54,8 +52,6 @@ namespace AtomSampleViewer
         ImGuiAssetBrowser::Reflect(context);
         ImGuiSidebar::Reflect(context);
         ImGuiSaveFilePath::Reflect(context);
-        StacksShaderCollectionFunctor::Reflect(context);
-        StacksShaderInputFunctor::Reflect(context);
 
         ImageComparisonConfig::Reflect(context);
 

+ 0 - 7
Gem/Code/Tools/AtomSampleViewerToolsSystemComponent.cpp

@@ -7,8 +7,6 @@
  */
 
 #include <Tools/AtomSampleViewerToolsSystemComponent.h>
-#include <MaterialFunctors/StacksShaderCollectionFunctorSourceData.h>
-#include <MaterialFunctors/StacksShaderInputFunctorSourceData.h>
 
 #include <Atom/RPI.Edit/Material/MaterialFunctorSourceDataRegistration.h>
 
@@ -28,15 +26,10 @@ namespace AtomSampleViewer
                     ->Version(0)
                 ;
             }
-
-            StacksShaderCollectionFunctorSourceData::Reflect(context);
-            StacksShaderInputFunctorSourceData::Reflect(context);
         }
 
         void AtomSampleViewerToolsSystemComponent::Activate()
         {
-            AZ::RPI::MaterialFunctorSourceDataRegistration::Get()->RegisterMaterialFunctor("StacksShaderCollection", azrtti_typeid<StacksShaderCollectionFunctorSourceData>());
-            AZ::RPI::MaterialFunctorSourceDataRegistration::Get()->RegisterMaterialFunctor("StacksShaderInput",      azrtti_typeid<StacksShaderInputFunctorSourceData>());
         }
 
         void AtomSampleViewerToolsSystemComponent::Deactivate()

+ 0 - 43
Gem/Code/Tools/MaterialFunctors/StacksShaderCollectionFunctorSourceData.cpp

@@ -1,43 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#include <MaterialFunctors/StacksShaderCollectionFunctorSourceData.h>
-#include <Atom/RPI.Reflect/Shader/ShaderOptionGroupLayout.h>
-#include <AzCore/Serialization/SerializeContext.h>
-
-namespace AtomSampleViewer
-{
-    void StacksShaderCollectionFunctorSourceData::Reflect(AZ::ReflectContext* context)
-    {
-        if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
-        {
-            serializeContext->Class<StacksShaderCollectionFunctorSourceData>()
-                ->Version(2)
-                ;
-        }
-    }
-
-    AZ::RPI::MaterialFunctorSourceData::FunctorResult StacksShaderCollectionFunctorSourceData::CreateFunctor(const RuntimeContext& context) const
-    {
-        using namespace AZ;
-        using namespace AZ::RPI;
-
-        Ptr<StacksShaderCollectionFunctor> functor = aznew StacksShaderCollectionFunctor;
-
-        functor->m_stackCountProperty = context.FindMaterialPropertyIndex(Name("stacks.stackCount"));
-        functor->m_highlightLastStackProperty = context.FindMaterialPropertyIndex(Name("stacks.highlightLastStack"));
-        AddMaterialPropertyDependency(functor, functor->m_stackCountProperty);
-        AddMaterialPropertyDependency(functor, functor->m_highlightLastStackProperty);
-
-        // StacksShaderCollectionFunctorSourceData directly corresponds to Comprehensive.material, which uses the same ShaderAsset for all passes, 
-        // so we can just use the ShaderOptionGroupLayout from the first ShaderAsset.
-        functor->m_highlightLastStackOption = context.FindShaderOptionIndex(0, AZ::Name{"o_highlighted2"});
-
-        return Success(Ptr<MaterialFunctor>(functor));
-    }
-}

+ 0 - 32
Gem/Code/Tools/MaterialFunctors/StacksShaderCollectionFunctorSourceData.h

@@ -1,32 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#pragma once
-
-#include <MaterialFunctors/StacksShaderCollectionFunctor.h>
-#include <Atom/RPI.Edit/Material/MaterialFunctorSourceData.h>
-
-namespace AtomSampleViewer
-{
-    class StacksShaderCollectionFunctor;
-
-    //! This is an example of a MaterialFunctorSourceData subclass which creates a 
-    //! MaterialFunctor during asset processing. 
-    //! This is used with comprehensive.material to enable/disable variants of the "stacks" shader.
-    class StacksShaderCollectionFunctorSourceData final
-        : public AZ::RPI::MaterialFunctorSourceData
-    {
-    public:
-        AZ_RTTI(StacksShaderCollectionFunctorSourceData, "{2B4678D5-5C1B-4BEE-99E5-9EC9FB871D37}", AZ::RPI::MaterialFunctorSourceData);
-
-        static void Reflect(AZ::ReflectContext* context);
-        
-        using AZ::RPI::MaterialFunctorSourceData::CreateFunctor;
-        FunctorResult CreateFunctor(const RuntimeContext& context) const override;
-    };
-} // namespace AtomSampleViewer

+ 0 - 35
Gem/Code/Tools/MaterialFunctors/StacksShaderInputFunctorSourceData.cpp

@@ -1,35 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#include <MaterialFunctors/StacksShaderInputFunctorSourceData.h>
-#include <Atom/RHI.Reflect/ShaderResourceGroupLayout.h>
-#include <AzCore/Serialization/SerializeContext.h>
-
-namespace AtomSampleViewer
-{
-    void StacksShaderInputFunctorSourceData::Reflect(AZ::ReflectContext* context)
-    {
-        if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
-        {
-            serializeContext->Class<StacksShaderInputFunctorSourceData>()
-                ->Version(2)
-                ;
-        }
-    }
-
-    AZ::RPI::MaterialFunctorSourceData::FunctorResult StacksShaderInputFunctorSourceData::CreateFunctor(const RuntimeContext& context) const
-    {
-        AZ::RPI::Ptr<StacksShaderInputFunctor> functor = aznew StacksShaderInputFunctor;
-        functor->m_azimuthDegreesIndex = context.FindMaterialPropertyIndex(AZ::Name{ "light.azimuthDegrees" });
-        functor->m_elevationDegreesIndex = context.FindMaterialPropertyIndex(AZ::Name{ "light.elevationDegrees" });
-        AddMaterialPropertyDependency(functor, functor->m_azimuthDegreesIndex);
-        AddMaterialPropertyDependency(functor, functor->m_elevationDegreesIndex);
-        functor->m_lightDirectionIndex = context.GetShaderResourceGroupLayout()->FindShaderInputConstantIndex(AZ::Name{ "m_lightDir" });
-        return AZ::Success(AZ::RPI::Ptr<AZ::RPI::MaterialFunctor>(functor));
-    }
-}

+ 0 - 31
Gem/Code/Tools/MaterialFunctors/StacksShaderInputFunctorSourceData.h

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

+ 0 - 4
Gem/Code/atomsampleviewergem_lib_files.cmake

@@ -7,8 +7,4 @@
 #
 
 set(FILES
-    Lib/MaterialFunctors/StacksShaderCollectionFunctor.h
-    Lib/MaterialFunctors/StacksShaderCollectionFunctor.cpp
-    Lib/MaterialFunctors/StacksShaderInputFunctor.h
-    Lib/MaterialFunctors/StacksShaderInputFunctor.cpp
 )

+ 0 - 4
Gem/Code/atomsampleviewergem_tools_files.cmake

@@ -9,8 +9,4 @@
 set(FILES
     Tools/AtomSampleViewerToolsSystemComponent.h
     Tools/AtomSampleViewerToolsSystemComponent.cpp
-    Tools/MaterialFunctors/StacksShaderCollectionFunctorSourceData.h
-    Tools/MaterialFunctors/StacksShaderCollectionFunctorSourceData.cpp
-    Tools/MaterialFunctors/StacksShaderInputFunctorSourceData.h
-    Tools/MaterialFunctors/StacksShaderInputFunctorSourceData.cpp
 )

+ 0 - 3
Shaders/ComprehensiveTestMaterial/Comprehensive.material

@@ -1,3 +0,0 @@
-{
-    "materialType": "Comprehensive.materialtype"
-}

+ 0 - 183
Shaders/ComprehensiveTestMaterial/Comprehensive.materialtype

@@ -1,183 +0,0 @@
-{
-    "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.",
-    "version": 1,
-    "propertyLayout": {
-        "groups": [
-            {
-                "id": "stacks",
-                "displayName": "Stack Settings",
-                "description": "Settings for the oscillating stack of slices that form the shell."
-            },
-            {
-                "id": "light",
-                "displayName": "Light Settings",
-                "description": "Controls the direction of the light."
-            }
-        ],
-        "properties": {
-            "stacks": [
-                {
-                    "id": "color",
-                    "displayName": "Stacks Color",
-                    "description": "The color for the stacks.",
-                    "type": "color",
-                    "defaultValue": [ 0.9, 0.9, 0.9 ],
-                    "connection": {
-                        "type": "shaderInput",
-                        "id": "m_color"
-                    }
-                },
-                {
-                    "id": "stackCount",
-                    "displayName": "Stack Count",
-                    "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.",
-                    "type": "uint",
-                    "defaultValue": 4,
-                    "min": 2,
-                    "max": 4,
-                    "step": 1,
-                    "connection": {
-                        "type": "shaderOption",
-                        "id": "o_stackCount"
-                    }
-                },
-                {
-                    "id": "sliceThickness",
-                    "displayName": "Slice Thickness",
-                    "description": "Sets how thick each slice should be. Thicker slices will reduce the number of slices composing the object.",
-                    "type": "float",
-                    "defaultValue": 0.1,
-                    "min": 0.01,
-                    "max": 1.0,
-                    "step": 0.001,
-                    "connection": {
-                        "type": "shaderInput",
-                        "id": "m_sliceThickness"
-                    }
-                },
-                {
-                    "id": "animate1",
-                    "displayName": "Animate Stack 1",
-                    "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.",
-                    "type": "bool",
-                    "defaultValue": true,
-                    "connection": {
-                        "type": "shaderOption",
-                        "id": "o_animated",
-                        "shaderIndex": 0
-                    }
-                },
-                {
-                    "id": "animate2",
-                    "displayName": "Animate Stack 2",
-                    "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.",
-                    "type": "bool",
-                    "defaultValue": true,
-                    "connection": {
-                        "type": "shaderOption",
-                        "id": "o_animated",
-                        "shaderIndex": 1
-                    }
-                },
-                {
-                    "id": "animate3",
-                    "displayName": "Animate Stack 3",
-                    "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.",
-                    "type": "bool",
-                    "defaultValue": true,
-                    "connection": {
-                        "type": "shaderOption",
-                        "id": "o_animated",
-                        "shaderIndex": 2
-                    }
-                },
-                {
-                    "id": "animate4",
-                    "displayName": "Animate Stack 4",
-                    "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.",
-                    "type": "bool",
-                    "defaultValue": true,
-                    "connection": {
-                        "type": "shaderOption",
-                        "id": "o_animated",
-                        "shaderIndex": 3
-                    }
-                },
-                {
-                    "id": "highlightMainSlices",
-                    "displayName": "Highlight Permanent Slices",
-                    "description": "Highlight the first two stacks of slices, which are always present. This demonstrates a property that is connected to multiple shader settings.",
-                    "type": "bool",
-                    "defaultValue": false,
-                    "connection": [
-                        {
-                            "type": "shaderOption",
-                            "id": "o_highlighted",
-                            "shaderIndex": 0
-                        },
-                        {
-                            "type": "shaderOption",
-                            "id": "o_highlighted",
-                            "shaderIndex": 1
-                        }
-                    ]
-                },
-                {
-                    "id": "highlightLastStack",
-                    "displayName": "Highlight Last Stack",
-                    "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'.",
-                    "type": "bool",
-                    "defaultValue": false
-                }
-            ],
-            "light": [
-                {
-                    "id": "azimuthDegrees",
-                    "displayName": "Azimuth (degrees)",
-                    "type": "float",
-                    "min": 0.0,
-                    "max": 360.0,
-                    "step": 1.0
-                },
-                {
-                    "id": "elevationDegrees",
-                    "displayName": "Elevation (degrees)",
-                    "type": "float",
-                    "min": -90.0,
-                    "max": 90.0,
-                    "step": 1.0
-                }
-            ]
-        }
-    },
-    "shaders": [
-        {
-            "file": "Stacks.shader",
-            "options": {
-                "o_wobbleDirection": "Direction::Left",
-                "o_stackIndex": 0
-            }
-        },
-        {
-            "file": "Stacks.shader",
-            "options": {
-                "o_wobbleDirection": "Direction::Right",
-                "o_stackIndex": 1
-            }
-        },
-        {
-            "file": "Stacks.shader",
-            "options": {
-                "o_wobbleDirection": "Direction::Up",
-                "o_stackIndex": 2
-            }
-        },
-        {
-            "file": "Stacks.shader",
-            "options": {
-                "o_wobbleDirection": "Direction::Down",
-                "o_stackIndex": 3
-            }
-        }
-    ]
-}

+ 0 - 10
Shaders/ComprehensiveTestMaterial/Comprehensive_variant.material

@@ -1,10 +0,0 @@
-{
-    "materialType": "Comprehensive.materialtype",
-    "materialTypeVersion": 1,
-    "propertyValues": {
-        "light.azimuthDegrees": 45.0,
-        "light.elevationDegrees": -45.0,
-        "stacks.sliceThickness": 0.02500000037252903,
-        "stacks.stackCount": 2
-    }
-}

+ 0 - 152
Shaders/ComprehensiveTestMaterial/Stacks.azsl

@@ -1,152 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#include <scenesrg.srgi>
-#include <viewsrg.srgi>
-#include <Atom/Features/PBR/DefaultObjectSrg.azsli>
-#include <Atom/RPI/ShaderResourceGroups/DefaultDrawSrg.azsli>
-
-// This shader draws a model with most of the surface clipped away, only drawing regularly spaced slices of it.
-// The idea is to run a model through several variants of this same shader, so the combined appearance is a shell
-// broken into multiple slices that are oscillating in different directions.
-// This demonstrates a material's ability to run multiple shader variants, over multiple passes.
-
-// Indicates which direction the stack of slices will animate/wobble.
-// This demonstrates the use of a ShaderOption that is an enum, and is controlled through a ShaderCollectionFunctor.
-option enum class Direction { None, Left, Right, Up, Down } o_wobbleDirection;
-
-// Indicates the number of independent slice stacks, which will animate together, and the index of the current slice stack.
-// Running the shader for each of the available stacks will render enough slices to cover the entire model.
-[range(2, 4)]
-option uint o_stackCount;
-[range(0, 3)]
-option int o_stackIndex;
-
-// Indicates whether the current stack's wobble animation should be enabled.
-option bool o_animated;
-
-// Indicates whether the current stack's color should be highlighted.
-option bool o_highlighted;
-
-// Indicates whether the current stack's color should be highlighted (using an alternate color).
-option bool o_highlighted2;
-
-ShaderResourceGroup MaterialSrg : SRG_PerMaterial
-{
-    float3 m_color;
-    float3 m_lightDir;
-    float m_sliceThickness;
-};
-
-struct VertexInput
-{
-    float3 m_position : POSITION;
-    float3 m_normal : NORMAL;
-};
-
-struct VertexOutput
-{
-    float4 m_position : SV_Position;
-    float3 m_normal : NORMAL;
-    float4 m_localPos : UV1;
-};
-
-// Oscillates a value between min and max.
-float CalcShift(float speed, float min, float max)
-{
-    float t = sin(SceneSrg::m_time * speed) * 0.5 + 0.5;
-
-    // Make it snap to min a bit
-    t = saturate(t * 2 - 1);
-
-    float shift = lerp(min, max, t); 
-    return shift;
-}
-
-VertexOutput MainVS(VertexInput input)
-{
-    const float4x4 objectToWorldMatrix = ObjectSrg::GetWorldMatrix();
-
-    const float wobbleSize = 0.05;
-    const float wobbleSpeed = 5;
-
-    float3 wobbleDir;
-    switch(o_wobbleDirection)
-    {
-    case Direction::Left:  wobbleDir = float3(-1, 0, 0); break;
-    case Direction::Right: wobbleDir = float3( 1, 0, 0); break;
-    case Direction::Up:    wobbleDir = float3(0, 0,  1); break;
-    case Direction::Down:  wobbleDir = float3(0, 0, -1); break;
-    default:               wobbleDir = float3(0, 0, 0);
-    }
-
-    float3 shift;
-    if (o_animated)
-    {
-        shift = wobbleDir * CalcShift(wobbleSpeed, 0, wobbleSize);
-    }
-    else
-    {
-        shift = wobbleDir * wobbleSize;
-    }
-
-    const float4 position = float4(input.m_position, 1);
-
-    VertexOutput output;
-    output.m_localPos = position;
-    float3 worldPosition = mul(objectToWorldMatrix, position + float4(shift,0)).xyz;
-    output.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(worldPosition, 1.0));
-    output.m_normal = mul(ObjectSrg::GetWorldMatrixInverseTranspose(), input.m_normal);
-    output.m_normal = normalize(output.m_normal);
-
-    return output;
-}
-
-struct PixelOutput
-{
-    float4 m_color : SV_Target0;
-};
-
-PixelOutput MainPS(VertexOutput input)
-{
-    PixelOutput output;
-    
-    float sliceThickness = MaterialSrg::m_sliceThickness;
-    float sliceStride = sliceThickness * o_stackCount;
-
-    float arbitraryBigNumber = 1000; // Used to make the slices not weird around 0
-    float stackOffset = abs(fmod(input.m_localPos.y + arbitraryBigNumber, sliceStride)) - sliceThickness * o_stackIndex;
-
-    // Discard if stackOffset < 0
-    clip(stackOffset);
-
-    // Discard if stackOffset > sliceThickness 
-    clip(sliceThickness - stackOffset);
-
-    // fakeLighting is peaks at 0.9, so we can leave room for the o_highlighted option
-    float3 normal = normalize(input.m_normal);
-    float fakeLighting = dot(normal, MaterialSrg::m_lightDir) * 0.6 + 0.3;
-
-    output.m_color.rgb = fakeLighting * MaterialSrg::m_color;
-
-    const float highlightAmount = 0.1;
-
-    if (o_highlighted)
-    {
-        output.m_color.rgb += highlightAmount * float3(1.0, 0.5, 0.5);
-    }
-
-    if (o_highlighted2)
-    {
-        output.m_color.rgb += highlightAmount * float3(0.5, 0.5, 1.0);
-    }
-
-    output.m_color.a = 1;
-
-    return output;
-}

+ 0 - 26
Shaders/ComprehensiveTestMaterial/Stacks.shader

@@ -1,26 +0,0 @@
-{
-    "Source": "Stacks.azsl",
-
-    "DepthStencilState": {
-        "Depth": {
-            "Enable": true,
-            "CompareFunc": "GreaterEqual"
-        }
-    },
-
-    "DrawList": "forward",
-
-    "ProgramSettings": {
-        "EntryPoints": [
-            {
-                "name": "MainVS",
-                "type": "Vertex"
-            },
-            {
-                "name": "MainPS",
-                "type": "Fragment"
-            }
-        ]
-    }
-}
-

+ 0 - 37
Shaders/ComprehensiveTestMaterial/Stacks.shadervariantlist

@@ -1,37 +0,0 @@
-{
-    "Shader": "Shaders/ComprehensiveTestMaterial/Stacks.shader",
-
-    // Note that we don't include pre-compiled ProgramVariants for some shader option values like o_stackCount, to demonstrate the variant fallback feature.
-
-    "Variants": [
-        {
-            "StableId": 1,
-            "Options": {
-                "o_wobbleDirection": "Direction::Left",
-                "o_stackIndex": 0
-            }
-        },
-        {
-            "StableId": 2,
-            "Options": {
-                "o_wobbleDirection": "Direction::Right",
-                "o_stackIndex": 1
-            }
-        },
-        {
-            "StableId": 3,
-            "Options": {
-                "o_wobbleDirection": "Direction::Up",
-                "o_stackIndex": 2
-            }
-        },
-        {
-            "StableId": 4,
-            "Options": {
-                "o_wobbleDirection": "Direction::Down",
-                "o_stackIndex": 3
-            }
-        }
-    ]
-}
-

+ 0 - 3
atomsampleviewer_asset_files.cmake

@@ -61,9 +61,6 @@ set(FILES
     Shaders/DebugVertexNormals.materialtype
     Shaders/DebugVertexNormals.shader
     Shaders/Instanced.azsl
-    Shaders/ComprehensiveTestMaterial/Comprehensive.materialtype
-    Shaders/ComprehensiveTestMaterial/Stacks.azsl
-    Shaders/ComprehensiveTestMaterial/Stacks.shader
     Shaders/DynamicDraw/DynamicDrawExample.azsl
     Shaders/DynamicDraw/DynamicDrawExample.shader
     Shaders/OptimizationTests/DummyTransformColor.azsl