krauthaufen/FShade

Compute shader integer image support

luithefirst opened this issue · 12 comments

It's not possible to use an image e.g. with Formats.r32i since ImageXX has an IFloatingValue type constraint. It looks like we would need other image types e.g. Image2i to support these data formats.

Already exists, e.g. IntImage2d

Thanks, I was only looking using Intellisense and could not find it.

Its there also something for UInt?

UIntImage I think

No, and I guess it's because there is no V4ui in Aardvark.

C4ui exists afaik, so it would certainly be possible to integrate, but you can always use an IntImage and simply reinterpret the values?

The image-code is auto-generated, so it should be relatively simple to add UIntImages. Maybe one would also need to adjust the compiler a little to make it work, but afaik that was straight-forward.
Let me know if you actually have uses for UIntImage.

If i recall correctly there is a problem with IntImage in Aardvark.Rendering.GL (something with meaningless texture parameters being set) that will cause problems, please just create an issue there in case you run into that

I'm somehow not able to create the R32i image using shaders (deferred rendering), but the compute shader seems fine. When I directly define an attribute "DefrerredClusterId : int32" I get a compiler error that "cannot convert double to int32" or something like that. I also tried to define it as float and use IntBitsToFloat, but then everything is "0". The only setup I managed to get some output is to use an R32f image and use either a float cast (losing some bits) or IntBitsToFloat.

Hey, is rendering to int-images even possible? If so, we should certainly fix that. Are you sure FShade does something wrong there?

The issue is in Aardvark.Rendering:
https://github.com/aardvark-platform/aardvark.rendering/blob/f2ea2d9ab3cbc5bd4073cee55a3544b3ff197f4f/src/Aardvark.Rendering/Effects/Interop/FShade.fs#L368

With the table:
https://github.com/aardvark-platform/aardvark.rendering/blob/f2ea2d9ab3cbc5bd4073cee55a3544b3ff197f4f/src/Aardvark.Rendering/Effects/Interop/FShade.fs#L172

When a shader is linked with a Framebuffer that has a R32i buffer attached (same as output vertex attribute declared in FShade) "outputs" (Line 362) will still contain an entry with "float", while it actually should be an "int".

The stacktrace then looks like this:

System.Exception: [FShade] cannot convert value from System.Int32 to System.Double
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1637.Invoke(String message) in E:\A\_work\130\s\src\fsharp\FSharp.Core\printf.fs:line 1637
   at FShade.ShaderModule.converter@1541-1.Invoke(Type arg20)
   at FShade.ShaderModule.withOutputs@1949-4.Invoke(String n, Type t)
   at Microsoft.FSharp.Collections.MapTreeModule.mapiOpt[a,b,c](FSharpFunc`3 f, MapTree`2 m) in E:\A\_work\130\s\src\fsharp\FSharp.Core\map.fs:line 285
   at Microsoft.FSharp.Collections.MapTreeModule.mapiOpt[a,b,c](FSharpFunc`3 f, MapTree`2 m) in E:\A\_work\130\s\src\fsharp\FSharp.Core\map.fs:line 288
   at Microsoft.FSharp.Collections.MapTreeModule.mapiOpt[a,b,c](FSharpFunc`3 f, MapTree`2 m) in E:\A\_work\130\s\src\fsharp\FSharp.Core\map.fs:line 288
   at Microsoft.FSharp.Collections.FSharpMap`2.Map[b](FSharpFunc`2 f) in E:\A\_work\130\s\src\fsharp\FSharp.Core\map.fs:line 552
   at FShade.ShaderModule.withOutputs@1900.Invoke(FSharpMap`2 values)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 243
   at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 254
   at FShade.Imperative.ExpressionSubstitutionExtensions.substituteWrites(FSharpFunc`2 substitute, FSharpExpr e)
   at FShade.ShaderModule.substituteWrites(FSharpFunc`2 f, Shader shader)
   at FShade.EffectModule.linkShaders@375(FSharpMap`2 needed, FSharpList`1 l)
   at FShade.EffectModule.link(ShaderStage stage, FSharpMap`2 outputs, Effect effect)
   at FShade.EffectModule.toModule(EffectConfig config, Effect effect)
   at Aardvark.Rendering.FShadeInterop.IFramebufferSignature.Link(IFramebufferSignature x, Effect effect, Range1d depthRange, Boolean flip, IndexedGeometryMode top)

Fixed this in the v53 branch. Aardvark.Base now has unsigned integer vector types, and Aardvark.Rendering has proper support for integer outputs.