Description

This is a normal map lighting engine using deferred rendering, made and designed for GameMaker Studio 2.

Features:

  • Easy to drop into any project and implement lighting
  • Highly optimized
  • Supports sprites and tilemap layers
  • Supports Spine Animations with a tool to streamline the process! (download)
  • Supports custom drawing
  • Includes Cel Shading option
  • No set limit on number of lights (and performance doesn't take much of a hit for more)
  • Includes functionality for Specular Highlights and Ambient Occlusion

What does this do for you?

Normal map lighting makes your flat 2d world pop out and look 3d. Specular highlights give sprites shininess like metallic armor or glass. Ambient occlusion gives sprites realistic shadows that disappear in light.

How do you use it?

Manual covering all the functions in detail.

\\\create event lighting controller object
if(view_enabled){
lighting_init(camera_get_view_width(view_camera[0]),camera_get_view_width(view_camera[0]),true,true);
} else {
lighting_init(room_width,room_height,true,true);
}

\\\draw end event lighting controller object
lighting_draw_all();

\\\create event player
lighting_instance_create();
lighting_instance_normals(sprPlayerNormals);
lighting_instance_specular(sprPlayerSpecular);
lighting_instance_ao(sprPlayerOcclusion);

\\\draw event player
draw_self();
lighting_instance_add();

\\\create event light
lighting_light_create(true);
lighting_light_radius(64);

\\\draw event light
lighting_light_add();

It's as easy as that!

For spine support, I created a tool (download) to generate the required code and materials. Takes the spine atlas image, atlas file, and json file and exports the creation code for the object and a map. Spine lighting has never been easier to add!

If you have any questions, concerns, or requests, post to the forums.

End User Licence Agreement (EULA).

Version 1.1.0. Published January 8, 2018

Age Rating: 4+

Average Rating

This asset hasn't received enough reviews yet.

Your review

You can only review assets you've bought.

No reviews yet

No reviews have been left for this asset - be the first!

Package contents

Total size 10.3 KB

assetpackage.yy 7.84 KB scripts
cel_shading_end cel_shading_set cel_shading_start lighting_draw_all lighting_hook lighting_init lighting_instance_add lighting_instance_ao lighting_instance_bonemap lighting_instance_create lighting_instance_custom lighting_instance_normals lighting_instance_specular lighting_instance_spine lighting_instance_tilemap lighting_light_add lighting_light_color lighting_light_create lighting_light_direction lighting_light_radius lighting_set_ambience lighting_spine_draw lighting_spine_get_bone_states readme
shaders

What is the issue?

Back to Top