Jump to content

Timo Kinnunen

Newbies
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Timo Kinnunen's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • Reacting Well Rare
  • First Post

Recent Badges

1

Reputation

  1. Am I using SampleMapRenderer incorrectly or missing something? I'm getting CyclicGraphExceptions but I don't see what the problem could be. Here's the code: private static IDeviceImage SampleAt(IDeviceContext dc, IDeviceImage src, float offsetX, float offsetY) { IDeviceImage sm = new HlslBinaryOperatorEffect(dc, new ScenePositionEffect(dc, ScenePositionFormat.XY01), HlslBinaryOperator.Add, new Vector4Float(offsetX, offsetY, 0f, 0f)); SampleMapRenderer r = new SampleMapRenderer(dc); r.Properties.Input.Set(src); r.Properties.SampleMaps.SetCount(1); r.Properties.SampleMaps[0].Set(sm); r.Properties.EdgeMode.SetValue(SampleMapEdgeMode.Clamp); r.Properties.SamplingMode.SetValue(SampleMapSamplingMode.Linear); return r; } protected override IDeviceImage OnCreateOutput(IDeviceContext dc) { IDeviceImage src = Environment.SourceImage; //IDeviceImage sX1 = SampleAt(dc, src, -0.25f, 0f), sX2 = SampleAt(dc, src, 0.25f, 0f); return new HlslBinaryOperatorEffect(dc, new HlslBinaryFunctionEffect(dc, HlslBinaryFunction.Dot, sX1, sX1), HlslBinaryOperator.Subtract, new HlslBinaryFunctionEffect(dc, HlslBinaryFunction.Dot, sX2, sX2)); // Doesn't help return new HlslBinaryOperatorEffect(dc, new HlslBinaryFunctionEffect(dc, HlslBinaryFunction.Dot, SampleAt(dc, src, -0.25f, 0f), SampleAt(dc, src, -0.25f, 0f)), HlslBinaryOperator.Subtract, new HlslBinaryFunctionEffect(dc, HlslBinaryFunction.Dot, SampleAt(dc, src, +0.25f, 0f), SampleAt(dc, src, +0.25f, 0f))); }
  2. Hi, I get a 100% reproducible crash of paint.net when typing the indicated dot '.' in the following code snippet in CodeLab 6.8: Rectangle[] rois = selectionRegion.GetRegionScansInt(); int roisLength = rois. // 👈 typing that '.' immediately crashes paint.net //gaussianblurEffect.Render(gaussianblurParameters, auxArgs, wrkArgs, selectionRegion); gaussianblurEffect.Render(gaussianblurParameters, auxArgs, wrkArgs, rois, 0, roisLength); The dot '.' has to be typed for the crash to occur, simply copy-pasting the snippet doesn't trigger the crash as the crash occurs while populating the list of available code completion suggestions. Crash log:
×
×
  • Create New...