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.

AppGameKit Studio Chat / [SOLVED] Sprite blur shader compatible with AGK Studio

Author
Message
CatfoodMcFly
9
Years of Service
User Offline
Joined: 24th Jan 2015
Location: Stoke-on-Trent
Posted: 16th Jun 2020 16:48 Edited at: 16th Jun 2020 16:49
Hello. First off, I am a shader ignoramus but on an old thread I found a pixel shader that seemed very short and simple and would blur a sprite, which was precisely what I needed.

However, once I attempted to run this in Studio, it crashed with the message: Pixel shader "shader/blue.ps" has varying "vec2 posVarying;" that does not exist in the vertext shader, etc.

I assumed this was due to incompatibility with AppGameKit studio, so I tried the same thing in AppGameKit classic. Sure enough, it worked!

Does anyone know what I would need to do to make this little shader compatible with Studio, or is it a lost cause? Thank you!

The author of this post has marked a post as an answer.

Go to answer

Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 16th Jun 2020 19:26 Edited at: 16th Jun 2020 19:29
This post has been marked by the post author as the answer.
You aren't using the posVarying variable in the shader ..... so you might as well just delete the line defining it since you aren't using it.


And you should probably be dividing the colour by 49 (7*7) as thats how many samples you are taking to do the blur (unless you want a darker colour)
CatfoodMcFly
9
Years of Service
User Offline
Joined: 24th Jan 2015
Location: Stoke-on-Trent
Posted: 16th Jun 2020 21:10
Deleting that line did the trick! Thank you so much. I had been trying all kinds of work arounds to make a blur, this is so much easier and more effective.

Login to post a reply

Server time is: 2024-04-20 03:26:12
Your offset time is: 2024-04-20 03:26:12