Skip to content

Conversation

@rudrabeniwal
Copy link
Collaborator

@rudrabeniwal rudrabeniwal commented Sep 28, 2025

This merge request delivers the GSoC 2025 by implementing a real-time Vulkan rendering pipeline supporting interactive scene rendering to windows, data streams, and files.

Key Changes and Features

A new module, cyfra-rtrp (Real-Time Rendering Pipeline), has been added with the core components of this system.

1. High Level Window & Surface Management

  • WindowManager: A high-level manager (cyfra-rtrp/window/WindowManager.scala) that integrates the window system with the Vulkan context.
  • GLFWWindowSystem: Concrete implementation using GLFW (cyfra-rtrp/window/platform/GLFWWindowSystem.scala) for cross-platform compatibility.
  • SurfaceManager: Manages the connection between native windows and Vulkan rendering surfaces (cyfra-rtrp/surface/SurfaceManager.scala), abstracting away platform specific details.

2. Swapchain

  • SwapchainManager: Manages the lifecycle of the Vulkan swapchain, including creation, recreation on window resize, and image presentation (cyfra-rtrp/SwapchainManager.scala).

3. Graphics Pipeline

  • GraphicsPipeline: Sum up the complex state of a Vulkan graphics pipeline, including vertex/fragment shaders, vertex input descriptions, viewport/scissor state, and rasterization settings (cyfra-rtrp/graphics/GraphicsPipeline.scala).

4. Hybrid Compute and Graphics Rendering

  • Compute-to-Texture: The example runs a Cyfra compute shader (a GFunction) to generate data or a texture, and then sample that texture in a graphics fragment shader.
  • Example Implementation: The rtrpExample (cyfra-rtrp/rtrpExample.scala) demonstrates this by running a compute shader each frame to generate an animated texture, which is then rendered onto a quad and displayed in a window. The updateDataBufferWithCompute method shows how a GFunction is executed to a GPU buffer before the graphics commands are submitted.


Screenshot 2025-09-29 041846

bufferWidth = 16 looks cute

This work lays a foundation for future graphics development in Cyfra, enabling a wide range of realtime applications from data visualization to games

rudrabeniwal and others added 30 commits June 15, 2025 09:56
SpirvTools are now integrated into the flow.
* Added "-feature", "-deprecation", "-unchecked", "-language:implicitConversions" to scalacOptions

Whole code base should now use Scala3 new syntax and significant indents. If anyone sees unnecessary {} that I missed, please get rid of them.
@rudrabeniwal rudrabeniwal changed the title cyfra-rtrp Cyfra: Real-time Rendering Pipeline Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants