Home
Softono
Derez

Derez

Open source MIT Lua
17
Stars
2
Forks
1
Issues
1
Watchers
10 months
Last Commit

About Derez

Low resolution output (downsampling) for Defold

Platforms

Web Self-hosted

Languages

Lua

Links

logo_32

Derez

A render script for Defold (1.7.0) that draws to a low-resolution render target in 2D or 3D. It handles resizing the window by maintaining an internal vertical resolution.

After setting the render file to /derez/derez.render in the bootstrap settings, add /derez/derez.go to the main collection. The resolution_y property in the script for derez.go sets the vertical resolution for the project. The resolution can also be changed during runtime like so:

msg.post('@render:', 'set_resolution', {new_y = 240})

Installation

To install Derez into your project, add one of the following links to your game.project dependencies:

API

Derez is ready to receive these render messages in scripts:

  • msg.post('@render:', 'set_resolution') - Changes the vertical resolution Derez uses for rendering
  • msg.post('@render:', 'clear_color') - Changes the clear color
  • msg.post('@render:', 'use_camera_projection') - Enables 3D perspective view from a camera (default message)
  • msg.post('@render:', 'use_2D_projection') - Disables 3D perspective view, returning to default