Fragment shader error: P3D: Processing 3.5.3

After having upgraded to Processing 3.5.3 none of my sketches using P3D can run.
All settings are default and I don’t use any shaders. Both full screen and windowed.

I tried it on several computers with the same result. Worse, after downgrading to any previous version of Processing it doesn’t work either.

I get the following error message:

RuntimeException: Cannot compile fragment shader:
Fragment shader failed to compile with the following errors:
ERROR: 0:2: ‘’ : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:32: ‘’ : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:34: ‘’ : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:35: ‘’ : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: compilation errors. No code generated.

Any suggestions?

1 Like

Let me clarify a bit - so a sketch consisting of one line like this:

void setup(){ size(200,200,P3D); }

Does not work and gives all of those errors?
What OS are you on? Version? Any common hardware between machines you’ve tried?

All the sketches used to work fine on previous versions of Processing on the same hardware and OS (Windows 7, 64bit, home edition / professional). The sketches are different, but all include a busy draw() method with different shapes, meshes etc.
The error occurs on a first actual drawing call: rect() for example.
My guess is that it first tries to initialize some default shader and fails to do it. I’ve no idea how to fix it.

if you post a
minimal, complete and verifiable example ( MCVE ) code
( the shortest code what generate that error )
and required data files
i can run it here ( also win 7 64bit ) for test.

also it might be good to detailed describe your UPDATE to 3.5.3 procedure

  • is it the 64bit version?
  • you use the same sketchbook path?
  • you use old or updated libraries ( in that path same )?
  • you re-download and unzip (installed) it already?

I’ll provide a mcve as soon as I get back to my computer (in a few hours)

Yes, I downloaded and unzipped the 64bit version of 3.5.3
Yes, all paths remain the same.
I don’t use any libraries.
Yes, I tried it twice. Got the 3.5.3, got the error, got sad, got 3.4 back, got the same error, got even more sad, got 3.5.3 another time.
Sketches that don’t use P3D work just fine.

ok guys, here’s the MCVE. for the sake of pure experiment I provide the screenshot, the sourse is not the point. I still believe the problem is not in the sketches but with some default things of which I am not aware of, like default shaders and where they lie or something.

please don’t tell me it’s an unsolvable problem, I’ve got some projects that need P3D to run.

here’s the messge I get with this:

java.lang.RuntimeException: Cannot compile fragment shader:
RuntimeException: Cannot compile fragment shader:
Fragment shader failed to compile with the following errors:
ERROR: 0:2: ‘’ : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: 0:30: ‘’ : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR: compilation errors. No code generated.

1 Like

I can’t even copy all the message in clipboard

Every other sketch that doesn’t use P3D works allright, here’s an example:


this should give an idea of how complex my sketches are

sorry, no idea what is wrong with your system

  • hardware / graphic card related?
  • operating system related?
  • install related
    – download/unzip/ ?
    – windows defender killed some program?
    – damaged system dir?
    for win7 at
    C:\Users\111\AppData\Roaming\Processing
    ( ? delete and restart ?)
    **by the way, there under the console subdir you find also all old error logs…

here no problem


tested processing 3.5.3. 64bit AND 32 bit ! ok

1 Like

Reinstalling video card driver solved the problem. Sorry, guys. I didn’t think it was that easy :slight_smile:
Thanks everyone!

3 Likes

Really glad you were able to solve this. Thanks for posting full errors - may help somebody else in the future.

Thanks also to @kll for doing a full test!

2 Likes