Giter Site home page Giter Site logo

jujuadams / bulb Goto Github PK

View Code? Open in Web Editor NEW
82.0 11.0 10.0 6.63 MB

2D lighting and shadows for GameMaker 2022 LTS

Home Page: http://www.jujuadams.com/Bulb/

License: MIT License

NSIS 5.93% Game Maker Language 88.77% GLSL 5.30%
gamemaker gms2 example lighting shadows

bulb's Introduction

bulb's People

Contributors

juju-adams avatar jujuadams avatar lexpest avatar zice-o-lantern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bulb's Issues

Feature proposal: Light/Shadow Masking

I asked you about it a while ago. So this is just in case you find a way for this feature...

Light/Shadow Masking : In 2d game with side view, it might be useful to have the lights/shadows displayed only on the assets that are imediately behind the light (close to it) and not displayed on those that are far away.

Screenshot_20230116-195833_Discord
In this case shadows from the light orb cast on the yellow wall and not on the background blue sky.

As user, maybe we could use a .add_masking_layer() to add layers as masks and tell Bulb its elements should be used to build the masking surface....

Lights with `.castShadows` set to `false` still cast shadows

Hello there Juju,

In the demo project, if I turn castShadows to False in Lights and iterate on lighting modes, Lights will continue to cast shadows except for Soft alpha Clip bm_add.

I downloaded the latest demo 20.5.0.
In oLightDiscooooI Object create event, I set light.castShadows = false;
I only keep one light instance and delete the step event to see what I'm doing

I run the demo and in the rmTest Room, I iterate over lighting modes using the [2] key
All modes (but Soft alpha Clip bm_add) continue to cast shadows

(In fact I was trying to reproduce in the Demo a bug I have in my project (where when I set castShadows to false, my light fully disappear) but got this result instead. I'll investigate further...

A bug that doesn't appear often

Hello! Sometimes such a bug appears and disappears by itself, or after you move the window with the mouse. It appears under different conditions, in different places. How to catch him?
Screenshot_15

An object without shadows and light

Hello! Is it possible to draw an object in the middle of a darkened room that would not be darkened? It is necessary to show a hint object for the player, so that it is not affected by light and shadows.

Typo... I think

In the accumulateHardLights() method from BulbRenderer class, shouldn't line 588 be:
if (mode == BULB_MODE.HARD_BM_MAX or mode == BULB_MODE.HARD_BM_MAX_SELFLIGHTING)
Instead of:
if (mode == BULB_MODE.HARD_BM_MAX)

To use BM_MAX for both standard and selflighting ?

M

Shadows flicker on BULB_MODE.SOFT_ADD

When using SOFT_ADD bulb mode, shadows flicker. This behavior happens on both export targets I tried (Windows and HTML5). Tested with the Bulb.yyp sample project downloaded from the Github page itself, and confirmed with my sample project. When switching to any other bulb modes, it works fine.

A (kinda low bit) GIF showing the behavior with SOFT_ADD and with the next mode (HARD_BM_ADD) can be viewed here: https://ibb.co/G2Q6pQh

Tested on an mobile Nvidia RTX 2080 Max-Q using Gamemaker Studio 2 IDE v2.3.2.560 and runtime 2.3.2.426.

Blocky soft shadow rendering near penumbra potentially with AMD Cards

Hello, thanks for the wonderful lighting engine. I am having a slight issue.

image

There seems to be an issue rendering shadows that shows up on one computer but not another. One difference between the two that may affect this may be the difference in graphics cards, Vega 64 vs GTX1080, where the Vega 64 computer shows this issue and the GTX1080 computer does not. It also seems to favor glitchy rendering on the "left" side of the shadow.

Thanks again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.