Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Is it possible for the Crystal_TimeCycle() method to exclude specific objects or instances from being affected?

Hello!

The day and night cycle only changes ambient light (using LUTs), so you have a few options to do this:

A) Add an emissive material;
B) Add a direct light (with the same depth and litType = LIT_EQUAL);
C) Draw it in the combine pass, using crystal_pass_submit;

Thank you. I have another question: When I add an outline shader in the draw event, it causes issues with the rendering of lighting and shadows. How can I correctly use the shader without affecting the display of lighting and shadows?

Hmm, any shader should work normally, I suspect it might be the alpha testing? (gpu_set_alphatestenable etc)

Could you show how you're doing this on Discord? 


The first image shows the mouse is not on the chair, while the second image shows the mouse placed on the chair. An outline shader has been added to the second image. I don't understand why this is happening—gpu_set_alphatestenable is set to true.

(1 edit)

See: 2. When a transparent object passes over another, it occludes

"If you are using shader_set(), you may have to do the alpha test manually within the fragment shader. This is because GameMaker does not add the DoAlphaTest() function to the shader internally"

(+1)

Thank you, I will check the shader code.

it's worked,thank you!

Very nice! :D