bold area in overlapping two sprites with low alpha

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Sadra

hello friends. I’m trying to make a custom shadow system for my game objects to have shadows exactly look like their sprites cause godot’s default light and shadow system doesn’t do that . so I added a second sprite for my objects with textures equaled their main sprite texture with black color and low alpha . the problem is when objects get close together , a bold black area appears in their common shadow collided field .I don’t know if i could make you understand what i mean or not but anyway I tried to solve this with putting shadow sprites in a parent node calls " Shadows " . then I adjusted the shadow sprites alpha to max and then I decreased the parent node opacity but the bold area was still existing. I tried draw functions like draw_primitive() too but nothing changed . I don’t have idea if I am doing this the right way or not but I would be very grateful if you could help me to make this shadow system properly

:bust_in_silhouette: Reply From: Inces

Experiment with render options in shader code :

Perhaps it would be blend_disabled

thanks for your answer.
I wrote this lines of code in shader material scripts for two shadow sprites :
shader_type canvas_item ;
render_mode blend_disabled ;
but unfortunately the problem was not solved I hope I did it right the way as you said

Sadra | 2022-08-29 13:34

try other render modes too. You need to experiment a little. The one thing we know, is that your problem originates in shader blending module.

Inces | 2022-08-29 15:18