bitwise operator not supported?

Recommended Posts

I'm trying to use '>>' and '&' in fragment code for a Filter. It said bit-wise operator supported in GLSL ES 3.00 and above only". I tried adding "#version 300 es" to the top of my fragment shader code, but it keeps giving me "#version directive must occur before anything else, except for comments and white space" (it's at the very top, without any white space too)

How can I enable bitwise operators? Or is there an alternative?

Share this post

Link to post
Share on other sites

Its a known issue, we have a preprocessor that adds "precision float " in the beginning , so please make sure you specify that line at the first symbol and not after "\n"

That wont work:

const frag = `
#version ...

that'll work:

const frag = `#version 300 es

The place in source code: https://github.com/pixijs/pixi.js/blob/dev/packages/core/src/shader/Program.js#L53

Yes, we cant decide what to do with that thing for several months already.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.