martindzejky / pizza-game

Ludum Dare #51
1 stars 0 forks source link

Dough mask #10

Open martindzejky opened 1 year ago

martindzejky commented 1 year ago

Implement a sprite mask for the dough. The dough is also a mask for all ingredients which would prevent ingredients being displayed outside of the pizza.

martindzejky commented 1 year ago

https://docs.godotengine.org/en/stable/tutorials/shaders/shader_reference/canvas_item_shader.html#light-built-ins

martindzejky commented 1 year ago

I just spent around 2 hours trying to understand the shaders and how the 2D lights work in it. No matter what I do, it seems to be broken. I cannot access the lights in the fragment shader, therefor all I can do there is to render the original sprite. Then in the light function, no matter what I do I cannot access the light texture. And in render_mode light_only, I cannot get anything to display...

Incredibly frustrating, I'm giving up for now.