Khas Advanced Graphics


This is my graphics enhancement plugin for RPG Maker MV, which includes deferred lighting and procedurally generated fog. Both systems are processed by your graphics card with GLSL shaders, so you will get great performance and awesome eye candy.

This plugin requires WebGL. There’s no way around this.
Old save files will not work correctly with this plugin.

Easy to use!
Deferred lighting
Lights are created from images – you can create them in any shape you want!
Two light blend modes: stock and custom
All effects are rendered using GLSL shaders
Adaptive exposure – simulates de human eye reacting to drastic lighting changes
Comes with 23 lights and 3 fogs. You can easily add more!
Procedurally generated fog – it’s dynamic and it looks awesome
Variable fog density around the player

Click to enlarge.

You can get the download links here (click me!)

Is this a port of your Ultra Lighting script for RPG Maker VX Ace?
A few weeks after I released Ultra Lighting, the RPG Maker MV was released. Since then, people have been asking me to port my lighting engine to MV. I was very excited after I heard the new RPG Maker supports WebGL, so I started trying to make a new version a year ago. Unfortunately, a lot of personal issues and lack of time came in the way. But now it’s finally done! I spent more than 70 hours making this plugin. I had a long list of ideas I wanted to implement, so I did my best for each of them.

Your previous lighting engine had dynamic shadows. Why this plugin doesn’t have them?
Technical reasons. With Ultra Lighting I had complete control over the light rendering, with nothing in between the lights and KGL (my library for rendering inspired by OpenGL). However, things in RPG Maker MV are more complex than in its predecessor. There’s the MV engine, then Pixi.js and then WebGL. Thus, I had both the limitations of the MV engine and of the Pixi.js to work with. The biggest barrier was that Pixi is great to render bunnies and other sprites, but it’s terrible to generate geometry, especially dynamic geometry. If I wanted to render shadows in the same way I did in my previous engine, I would need to edit the Pixi engine, which is not a good thing and could be very unstable (I tried). The other option would be to implement a technique similar to shadow mapping, which was my dream once I heard about MV’s OpenGL capabilities. Unfortunately, again, Pixi.js doesn’t use depth buffering (this buffer holds an extra dimension data, z in RPG Maker’s case), so this discards the possibility entirely. It would require a massive edit on Pixi and MV’s engine. As my top priority is to create something reliable, I had to discard shadows. I’m sorry.

I got this error "TypeError - Cannot set property 'CUSTOM_KHAS' of undefined". How do I fix it?
Update your RPG Maker MV. The version of your Pixi.js is outdated.

Is this plugin fast? Is it faster than other MV Lighting plugins?
Yes! Lighting is super fast and won't have any performance impact in your game. Fog, however, requires a more modern GPU (because it's procedural). I'll add low, medium and high Graphics options in the future, so that won't be a problem anymore. You can read more about it and check a benchmark against other lighting system here (click me!).

Does this plugin use layers to add this effect?
Nope. I implemented a technique similar to deferred shading, which renders all the lights to an off-screen framebuffer, and then I use GLSL Shaders to compose the final scene with correct lighting and fog. So there's no additional layers.

Update Log
03.03.2017 R3 Khas Advanced Graphics updated to 1.1
* MV updated to 1.3.5
* Requires Khas Core 1.2
* Added compatibility with zoom controls (zoom in only!)
* Added compatibility with different tile sizes
* Added Pixi.js version checking (requires v3 or later)
* Fixed event not turning off light on page switch
* Added commands to create lights with region tags and terrain tags
* Fixed lighting/fog being applied to pictures
* Performance tweaks
* Fixed shader problems with opacity and exposure

01.24.2017 R2 Khas Advanced Graphics updated to 1.0.1
* Fixed bug: inverted lighting/fog on menu screen

01.22.2017 R1 Khas Core.js updated to 1.1
* Fixed bug: erase event / empty event

01.20.2017 R0 Version 1.0 released!