All Projects → mausimus → ShaderGlass

mausimus / ShaderGlass

Licence: GPL-3.0 license
Overlay for running GPU shaders on top of Windows desktop

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to ShaderGlass

retro-home
Retro Home; your home for retro-gaming 🕹
Stars: ✭ 76 (-81.77%)
Mutual labels:  retro, retroarch, libretro
retropie-overlays
Console overlays set for Retropie & Recalbox
Stars: ✭ 54 (-87.05%)
Mutual labels:  overlay, retroarch, libretro
Glsl Godrays
This module implements a volumetric light scattering effect(godrays)
Stars: ✭ 155 (-62.83%)
Mutual labels:  shaders, shader
Lowpolyshaders
Unity shaders optimized for Low Poly models.
Stars: ✭ 157 (-62.35%)
Mutual labels:  shaders, shader
Spirv Vm
Virtual machine for executing SPIR-V
Stars: ✭ 173 (-58.51%)
Mutual labels:  shaders, shader
Epsxe64ubuntu
Install ePSXe Linux (x64) & shaders using BIOS HLE and Core Plugins on x86-64 Debian, Ubuntu, Linux Mint and their derivatives.
Stars: ✭ 130 (-68.82%)
Mutual labels:  shaders, shader
Retrosuite3d
Some image effects and shaders to achieve a retro look in Unity
Stars: ✭ 132 (-68.35%)
Mutual labels:  shaders, retro
shaderplace
Real-time collaborative GLSL livecode editor
Stars: ✭ 43 (-89.69%)
Mutual labels:  shaders, shader
Hlslexplorer
See how hardware understands your HLSL
Stars: ✭ 91 (-78.18%)
Mutual labels:  shaders, shader
Methanekit
🎲 Modern 3D graphics made simple with cross-platform C++17 meta-API on top of DirectX 12 & Metal (Vulkan is coming)
Stars: ✭ 197 (-52.76%)
Mutual labels:  shaders, directx
The Forge
The Forge Cross-Platform Rendering Framework PC Windows, Linux, Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
Stars: ✭ 2,710 (+549.88%)
Mutual labels:  shaders, directx
godot-psx-style-demo
Demo project featuring a collection of PS1 style shaders and materials for Godot engine.
Stars: ✭ 266 (-36.21%)
Mutual labels:  shaders, retro
Shadergum
Unity3D GPU Sculpt & Morph
Stars: ✭ 125 (-70.02%)
Mutual labels:  shaders, shader
Unitylibrary
📚 Library of all kind of scripts, snippets & shaders for Unity
Stars: ✭ 1,968 (+371.94%)
Mutual labels:  shaders, shader
Unity Texture Curve
✏️ Example showing how to bake an AnimatedCurve into a Texture and use it in a shader.
Stars: ✭ 149 (-64.27%)
Mutual labels:  shaders, shader
Vertexshaderart
The repo for vertexshaderart.com
Stars: ✭ 107 (-74.34%)
Mutual labels:  shaders, shader
Rimlight
Customizable rimlight shader for Unity that includes pulsation and noise scrolling. Give your scenes that extra oomph!
Stars: ✭ 170 (-59.23%)
Mutual labels:  shaders, shader
Dxbc2Dxil
DEPRECATED. DXBC to DXIL (HLSL Bytecode to LLVM IR) using internal APIs.
Stars: ✭ 21 (-94.96%)
Mutual labels:  shaders, directx
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+2705.28%)
Mutual labels:  shaders, shader
Go Ngine
[2013, incomplete] the goal back then: "a Go-native, modern-OpenGL real-time 3D rendering engine" ➜ I think it's still a solid *basis* for one; the real "meat" is in `___old2013` ➜ project stalled out as my focus shifted elsewhere from 2014
Stars: ✭ 78 (-81.29%)
Mutual labels:  shaders, shader

License GitHub Stars Downloads Latest Release

ShaderGlass

Overlay for running GPU shaders on top of Windows desktop.

Features

  • applies shader effects on top of any window on the desktop
  • includes RetroArch shader library covering:
    • CRT monitor simulation
    • image upscaling
    • TV / VHS simulation
    • softening, denoising, blur, sharpen and many more
  • works with most emulators, retro platforms and pixel art editors including:
  • excellent companion for pixel art drawing showing shaded and/or aspect-ratio corrected preview
  • you can even use it on top of YouTube, Twitch or modern games
  • saving and loading profiles
  • multiple operating modes, including borderless fullscreen

Download

Latest release (v0.7, 19 Dec 2021):

  • load .png/.jpg image file as input
  • lock capture area to clone a portion of the screen
  • free resizing & scaling support in Windowed Clone mode
  • option to account for display DPI scaling in pixel size adjustment
  • shader fixes

https://github.com/mausimus/ShaderGlass/releases/download/v0.7/ShaderGlass-0.7-win-x64.zip


Follow ShaderGlass on itch.io for latest updates.


Requirements

  • Windows 10, version 2004 (build 19041) or Windows 11
    • will work on version 1903 but in limited capacity (no Desktop Glass mode)
    • Windows 11 allows the removal of yellow border around capture
  • DirectX 11-capable GPU

If the app reports missing libraries please install Visual C++ Redistributable 2019


See it in action

Demonstration video (YouTube):

ShaderGlass

Screenshots

Desktop Glass mode

In this mode a transparent floating window will apply a shader to anything behind it. This mode is not OBS-friendly, use Window Glass or Clone modes to capture ShaderGlass. Requires Windows 10 2004 - on 1903/1909 you will see only a black window if you switch to this mode.

Wikipedia in Chrome processed by crt-geom shader which applies scanlines and CRT curvature.

screenshot

Window Clone mode

When capture is fixed to a specific window it's easier to tune scaling to match the input and image can also be recaptured (screenshot/OBS etc.)

FS-UAE

Amiga version of The Secret of Monkey Island (1990) running in FS-UAE with crt-interlaced-halation shader applied.

screenshot

Altirra

Ninja (1986) for the Atari XL running in Altirra with a TV-OUT simulation shader.

screenshot

Adventure Game Studio

The Crimson Diamond (2020), a modern AGS game softened using crt-fast-bilateral-super-xbr shader.

screenshot

DOSBox

Police Quest (1987) with its massive half-EGA pixels, aspect-ratio corrected and post-processed using newpixie-crt shader.

screenshot

Rick Dangerous (1989) with C64 monitor shader applied.

screenshot


Options

Currently supported options are:

  • Input -> Desktop - captures the whole desktop or an individual monitor, defaults to Glass mode

    • Lock Current Area - always capture current area even if ShaderGlass window is moved
  • Input -> Window - captures the selected window, defaults to Clone mode

  • Input -> File... - load a .png or .jpg file as input

  • Input -> Capture Cursor - whether to include mouse cursor in capture

  • Input -> Remove Yellow Border - disables yellow frame around captured area (forced security feature); currently only supported on Windows 11

  • Input -> Pixel Size - indicates the size of input pixels (pre-scaling), i.e. if you run a game in x3 scaling mode set this to x3 as well so that ShaderGlass can tell the original resolution

    • Adjust for DPI Scale - if your source always applies Windows DPI Scaling when displaying images (for example browsers) enable this option to take it into account; most emulators don't do this however
  • Output -> Mode - overrides default mode for the input type:

    • Glass (default for Desktop) - ShaderGlass window appears transparent, you have to position it over the window or area you'd like to capture

    • Clone (default for Window) - ShaderGlass copies the content of capture so you can position it anywhere; this mode is also faster and more compatible

  • Output -> Window - override mouse behavior:

    • Solid (default for Clone) - ShaderGlass window area is solid (traps mouse events), with the only exception of passing focus to captured window when clicked

    • Click-through (default for Glass) - ShaderGlass window area is transparent and clickable/scrollable-through to window(s) underneath

  • Output -> Scale - apply additional scaling to the output if you'd like it to be larger; using no pre-scaling and only output scaling should result in best performance

    • Free - allow manual resizing of ShaderGlass window (Window Clone and File modes only)
  • Output -> Aspect Ratio Correction - presets for common aspect ratio correction factors (DOS, etc.), applied horizontally to preserve scanline count

    • If you select Custom you can enter your own correction ratio expressed as pixel height (1.0 being square pixel). For example, in MS-DOS era a picture of 320x200 resolution (16:10) was displayed on a 4:3 screen meaning each pixel was 1.2x tall on screen, 1.2 = (16/10) / (4/3)
  • Output -> Frame Skip - in order to improve performance divide frame rate by n (capture is done at VSync rate)

  • Output -> Take Snapshot - export current picture in .png format

  • Output -> Fullscreen (Ctrl+Shift+G) - turn ShaderGlass into a topmost fullscreen borderless window, in Glass mode you will still see yellow outline around the screen but if you can use Window Glass (surrounding black bars) or Window Clone (top-left aligned) with your source then you can avoid yellow edges; press Ctrl+Shift+G to revert

  • Shader - choose RetroArch shader to apply, or none shader for testing

    • Parameters - show and modify active shader's parameters

You can save and load profile files which will store all the options. It's also possible to pass profile file path on the command line and ShaderGlass will load it on startup.


Command Line

ShaderGlass.exe [-p|--paused] [-f|--fullscreen] [profile.sgp]

You can pass profile filename as a command-line parameter to ShaderGlass.exe and it will be auto-loaded.

In addition -p will launch in paused mode, and -f will launch in fullscreen mode.


Tuning

In order to achieve the best effect it's necessary to tune parameters to match your input:

  • if you use scaling in your input, use nearest-neighbour (i.e. no smoothing) and set Input -> Pixel Size to match

  • moving/resizing the window slightly might also help find the best fit for downscaling pixels

  • use Window Clone mode if you can, it's fastest and most compatible; if you need mouse click-through use Glass mode

Always check that input is crisply pixelated using the "none" shader as there is often implicit scaling happening (for example even when Chrome displays an image at 100%, Windows DPI scaling is still applied). The none shader should display a pixelated image with no smoothing whatsoever, try to match Input Pixel Size setting with your input's size to achieve that.

Parameters

All shaders start using default Parameters as defined by their authors, but you can also tweak them using Shader -> Parameters menu option.

params

Emulators

Most emulators (DOSBox, FS-UAE, Altirra etc.) will capture mouse by default so you can use them in Window Clone mode. ShaderGlass window will remain topmost so just position it over the game window and Alt-Tab to the game to have mouse and focus captured.

ScummVM

ScummVM doesn't capture mouse cursor by default so for best results follow below steps:

  1. Use Window Clone mode, set Input/Output/Shader options to your liking
  2. Switch Output Window to Click-through
  3. Click or Alt-Tab to ScummVM game window so that it has focus
  4. Press Ctrl-M which will force ScummVM to capture mouse

This way you should have the mouse captured by ScummVM so that it remains within the game window until you press Ctrl-M again. You can apply output scaling and/or aspect ratio correction in ShaderGlass and enjoy the game.


Code

Built using Visual Studio 2019 using ISO C++ 20, Windows SDK 10.0.20348, Windows Capture API and DirectX 11.

ShaderGlass includes a limited implementation of RetroArch shader back-end. ShaderGen is a command-line tool for converting Slang shaders into .h files which can be merged into ShaderGlass. The conversion process requires:

  1. glslang for converting Slang/GLSL shaders to SPIR-V
  2. SPIR-V cross-compiler for converting those to HLSL (DX11 format)
  3. Direct3D Shader Compiler (fxc.exe) for pre-compiling into bytecode

Notices

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].