Skip to content

Aardvark Rendering 5.4 changelog

Attila Szabo edited this page Dec 22, 2023 · 1 revision
  • Implemented new compute task API replacing the old low-level imperative design (https://github.com/aardvark-platform/aardvark.rendering/issues/94).
    • For Vulkan ComputeCommand.CopyImageCmd now uses proper PixImage coordinate space (origin top-left, same as in the OpenGL backend).
    • Renamed IComputeShaderInputBinding to IComputeInputBinding. For backwards compatibility with the imperative API use MutableComputeInputBinding.
    • Renamed IComputeRuntime.Compile to IComputeRuntime.CompileCompute
    • Replaced ComputeProgram<unit> with IComputeTask
    • Renamed NewInputBinding to CreateInputBinding
  • Various improvements for buffer related methods and interfaces:
    • IBackendBuffer inherits from IBufferRange.
    • Renamed IBufferRange.Size to SizeInBytes.
    • Added Range() and Elements() methods for getting subranges of buffers.
    • Renamed certain Copy() methods to Upload() and Download().
    • Added and modified Download(), Upload() and Copy() overloads to be consistent.
    • Merged BufferRange into Buffer module.
  • Improved how vertex and instance attributes are provided and interpreted:
    • Floating point attributes may now be provided via 8bit and 16bit (and 32bit for GL) integer data as normalized or scaled values:
      • Normalized means that the integer represents a fixed-point value. Unsigned integers are mapped to [0.0, 1.0] while signed integers are mapped to [-1.0, 1.0]. For example, C4b(255, 51, 204, 255) would map to V4d(1.0, 0.2, 0.8, 1.0) in the shader. See also: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap3.html#fundamentals-fixedconv
      • Scaled means that the integer value is simply converted to float. So passing a value of 1234us will result in a value of 1234.0 in the shader.
    • Previously, only C4b colors could be passed as normalized fixed-point values. This release extends this feature to any integer-based scalar, vector and color type. The new BufferView.Normalized property determines whether the data are interpreted as normalized or scaled. By default, Normalized is true to be backwards compatible with the old behavior for C4b. Note that this property only has an effect if the attribute is floating-point based and if the input data are integral.
    • If attribute data are incompatible with the shader, a meaningful exception will be thrown. With the OpenGL backend it is possible to accidentally (or purposefully) provide double data for float-based attributes. This may impact performance negatively, so a warning is printed if debugging is enabled:

      [GL] attribute 'Positions' expects Aardvark.Base.V4f elements but Aardvark.Base.V3d elements were provided. Using double-based attribute types may result in degraded performance.

    • SingleValueBuffer is now generic, making it possible to set attributes other than V4f. Likewise, Sg.vertexBufferValue accepts any unmanaged value (https://github.com/aardvark-platform/aardvark.rendering/issues/27).
  • Fixed issues related to backface culling (https://github.com/aardvark-platform/aardvark.rendering/issues/101):
    • Added Sg.frontFacing and made Sg.frontFace obsolete. To migrate to the new function the winding order has to be reversed (e.g. use WindingOrder.reverse)
    • The shader input gl_FrontFacing (via FrontFacingAttribute) now has the correct value. Note: For the GL backend the value was flipped in previous versions, for the Vulkan backend the behavior is unchanged.
    • Some IndexedGeometryPrimitives have had their winding order fixed and made consistent. solidPhiThetaSphere had clockwise winding order, which is back facing for default pipeline states. solidCoordinateBox, solidBox and solidTetrahedron had some faces with clockwise winding order.
  • Improved validation of uniform inputs. If a texture / buffer is missing or has an invalid type, an exception will be thrown instead of just logging an error. This will make it easier to find bugs that may have gone unnoticed before.
  • Added IRuntime.Blit : src : IFramebufferOutput * srcRegion : Box3i * dst : IFramebufferOutput * dstRegion : Box3i -> unit which allows copying data from a texture / renderbuffer region to another with support for scaling and mirroring. The IRuntime methods Copy (with IFramebufferOutput parameters) and ResolveMultisamples are now implemented as extensions that use Blit internally.
  • Converted TraceObject and TraceInstance module functions into static methods with overloads.
  • Removed traceObject and traceInstance builders. Use the static methods of the corresponding type instead.
  • Added singleton pattern for NullTexture and marked its constructor as obsolete. Use nullTexture or NullTexture.Instance instead.
  • Added UniformMap for building uniform providers with type checks and implicit casts that are required by the backend.
  • RaytracingPipelineState uses IUniformProvider instead of a map.
  • IRaytacingTask.Update and Run use RenderToken now.
  • Fixed various issues and memory leaks in Aardvark.GPGPU.
  • Removed TextureLayout.Sample, use TextureLayout.ShaderRead instead.
  • Removed Queries struct to combine multiple queries. RenderToken now simply contains a list of IQuery objects.
  • RenderObject is now a proper class instead of a record (https://github.com/aardvark-platform/aardvark.rendering/issues/58). A render object can be constructed in one of three ways:
    • Default constructor (e.g. let ro = RenderObject()) which generates and assigns a new unique id. This is equivalent to RenderObject.Create().
    • Copy constructor (e.g. let ro = RenderObject other) which creates an exact copy including the id.
    • Cloning (e.g. let ro = RenderObject.Clone other) which creates a copy with a new unique id. This is equivalent to let ro = { other with Id = newId() }.
  • Removed Sg.ofIndexedGeometryInterleaved (was broken since 5.1)
  • Fixed padding of 2x2 and 2x3 matrices when used as uniforms.
  • [Vulkan] Implemented dynamic / changeable shaders (https://github.com/aardvark-platform/aardvark.rendering/issues/76).
  • [Vulkan] Reversed winding order of tessellated triangles to be consistent with OpenGL backend.
  • [Vulkan] Added RuntimeConfig.DepthRange (https://github.com/aardvark-platform/aardvark.rendering/issues/66)
  • [GL] Moved Config.NumberOfResourceContexts to RuntimeConfig
  • [GL] Moved Config.DepthRange to RuntimeConfig
  • [GL] Removed RuntimeConfig.ShareBuffersBetweenTasks and RuntimeConfig.ShareTexturesBetweenTasks flags. The code path that was used when setting any of them to false was broken.
  • [GL] Marked Context.CurrentContextHandle obsolete. Use ContextHandle.Current instead. Both use the same thread-local object now. Previously, the thread-local behind the Context member did not properly track all context handle changes (i.e. when calling MakeCurrent() on a context handle directly).
  • [GL] Added RuntimeConfig.AllowConcurrentResourceAccess to disable global resource lock for compute and render tasks. AbstractRenderTask.ResourcesInUse has been removed. For GL use GlobalResourceLock.using instead.
  • [GL] Moved ResourceCache and ResourceInputSet from base project and made internal.
  • [GL] Fixed issue with resource manager and typed buffers.
  • [GL] Removed dead code from resource manager.
  • [GL] Removed unused pUniforms from PreparedPipelineState and UniformLocation.
  • [GL] Added support for null textures with any bind target (e.g. 3D)
  • Removed InputSet.
  • [GL] Fixed minor memory leaks in render tasks.
Clone this wiki locally