Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Scanline effect in 3d game?

Author
Message
hoyoyo80
8
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 3rd Oct 2016 01:49
Hi all

Im making 2d like in 3d , making pixel art texture althought not perfect.haha. Im wondering if therenis technique to create scanline effect for the whole camera view?

Anybody have done this?

Thanks
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Oct 2016 17:18
This could be done using a fullscreen shader. Can you give an example of the effect you are looking for. I might be able to reproduce it with a simple shader...
Using AppGameKit V2 Tier 1
hoyoyo80
8
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 4th Oct 2016 06:41 Edited at: 4th Oct 2016 06:49
Thanks Baxslash...but i have no knowledge of shader programming.

The effect i want to achieve is in the pic.

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 4th Oct 2016 08:45 Edited at: 4th Oct 2016 11:40
I'll have a go

EDIT
Ok, below is the scanline shader (save as "scanline.ps" in your media folder):


...and below is an example project:


... and this is the effect:
Using AppGameKit V2 Tier 1

Attachments

Login to view attachments
hoyoyo80
8
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 4th Oct 2016 16:03
Wow...ill have a look once im home Look great!!!

xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 5th Oct 2016 03:45
That looks gorgeous, Baxslash!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Oct 2016 12:46
Quote: "That looks gorgeous, Baxslash!"

Thanks
Using AppGameKit V2 Tier 1
hoyoyo80
8
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 5th Oct 2016 14:02
I work for me but with little performance hit...ill look more into this

This should be add under useful shader thread...
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Oct 2016 21:18
Quote: "This should be add under useful shader thread..."

Already done

How much of a performance hit? I might be able to improve it a little...
Using AppGameKit V2 Tier 1
hoyoyo80
8
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 6th Oct 2016 05:29
Hi baxslash..very nice of you to share your shader

It is not really a performance hit,it still show around 60fps but i set my character to move at 0.1 but it move like it is on 0.02,just a rough comparison.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Oct 2016 08:26 Edited at: 6th Oct 2016 08:28
It would run faster without the noise element I guess. As an alternative you could use this one (removing the line of code that sets the noise value in the project too):

EDIT: There will always be some kind of performance hit when using a shader, especially when you need to do effectively 2 draws to the screen. We are rendering everything to a texture which is applied to a Quad object which is then rendered to the screen.
Using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-11-22 03:36:39
Your offset time is: 2024-11-22 03:36:39