IsraelAbebe / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

MRT (MultiRenderTarget), GLSL 1.5 : no bindings for fragment output #505

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
With opengl 3.0 and glsl 1.5, there's no more gl_FragColor / gl_FragData and 
the fragment outputs have to be bound manualy to the framebuffer color 
attachement.
The LwjglRenderer binds outFragColor to the first color attachement. But 
multiple attachement aren't bound.

Then I suggest to add bindings to outFragData[i] where i is the number of the 
attachement.

Just need to add two lines in LwjglRenderer after
1059|       // Check if GLSL version is 1.5 for shader
1060|       GL30.glBindFragDataLocation(id, 0, "outFragColor");

for(int i = 0 ; i < maxMRTFBOAttachs ; i++)
  GL30.glBindFragDataLocation(id, i, "outFragData["+i+"]");

Original issue reported on code.google.com by amand.be...@gmail.com on 5 Jun 2012 at 10:31

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 13 Jun 2012 at 7:48

GoogleCodeExporter commented 8 years ago

Original comment by ShadowIs...@gmail.com on 16 Jun 2012 at 7:47