Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 1.93 KB

File metadata and controls

78 lines (51 loc) · 1.93 KB

Graphics and Rendering Notes

This document summarizes graphics and rendering techniques used in Bridge.

Texture Sharing

Bridge implements efficient texture sharing between JavaScript/browser contexts and Unity:

Zero-Copy Techniques

Zero-copy approaches avoid unnecessary data copying between processes:

  • WebAssembly shared memory
  • IOSurface on macOS/iOS
  • SurfaceTexture on Android
  • WebGL texture binding

Key files:

OpenGL Integration

Bridge leverages OpenGL for cross-platform graphics:

  • Texture binding between browser and Unity
  • Custom shaders for rendering web content
  • WebGL integration

Key files:

Shader Development

Bridge includes custom shaders for various rendering needs:

  • Skybox shaders for panoramic content
  • Material conversion between JavaScript and Unity
  • Custom effects for VR/AR

Key files:

Platform-Specific Graphics

macOS/iOS Graphics

  • Metal integration
  • IOSurface for texture sharing
  • WKWebView rendering capture

Android Graphics

  • OpenGL ES integration
  • SurfaceTexture
  • Hardware acceleration considerations

Windows Graphics

  • DirectX integration
  • Spout for texture sharing

Key files:

Unity Graphics Integration

Bridge extends Unity's graphics capabilities:

  • Texture2D creation and updates from JavaScript
  • Canvas rendering to Unity textures
  • WebGL integration

Key files: