From 556876349ee28d65c5b766129f699bc4b92777e9 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 12 Dec 2023 23:24:19 +0100 Subject: [PATCH] Minor code tweak, add more comments --- .../D2DPixelShaderDescriptorGenerator.HlslSource.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslSource.cs b/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslSource.cs index aada8953..eb99986f 100644 --- a/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslSource.cs +++ b/src/ComputeSharp.D2D1.SourceGenerators/D2DPixelShaderDescriptorGenerator.HlslSource.cs @@ -325,6 +325,9 @@ partial class D2DPixelShaderDescriptorGenerator using ImmutableArrayBuilder methods = new(); string? entryPoint = null; + + // By default, the scene position is not required. We will set this while + // rewriting HLSL, if any method we traverse ends up requiring the position. needsD2D1RequiresScenePosition = false; foreach (ISymbol memberSymbol in structDeclarationSymbol.GetMembers())