Closed
Bug 1279766
Opened 8 years ago
Closed 6 years ago
WebGL2 reporting incorrect uniforms
Categories
(Core :: Graphics: CanvasWebGL, defect, P3)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: mozilla2, Assigned: jgilbert)
References
()
Details
(Keywords: nightly-community, Whiteboard: [gfx-noted])
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36
Steps to reproduce:
go to http://twgljs.org/examples/uniform-buffer-objects.html
Actual results:
The cubes are black
Expected results:
The cubes are colored and lit
If I go into the library where it's looking up uniforms it loops over all the uniforms to get their locations. If I print out the names of the uniforms it found this it what it says
getting location for: u_diffuse
getting location for: Lights.u_lightWorldPos
getting location for: Lights.u_lightColor
getting location for: u_ambient
getting location for: u_specular
getting location for: u_shininess
getting location for: u_specularFactor
getting location for: u_viewInverse
getting location for: u_viewProjection
As far as I can tell these 2 are wrong
getting location for: Lights.u_lightWorldPos
getting location for: Lights.u_lightColor
They should be 4 uniforms not 2 and should be
Lights[0].u_lightWorldPos
Lights[0].u_LightColor
Lights[1].u_lightWorldPos
Lights[1].u_LightColor
Similarly if I print out the uniform block object names I get
uniform block name: 0 Lights
uniform block name: 1 Lights
uniform block name: 2 Model
uniform block name: 3 Material
uniform block name: 4 View
As far as I can tell there should only be one block named "Lights"
Are there conformance tests for these features that are known not to pass yet? Of course it's also possible there's something wrong with my program
PS: I'm on a Early 2015 Macbook Pro. OSX 10.11.5, NVIDIA GeForce GT 750M
and I'm running FirefoxNightly 50.0a1 (2016-06-11)
Reporter | ||
Updated•8 years ago
|
Summary: WebGL2 uniform remapping leaking back into JavaScript → WebGL2 reporting incorrect uniforms
Reporter | ||
Comment 1•8 years ago
|
||
Hmmm, so checking Chrome I see maybe the first diagnosis was slightly off. The uniforms are correct, it's the blocks only that are wrong.
Chrome returns the same uniforms but it also returns
uniform block name: 0 Lights[0] // different from firefox
uniform block name: 1 Lights[1] // different from firefox
uniform block name: 2 Model
uniform block name: 3 Material
uniform block name: 4 View
I gotta assume Chrome is correct here? If the names between block 0 and block 1 are not different then there would be no way to call `gl.getUniformBlockIndex(program, blockName)` since the names would not be unique.
Comment 2•8 years ago
|
||
Thanks Gregg, I can't reproduce your bug on a Linux Nightly, NeedInfo-ed Nical, he may know who to CC on this WebGL bug report.
Keywords: nightly-community
Updated•8 years ago
|
Updated•7 years ago
|
Priority: -- → P3
Updated•6 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 4•6 years ago
|
||
Please reopen if this still reproduces for you!
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Comment 5•6 years ago
|
||
(WFM: Late-2013 15" MBP on NV dGPU)
You need to log in
before you can comment on or make changes to this bug.
Description
•