# Fragment shader error: P3D: Processing 3.5.3

**URL:** <https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691>\
**Category:** Processing\
**Created:** [July 12, 2019, 8:44pm UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691 "2019-07-12T20:44:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![LuckSmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lucksmith/32/5805_2.png) [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Post date:** [July 12, 2019, 8:44pm UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/1 "2019-07-12T20:44:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Architector\_4](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/architector_4/32/813_2.png) [@Architector\_4](https://discourse.processing.org/u/Architector_4)\
**Post date:** [July 13, 2019, 5:41am UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/2 "2019-07-13T05:41:01Z")

</div>

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

```auto
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?

---

<div class="post-metadata">

**Author:** ![LuckSmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lucksmith/32/5805_2.png) [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Post date:** [July 13, 2019, 11:33am UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/3 "2019-07-13T11:33:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [July 13, 2019, 11:52am UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/4 "2019-07-13T11:52:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![LuckSmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lucksmith/32/5805_2.png) [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Post date:** [July 13, 2019, 12:11pm UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/5 "2019-07-13T12:11:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![LuckSmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lucksmith/32/5805_2.png) [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Post date:** [July 13, 2019, 9:05pm UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/6 "2019-07-13T21:05:05Z")

</div>

![error](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/fce6a61c683bec9f3e48d14c615814e198ad298d.png)

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.

---

<div class="post-metadata">

**Author:** ![LuckSmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lucksmith/32/5805_2.png) [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Post date:** [July 13, 2019, 9:11pm UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/7 "2019-07-13T21:11:33Z")

</div>

I can’t even copy all the message in clipboard

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7fa8bd05ccf70f8aaada8878da9116a3aece7dd0.png)

---

<div class="post-metadata">

**Author:** ![LuckSmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lucksmith/32/5805_2.png) [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Post date:** [July 13, 2019, 9:31pm UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/8 "2019-07-13T21:31:47Z")

</div>

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

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c6c0366c8617750f533683e69e891555dfd95979.png)  
this should give an idea of how complex my sketches are

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [July 14, 2019, 2:14am UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/9 "2019-07-14T02:14:30Z")

</div>

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

 ![SNAG-0136](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/ada19a77d92f91a91820e1db10e0c2cdbeab9899.jpeg)  
tested processing 3.5.3. 64bit AND 32 bit ! ok

---

<div class="post-metadata">

**Author:** ![LuckSmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lucksmith/32/5805_2.png) [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Post date:** [July 14, 2019, 3:45pm UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/10 "2019-07-14T15:45:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [July 15, 2019, 3:28pm UTC](https://discourse.processing.org/t/fragment-shader-error-p3d-processing-3-5-3/12691/11 "2019-07-15T15:28:37Z")

</div>

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!
