Simple zoom shader

  • Posts: 177
2 years 4 months ago #1 by luluco250
I've seen a couple of requests for a zoom effect, or the inverse of it, so idk if this kind of effect has been posted here before but here it is for those who need it: Zoom.fx
You'll also need this file: KeyCodes.fxh

You can download the files by right-clicking on the "Raw" button and then "Save link as..."

Here are the configuration macros:
  • ZOOM_KEY: What key to use to control the effect, check out KeyCodes.fxh for valid key names. All keys follow the KEY_XXX naming scheme, like KEY_ALT, KEY_N, KEY_ENTER etc.
  • ZOOM_TOGGLE: Whether the key toggles zooming or must be held instead. Can be true or false.
  • ZOOM_FILTER: What filter to use when sampling the zoomed image, can be POINT or LINEAR.
  • ZOOM_MOUSE_BUTTON: Define this with a valid mouse button in order to use it instead of a keyboard key. Undefine (remove) it to use a key instead. Can be MOUSE_LEFT, MOUSE_RIGHT or MOUSE_MIDDLE.

  • Enjoy.
The following user(s) said Thank You: DeMondo, Sunesha
The topic has been locked.
  • Posts: 1
1 year 8 months ago #2 by master77
One question, how can I change the zoom.
The topic has been locked.
  • Posts: 221
1 year 8 months ago #3 by Sunesha
Thank you. I wanted something like this. Sometimes it is just hard to read small text in games.
The topic has been locked.