Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excluding objects from light sources #70

Open
CrossroadInTheVoid opened this issue Jan 21, 2024 · 1 comment
Open

Excluding objects from light sources #70

CrossroadInTheVoid opened this issue Jan 21, 2024 · 1 comment

Comments

@CrossroadInTheVoid
Copy link

Is there any way to exclude objects from light source?
I've noiced that at least in old versions of 3DreamEngine SpriteBatches are affected by light sources and when they have their own emission, they become too bright.

@Luke100000
Copy link
Collaborator

Yes, no light equals black albedo color, so you can set the color to black.

For example a candle flame:

local spriteBatch = dream:newSpriteBatch(texture, texture)
spriteBatch.material.color = {0, 0, 0, 1.0}

The same emission texture is used for albedo, but we effectively only use the alpha channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants