Skip to content

Commit

Permalink
Polyglot notebook utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrit committed Jan 6, 2025
1 parent 64def4c commit e046f6c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
2 changes: 1 addition & 1 deletion SeeSharp.Templates/SeeSharp.Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageId>SeeSharp.Templates</PackageId>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
<Title>SeeSharp Experiment Template</Title>
<Authors>Pascal Grittmann</Authors>
<Description>Basic setup for a raytracing experiment with SeeSharp</Description>
Expand Down
8 changes: 6 additions & 2 deletions SeeSharp/SeeSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Title>SeeSharp</Title>
<Description>A flexibility-first framework for rapid prototyping of rendering algorithms.</Description>
<PackageId>SeeSharp</PackageId>
<Version>2.1.0</Version>
<Version>2.2.0</Version>
<Copyright>(c) Pascal Grittmann</Copyright>
<RepositoryUrl>https://github.com/pgrit/SeeSharp</RepositoryUrl>

Expand All @@ -30,9 +30,13 @@
<None Include="../logo.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<None Include="extension.dib" Pack="true" PackagePath="interactive-extensions/dotnet" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Markdig" Version="0.37.0" />
<PackageReference Include="SimpleImageIO" Version="1.7.0" />
<PackageReference Include="SimpleImageIO" Version="1.7.1" />
<!-- <ProjectReference Include="../../SimpleImageIO/SimpleImageIO/SimpleImageIO.csproj" /> -->
<PackageReference Include="TinyEmbree" Version="1.1.0" />
<!-- <ProjectReference Include="../../TinyEmbree/TinyEmbree/TinyEmbree.csproj" /> -->
Expand Down
44 changes: 44 additions & 0 deletions SeeSharp/extension.dib
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!csharp

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading;
using System.Threading.Tasks;

using TinyEmbree;
using SimpleImageIO;

using SeeSharp;
using SeeSharp.Cameras;
using SeeSharp.Common;
using SeeSharp.Experiments;
using SeeSharp.Geometry;
using SeeSharp.Images;
using SeeSharp.Integrators;
using SeeSharp.Integrators.Bidir;
using SeeSharp.Integrators.Common;
using SeeSharp.Integrators.Util;
using SeeSharp.Sampling;
using SeeSharp.Shading;
using SeeSharp.Shading.Background;
using SeeSharp.Shading.Emitters;
using SeeSharp.Shading.Materials;

// The polyglot notebook VSCode extension has exceptionally poor performance for rapid console output,
// so we suppress the progress bar updates
ProgressBar.Silent = true;

// Loads a scene from file (using SceneRegistry) and initializes it for ray tracing with the given render resolution
Scene QuickloadScene(string name, int width, int height) {
var scene = SceneRegistry.LoadScene("CornellBox").MakeScene();
scene.FrameBuffer = new(width, height, "");
scene.Prepare();
return scene;
}

0 comments on commit e046f6c

Please sign in to comment.