Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"TonemapShaderGLES2: Fragment shader compilation failed" on HTML5 with GLES2 #61167

Closed
dsnopek opened this issue May 18, 2022 · 3 comments
Closed

Comments

@dsnopek
Copy link
Contributor

dsnopek commented May 18, 2022

Godot version

3.5.rc1

System information

Firefox 99 and Chrome 101

Issue description

When running a GLES2 game exported to HTML5 (by Godot 3.5-rc1) in either Firefox or Chrome, I get a whole bunch of errors, starting with "TonemapShaderGLES2: Fragment shader compilation failed"

This same game project doesn't have any issues when exported by Godot 3.4.4.

Here's a screenshot of the full set of error messages:

Selection_384

Steps to reproduce

I've tried to reproduce with a fresh project, but I can't seem to. I'll keep trying to figure it out, but I decided to post this issue right away just in case the error message is enough for someone to guess what's going wrong.

UPDATE:

  • Create a fresh project
  • Enable FXAA in project settings
  • Export to HTML5
  • Open in a web browser.

Minimal reproduction project

No response

@clayjohn
Copy link
Member

clayjohn commented May 18, 2022

Likely also a regression from #54585

Should be as simple as making the following changes (I'll make a PR shortly):

color.a = a + color.a * (1 - a);

to

 color.a = a + color.a * (1.0 - a); 

and

float lumaNW = dot(rgbNW.rgb, luma) - ((1 - rgbNW.a) / 8.0);
float lumaNE = dot(rgbNE.rgb, luma) - ((1 - rgbNE.a) / 8.0);
float lumaSW = dot(rgbSW.rgb, luma) - ((1 - rgbSW.a) / 8.0);
float lumaSE = dot(rgbSE.rgb, luma) - ((1 - rgbSE.a) / 8.0);

to

 float lumaNW = dot(rgbNW.rgb, luma) - ((1.0 - rgbNW.a) / 8.0); 
 float lumaNE = dot(rgbNE.rgb, luma) - ((1.0 - rgbNE.a) / 8.0); 
 float lumaSW = dot(rgbSW.rgb, luma) - ((1.0 - rgbSW.a) / 8.0); 
 float lumaSE = dot(rgbSE.rgb, luma) - ((1.0 - rgbSE.a) / 8.0); 

and

float lumaB = dot(rgbB.rgb, luma) - ((1 - rgbB.a) / 8.0);

to

float lumaB = dot(rgbB.rgb, luma) - ((1.0 - rgbB.a) / 8.0); 

@dsnopek
Copy link
Contributor Author

dsnopek commented May 18, 2022

Likely also a regression from #54585

Aha! Based on looking at that issue, I figured out what I was missing to reproduce: All you need to do is enable FXAA on a fresh project.

@akien-mga
Copy link
Member

Fixed by #61171.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants