Closed Bug 965848 Opened 9 years ago Closed 8 years ago

implement EXT_shader_texture_lod-like extension for WebGL


(Core :: Graphics: CanvasWebGL, defect)

Windows 8
Not set





(Reporter: vlad, Assigned: vlad)




(2 files, 1 obsolete file)

Attached patch EXT_shader_texture_lod, v0 (obsolete) — Splinter Review
This was identified as a large contributor to visual quality by some of our partners.  On mobile, it's available on PowerVR and Mali, but not on Adreno and Tegra.  EXT_shader_texture_lod is standard available on iOS (and on the desktop), so in many cases it's an issue where the desktop should be able to look at least as good as iOS.

Note also that it's core required in ES3, and Adreno/Tegra have ES3 drivers, so I'm not sure why they also don't expose the extension.

However, we can't take EXT_shader_texture_lod as-is, because it also includes a bunch of Grad functions that are exposed to both vertex and fragment shaders.  In D3D, these are only available in pixel shaders.  They can be emulated by writing some math in the vertex shader though, and I'm tempted to do that.. but it also might get complex to get the interaction between lod/bias/etc. right.

The attached prototype patch implements "EXT_shader_texture_lod", but only the Lod portions.  I'll likely rename this MOZ_shader_texture_lod_limited or something.  But, I would like to land this very soon under a default-off pref.  Thoughts?
Attachment #8367994 - Flags: feedback?(jgilbert)
Attachment #8367994 - Flags: feedback?(bjacob)
Comment on attachment 8367994 [details] [diff] [review]
EXT_shader_texture_lod, v0

Review of attachment 8367994 [details] [diff] [review]:

I can't see anything wrong with that, at least at the "feedback" stage. I have no idea about the D3D aspects though. If there were a showstopper there, I would be missing it.

Just one thing: if this is important enough to get implemented behind a pref, it's probably important enough to write a spec for, and get the proposal/draft process going.
Attachment #8367994 - Flags: feedback?(bjacob) → feedback+
Yeah, absolutely; I plan on writing that up as well.
Comment on attachment 8367994 [details] [diff] [review]
EXT_shader_texture_lod, v0

Review of attachment 8367994 [details] [diff] [review]:

Cool, but yeah, let's get a spec together.
Attachment #8367994 - Flags: feedback?(jgilbert) → feedback+
EXT_shader_texture_lod extension specification has been moved to draft:
This is now in upstream ANGLE as of ~3 weeks ago.  Can we take an ANGLE update so we can get this in for 32?
I had to modify the test case to get it to run properly on WebKit.  I imagine the same should be done here.  It was a simple fix:

-var gl = create3DContext(canvas);
+var gl = wtu.create3DContext(canvas);
Updated now that we have new ANGLE.
Assignee: nobody → vladimir
Attachment #8367994 - Attachment is obsolete: true
Attachment #8453925 - Flags: review?(jgilbert)
Attachment #8453925 - Flags: review?(jgilbert) → review+
So I was about to land this, but the test itself is timing out in a way that I don't understand.  It's as if it's not even running.  The test worked last time I tried it, but windows builds with tests are a little broken right now for me for some reason (bug 1043128).
So all it was was just a missing export of the test file.

(The linux debug failures cannot be related)
Comment on attachment 8453925 [details] [diff] [review]
EXT_shader_texture_lod, v1

r=me on the webidl change
Attachment #8453925 - Flags: review+
Closed: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Extension does not show up on OSX. Chrome has it (86%), Safari (96%) and Opera (96%). I suggest this is not fixed.
yep does not work on osx / linux
You need to log in before you can comment on or make changes to this bug.