12345678910111213141516171819202122232425262728293031323334353637 |
- /*
- * 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
- *
- */
- [[no_specialization]]
- option bool UseGI = true;
- ShaderResourceGroupSemantic ExampleBinding
- {
- FrequencyId = 0;
- ShaderVariantFallback = 64;
- };
- ShaderResourceGroup ExampleSRG : ExampleBinding
- {
- float4 exampleColor;
- };
- struct VertexInput { float3 m_position : POSITION; };
- struct VertexOutput { float4 m_position : SV_Position; };
- VertexOutput MainVS(VertexInput input)
- {
- VertexOutput output;
- output.m_position = float4(input.m_position, 1.0);
- return output;
- }
- float4 MainPS() : SV_Target0
- {
- if (UseGI)
- return ExampleSRG::exampleColor;
- }
|