Closed shrekshao closed 8 years ago
Nice catch!
-Tr
On Feb 10, 2016, at 9:18 PM, Shuai Shao (Shrek) notifications@github.com wrote:
The perspective is wrong. lookAt in gl-Matrix generate a frustum matrix, not simply a view matrix. Fixed. The same problem remains in texture_vertex @trungtle Use gl-matrix-min.js of version 2.x instead of the 1.x version Delete a never used input in the vertex shader You can view, comment on, or merge this pull request online at:
https://github.com/WebGLSamples/WebGL2Samples/pull/84
Commit Summary
fix texture derivative perspective, gl-matrix version File Changes
M samples/texture_derivative.html (42) Patch Links:
https://github.com/WebGLSamples/WebGL2Samples/pull/84.patch https://github.com/WebGLSamples/WebGL2Samples/pull/84.diff — Reply to this email directly or view it on GitHub.
One more thing: since you use textureLod to select level of mipmap, I think you should gl.generateMipmap(gl.TEXTURE_2D);
first? Right?, or there is only one level?
This looks great for the fix. I removed the textureLevel function inside frag shader since I don't think there's a need for it anyway (not using mipmap)
Thanks!
lookAt
in gl-Matrix generate a frustum matrix, not simply a view matrix. Fixed. The same problem remains intexture_vertex
@trungtle