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

ps_blend.glsl could be using a mat3 instead of a mat4 #2088

Closed
mstange opened this issue Nov 23, 2017 · 2 comments
Closed

ps_blend.glsl could be using a mat3 instead of a mat4 #2088

mstange opened this issue Nov 23, 2017 · 2 comments

Comments

@mstange
Copy link
Contributor

@mstange mstange commented Nov 23, 2017

All the matrices generated in ps_blend.glsl only make use of the top left 3x3 square of the matrix. I think this matrix could use the mat3 type instead, and the fragment shader could be doing oFragColor = vec4(vColorMat * Cs.rgb, Cs.a), which should be a bit cheaper.

@doraemon96
Copy link

@doraemon96 doraemon96 commented Feb 27, 2018

Is this still needed? Im guessing the file is now brush_blend.glsl

I could look into this in a week or so. If someone else wants to do it, be my guest

@glennw
Copy link
Member

@glennw glennw commented Feb 27, 2018

Yup, it's brush_blend.glsl now, and no-one else is working on it yet, so go for it!

bors-servo added a commit that referenced this issue Mar 16, 2018
Fix brush_blend on SandyBridge iGPU

Dividing by zero is not a good idea in GLSL.
Also fixes #2088 since we are at it.
r? @jrmuizel

Edit: wiki entry - https://github.com/servo/webrender/wiki/Driver-issues#division-by-zero-on-sandybridge-in-the-fragment-shader

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2530)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.