question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

r115 -> r118 breaks extensions derivatives

See original GitHub issue
Description of the problem

Just upgraded my project from r115 to r118 (mainly to exploit the VAO support). My shaders fails compiling due the use of dFdx|dFdy.

The GL_OES_standard_derivatives doesn’t seems to be loaded, even though I have:

  extensions: {
    derivatives: true,
  },

Is the syntax changed or something?

Three.js version
  • Dev
  • r118
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
Mugen87commented, Jun 29, 2020

Since GitHub was down for some time, we discussed this issue via Twitter PMs.

Fiddle demonstrating the issue: https://jsfiddle.net/yph50ntu/ Fixed fiddle: https://jsfiddle.net/s8um05ev/2/

Since r118, three.js uses a WebGL2 rendering context by default. The engine tries to convert existing GLSL 1.0 code to GLSL 3.0 as good as possible but only for built-in materials or custom shader code base on ShaderMaterial. There is no such conversion for RawShaderMaterial.

So the solution was to just convert your shader code to GLSL 3.0. Another possibility is the usage of WebGL1Renderer which would solve your issue without refactoring of shader code.

Keep in mind that extensions like GL_OES_standard_derivatives are enabled in WebGL 2/GLSL 3.0 by default so it’s not necessary anymore to enable it manually.

2reactions
lurukecommented, Jun 29, 2020

@Mugen87 , thanks makes sense. In my case I will just force WebGL1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NAC: CHAPTER 391 - EDUCATIONAL PERSONNEL
Upon the expiration of such an extension, a school district may apply for an additional extension pursuant to NAC 391.398 if the school...
Read more >
EVK1100
20, 14, 24, 0R, Thick film resistor, SMD 0603, 1/10W, 1%, R112, R115, R118, R141, R18, R2, R20, R21, R22, R23, R24, R25,...
Read more >
Page 1 - SEC.gov
Headline earnings, before unrealised non-hedge derivatives, increased by ... The Main shaft extension was commissioned to a depth of 3,130m in June 2002....
Read more >
Model UZC4 Zone Control
The UZC4 Universal Zone Control System allows you to easily upgrade an inefficient single zone HVAC system, into an. Automated, Multi-zone, Energy saving, ......
Read more >
publications of the National Bureau of Standards 1901 to June ...
A relation connecting the derivatives of physical quantities. M. D. Hersey. ... Extension of the standard visibility function to intervals of 1 millimicron....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found