// // This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; version 2 of the License. // // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. // /*[configuration] [OptionRangeFloat] GUIName = Aspect ratio correction OptionName = ASPECT MinValue = 0 MaxValue = 2 StepAmount = 0.0025 DefaultValue = 0.75 [OptionRangeFloat] GUIName = Overall zoom OptionName = ZOOM MinValue = 0 MaxValue = 2 StepAmount = 0.0025 DefaultValue = 0.97 [OptionRangeFloat] GUIName = Vertical offset OptionName = OFFSET MinValue = 0 MaxValue = 0.2 StepAmount = 0.00025 DefaultValue = 0.11 [/configuration]*/ void main() { float2 coord = float2(0.5,1-GetOption(OFFSET)) + (GetCoordinates()-float2(0.5,1)) * float2(1,GetOption(ASPECT)) / GetOption(ZOOM); SetOutput(clamp(coord,0,1)==coord ? SampleLocation(coord) : float4(0)); }