Need help with blur function
-
Here I have a simple program that displays cards, under the card I put a black rectangle to look like a shadow. It looks OK, but would be nicer to see a blur Fx added to the black rectangle...I tried the rendereffect (box, framebuffer, fx_motionblur, [1/1280, 1/720] , but I cant seem to get it to work...Can anyone see what went wrong ?..........
clear(darkGreen) card = createSprite ( ) deck = loadImage ("Kenney/boardgames") setSpriteImage (card, dack) setSpriteLocation (card, gwidth/2-500, gheigh/2) setSpriteAnimation (card, 0, 67) tile = 15 loop c = controls (0) if c.a and tile < tiles - 1 then tile += 1 endif setspriteschale (card, 3, 3) //.................................................................................... box(580, 95, 430, 570, black, false) // this is the rectangle // I think the rendereffect goes here, but I keep getting varible does not exsist // rendereffect (box, framebuffer, fx_motionblur, [1/1280, 1/720]..?? //...................................................................................................... if tile == 54 then tile += 1 endif drawSprites update ( ) repeat
-
@kendog400 Render effect doesn't quite work like that. You have to draw first to an image and then use rendereffect to draw the image to the frame buffer using that effect. Check out the example here: https://fuzearena.com/help/view/renderEffect
-
Is there some sort of opacity Fx ?
-
@kendog400 The effects are the ones listed. I am not sure what they all do. You can set the opacity of a colour using the alpha value of the colour { r, g, b, a) where r,g,b and a are all between 0 and 1
Try this for your box
box(580, 95, 430, 570, {0, 0, 0, 0.5}, false)
-
I'e looked all over the help section trying to find the while ! command,
seems though its not there ?....I've looked in the tutorials...
Is it hidden somewhere ?.... -
@kendog400 Not really it is just the normal while command but testing for the condition to be false rather than true before entering the loop