NPR Studio is a WebGL-powered application that allows users to stylize images using ausing a wide range of Non-Photorealistic Rendering (NPR) techniques. It includes advanced filters such as eXtended Difference of Gaussians (XDoG), Anisotropic Kuwahara Filtering, Flow-Based Bilateral Filtering, and many more. Explore and expreiment different artistic effects directly in the browser
-
Composite Styles (multiple render pass):
-
Non-Composite Styles (single render pass):
- Sobel Edge Detection
- Gaussian Blur (1D-Convolutions)
- Sharpening, Embossing
- Dithering
- Pixelization
- Quantization & Luminance Quantization
- Grayscale
- Binary Thresholding
- Kuwahara Filter
- Generalized Kuwahara Filter
β¦and more GPU-based shader effects.
- Zoom (mouse wheel, shortcuts, UI)
- Pan (drag or shift+wheel)
- Fit to Screen / Reset View
- Undo & Redo (WebGL framebuffer history stack)
- Real-time slider controls for all filter parameters
- Drag-and-drop image uploading
- Export processed result as the initial uploaded format
- React (State management and context provider)
- TypeScript
- CSS Modules
- WebGL2 β GPU-accelerated 2D/3D rendering
- GLSL β Shader programming language for image effects
- Vite
- NPM
| Original | XDoG Filter |
|---|---|
![]() |
![]() |
| Original | Anisotropic Kuwahara Filter |
|---|---|
![]() |
![]() |
| Original | Coherent Line Drawing (CLD) Filter |
|---|---|
![]() |
![]() |
git clone https://github.com/G3rarrd/NPRStudionpm installnpm run devnpm run buildInstall serve if you donβt have it
npm install -g serveThen run to preview the application locally
serve -s dist- Drag and drop an image onto an upload area, or click the upload area to select a file at the start of the application
- Supported formats: PNG, JPEG, JPG.
- Select the filter options on the menu bar to add an effect to your image
- Adjust filter sliders (some don't have) based on your preference.
- Zoom β
alt + mouseWheel - Pan β
Hold down the mouse wheel on the canvas - Fit to Screen / Reset View β Use view buttons in the menu bar
- Undo -
ctrl+z - Redo -
ctrl+shift+z
- Click the File button in the menu bar and select Export to download the file or Open to load a new image back to top
βββ App.css
βββ App.tsx
βββ assets/ # Icons, logos
βββ features/
β βββ image_processing/ # Main image processing editor
β βββ components/
β β βββ image_processing_context/ # Context manager of the editor
β β β βββ image_processing_context.tsx
β β β βββ image_processing_provider.tsx
β β βββ image_processing_upload/ # image drag-and-drop + file handling.
β β βββ components/
β β β βββ image_processing_upload_area/
β β βββ image_processing_upload_area.css
β β βββ image_processing_upload_area.tsx
β βββ image_processing_canvas/ # Canvas using WebGL2 API
β β βββ hooks/
β β β βββ useWebGL2DCamera.ts # handles zoom and pan done on the canvas
β β βββ image_processing_canvas.css
β β βββ image_processing_canvas.tsx
β βββ image_processing_index.css
β βββ image_processing_index.tsx
β βββ image_processing_menu_bar/
β β βββ components/
β β β βββ image_processing_create_new_btn/
β β β βββ image_processing_edit_btn/
β β β βββ image_processing_file_btn/
β β β βββ image_processing_filter_btn/
β β β βββ image_processing_home_btn/
β β β βββ image_processing_view_btn/
β β βββ image_processing_menu_bar.module.css
β β βββ image_processing_menu_bar.tsx
β βββ image_processing_tool_bar/
β βββ components/
βββ hooks/
β βββ useUpload.ts
βββ index.css
βββ layouts/
β βββ image_processing_layout/
β βββ hooks/
β βββ image_processing_page_layout.module.css
β βββ image_processing_page_layout.tsx
βββ main.tsx
βββ pages/
β βββ homes.tsx
β βββ noPage.tsx
β βββ studio.tsx
βββ services/
βββ types/
β βββ slider.ts
βββ engine/ # Image Processing Engine (Core of the application)
β βββ Scene/ # Displays image on the canvas (rendering orchestrator)
β βββ ShaderCodes/ # Contains shader codes of composite and non composite styles
β βββ framebuffer_textures/ # Creation and management of framebuffers and textures
β βββ math/
β βββ random.ts
β βββ webGLCore.ts
β βββ webGLImageExporter.ts
β βββ webGLToneMapping.ts
βββ vite-env.d.ts
- Implementation of a node editor that allows the combination of multiple stylizations. Possible libraries include (Rete.js, React Flow, and LiteGraph.js)
- Addition of other Non-Photorealistic Rendering Techniques
Contributions are welcomed! Please feel free to submit pull requests, report bugs, or suggest new features.





