Pixel Shaders & Shader Programs Error
prajwal.be.21

Hey, I'm following the Angry Cannon tutorial and I got to the bit where the powerbar is setup with the pixel shader.
I followed the steps the instructor asks us to, but I do not see the pixel shader effect like in the video.
And I get a console log saying "Cannot use pixel shaders in canvas mode " & also "Cannot use shader programs in canvas mode "

-I have set the layer to use webgl

-I have selected always draw

-The preview window of the powerbar sprite on the editor though shows the shader effect but not when I run the game with the editor

Please do help... Thank you

-
Prajwal

All 6 Comments
Gio

Hi

Two questions:

  1. Do you get any other messages in the console, such as "too many WebGL contexts"?
  2. Does it work if you export it and run it as a standalone project, not in the editor?

 

prajwal.be.21

Hey,

I just tried downloading and running on my localhost as a standalone project but the error persists...

I get two console logs
- cannot use pixel shaders in canvas mode
- cannot use shader programs in canvas mode

I did not get too many WebGL contexts log though...

Gio

It sounds like, somehow, the layer is not being set to WebGL. I know you said you did, it sounds like something went wrong somewhere. Do you want to email us your project at clockworkchilli@gmail.com and we'll look into it?

prajwal.be.21

Sure... Will mail the project to you guys.. Thanks!

prajwal.be.21

Hey! So I went back to the project and just switched layer to 2D and back to WebGL and it started working... I did not change a single line of code... But It's working now... Thanks!

Gio

Hi prajawal

Glad to hear it's working now. By the way, we never got your email. I know gmail is a bit funny with some file types, even if they are inside a zip. For example it doesn't like files with an its extension (the one we use for Isometric Tile Sets), and may sometime block emails with those attachments.

However it is now possible to attach files directly here in the forum, should you need it again.

Post a reply
Add Attachment
Submit Reply
Login to Reply