Hi,
I have game sprites with shadows like this: (1x texture / 4x sprites)
And during rendering there is classic problem:
I tried combinations for blending in sf::BlendMode - factor and equation, also without changing alpha color or so but without any results. Is possible solve it simply with blendmode or shaders are needed?
Code for drawing sprites:
procedure spr_Draw_Alpha
( renderWindow
: PsfrenderWindow
; sprite
: PsfSprite
; x
, y
: single
; alpha
: byte
; RenderStates
: PsfRenderStates
= nil
); var
pos
: sfVector2f
; color
: sfColor
;begin
if not Assigned
( sprite
) then
exit; pos.
x := x
; pos.
y := y
; color.
A := Alpha
; sfSprite_setColor
( sprite
, Color
); sfSprite_setPosition
( sprite
, pos
); sfRenderWindow_drawSprite
( renderWindow
, sprite
, RenderStates
);end
;