As I understand, the only way to implement deferred shading is using MRT and binding different textures to store data to the color attachments. The problem is that the WebGL specifications defines a single color attachment: COLOR_ATTACHMENT0. Is it possible to implement deferred shading at all in WebGL with this restriction?
相关问题
- debugging webgl in chrome
- SecurityError for same-origin image texImage2D
- What are VertexIndices in webgl?
- Is clipping done automatically in Three.js?
- How do I enable WebGL in Xamarin.Forms WebView on
相关文章
- How to get OpenGL version using Javascript?
- Why do I need to define a precision value in webgl
- How to change one texture image of a 3d model(maya
- Why do my three.js examples not load properly?
- Coloring rectangle in function of distance to near
- Repeating a bump map
- Passing color to fragment shader from javascript
- Texture shape extrude in three.js
You can implement deferred shading by rendering to textures, but you need to either redraw all geometry for each pass (diffuse, depth, whatnot) or come up with a way to store all information you need into a single RGBA texture. Then sample these textures in your shader to produce the final result.
There's an extension for float textures you might want to use but isn't guaranteed to work everywhere.
As you probably understand, deferred is not optimal in WebGL :)