Search the Community
Showing results for tags 'webgl_draw_buffers'.
-
Hello guys, I would like to make a debugger such one of these: -http://www.paulallenrenton.com/individual-projects/webgl-deferred-renderer -http://codeflow.org/entries/2012/aug/25/webgl-deferred-irradiance-volumes/#debugging I am trying to use multiple rendering target with this webgl extension => (https://www.khronos.org/registry/webgl/extensions/WEBGL_draw_buffers/), so when I am rendering my scene I would like in my fragment shader to write something like this: #extension GL_EXT_draw_buffers : require precision highp float; uniform sampler2D positionSampler; uniform sampler2D normalSampler; uniform sampler2D depthSampler; uniform sampler2D stuffSampler; varying vec2 vUV2; void main(void) { gl_FragData[0] = texture2D(positionSampler, vUV2); gl_FragData[1] = texture2D(normalSampler, vUV2); gl_FragData[2] = texture2D(depthSampler, vUV2); gl_FragData[3] = texture2D(stuffSampler, vUV2); } with each gl_FragData writing in a webgl texture associated. I didn't find a lots resources about it on the internet... I am working with babylon.js, any example or help would be great. Thanks !
- 19 replies
-
- webgl_draw_buffers
- multiple
-
(and 2 more)
Tagged with: