JOGL3Viewer doesn't support the transparency?
JOGL3Viewer doesn't support the transparency?
I got the latest version from git.
Test the LineShaderExample a little bit.
The JOGLViewer has the transparency but the JOGL3Viewer doesn't.
Shouldn't be my PC problem since the JOGLViewer works.
Just curious it's a bug or what?
Thanks.
Test the LineShaderExample a little bit.
The JOGLViewer has the transparency but the JOGL3Viewer doesn't.
Shouldn't be my PC problem since the JOGLViewer works.
Just curious it's a bug or what?
Thanks.
-
- Posts: 48
- Joined: Mon 16. May 2011, 16:29
Re: JOGL3Viewer doesn't support the transparency?
Ah, I see. If you have an IndexedFaceSet, then the jogl3-Viewer supports order-independent transparency. However, in the LineShaderExample you have a LineSet, where the edges have the transparency attribute.
When writing the jogl3-backend I saw no use for transparent edges. So I didn't implement them. But if needed that could be added I think.
When writing the jogl3-backend I saw no use for transparent edges. So I didn't implement them. But if needed that could be added I think.
Re: JOGL3Viewer doesn't support the transparency?
It looks like the transparency for the IndexedFaceSet is not working either.
I'm running the Intro02.java, for the JOGLViewer, I set the transparency to 0.6, the result is like this: However, when I switch it to the JOGL3Viewer, the same transparency, the result is like this: Probably I need some settings? How can I enable the order-independent transparency?
And for the IndexedLineSet,
I think the line in JReality has two options, one is to draw the openGL line, one is to draw the tube as the line.
Both of them have the transparency support in the JOGLViewer.
Could you please add that for the IndexedLineSet in the jogl3-backend?
Thank you.
I'm running the Intro02.java, for the JOGLViewer, I set the transparency to 0.6, the result is like this: However, when I switch it to the JOGL3Viewer, the same transparency, the result is like this: Probably I need some settings? How can I enable the order-independent transparency?
And for the IndexedLineSet,
I think the line in JReality has two options, one is to draw the openGL line, one is to draw the tube as the line.
Both of them have the transparency support in the JOGLViewer.
Could you please add that for the IndexedLineSet in the jogl3-backend?
Thank you.
benjamin.kutschan wrote:Ah, I see. If you have an IndexedFaceSet, then the jogl3-Viewer supports order-independent transparency. However, in the LineShaderExample you have a LineSet, where the edges have the transparency attribute.
When writing the jogl3-backend I saw no use for transparent edges. So I didn't implement them. But if needed that could be added I think.
-
- Posts: 48
- Joined: Mon 16. May 2011, 16:29
Re: JOGL3Viewer doesn't support the transparency?
Hi,
are you using the newest version of jReality from git?
[url]git://gitorious.org/jreality/jreality.git[/url]
If I enable transparency in the RenderingHintsShader of the "root appearance" and set the transparency value in the polygonShader of the Appearance of the dodecahedron, then it works in both backends. How are you enabling transparency?
And about the transparent lines: Maybe I find time in December. Not sure yet. Sorry.
are you using the newest version of jReality from git?
[url]git://gitorious.org/jreality/jreality.git[/url]
If I enable transparency in the RenderingHintsShader of the "root appearance" and set the transparency value in the polygonShader of the Appearance of the dodecahedron, then it works in both backends. How are you enabling transparency?
And about the transparent lines: Maybe I find time in December. Not sure yet. Sorry.
-
- Posts: 48
- Joined: Mon 16. May 2011, 16:29
Re: JOGL3Viewer doesn't support the transparency?
Hmm. Appears that you're enabling the transparency as I do. Can you post your system configuration (GPU, OS, graphics driver version)?
Re: JOGL3Viewer doesn't support the transparency?
Windows 7,
Driver like this:
Driver like this:
benjamin.kutschan wrote:Hmm. Appears that you're enabling the transparency as I do. Can you post your system configuration (GPU, OS, graphics driver version)?
Re: JOGL3Viewer doesn't support the transparency?
I'm glad that you will work on it sooner or later.
I think the transparent lines are great and important features in JReality.
The JOGL3Viewer is supposed to be better than the JOGLViewer.
Or at least it's reasonable to make them consistent as the JOGLViewer, right?
I think the transparent lines are great and important features in JReality.
The JOGL3Viewer is supposed to be better than the JOGLViewer.
Or at least it's reasonable to make them consistent as the JOGLViewer, right?
benjamin.kutschan wrote:Hi,
are you using the newest version of jReality from git?
[url]git://gitorious.org/jreality/jreality.git[/url]
If I enable transparency in the RenderingHintsShader of the "root appearance" and set the transparency value in the polygonShader of the Appearance of the dodecahedron, then it works in both backends. How are you enabling transparency?
And about the transparent lines: Maybe I find time in December. Not sure yet. Sorry.
-
- Posts: 48
- Joined: Mon 16. May 2011, 16:29
Re: JOGL3Viewer doesn't support the transparency?
Probier mal den Treiber der Version 13.9.
Mit anderen Treibern haben wir's auf unseren Radeons auch nicht zum Laufen gekriegt.
Gruß
Benjamin
Mit anderen Treibern haben wir's auf unseren Radeons auch nicht zum Laufen gekriegt.
Gruß
Benjamin
Re: JOGL3Viewer doesn't support the transparency?
Some updates.
Without updating the drivers,
tested with the DepthPeeling.java by adding the gl.glDrawBuffer(gl.GL_NONE);
in the public void peelDepth(GL3 gl) function can make the transparency correctly.
public void peelDepth(GL3 gl){
gl.glViewport(0, 0, width, height);
gl.glEnable(gl.GL_TEXTURE_2D);
gl.glActiveTexture(gl.GL_TEXTURE0);
gl.glBindTexture(gl.GL_TEXTURE_2D, texs[1]);
depth.useShader(gl);
gl.glUniform1i(gl.glGetUniformLocation(transp.shaderprogram, "image"), 0);
gl.glUniform1i(gl.glGetUniformLocation(transp.shaderprogram, "width"), width);
gl.glUniform1i(gl.glGetUniformLocation(transp.shaderprogram, "height"), height);
gl.glClearColor(0, 0, 0, 1);
gl.glClear(gl.GL_COLOR_BUFFER_BIT);
gl.glClearDepth(1);
gl.glClear(gl.GL_DEPTH_BUFFER_BIT);
gl.glBindBuffer(gl.GL_ARRAY_BUFFER, quadVerts.getID());
gl.glVertexAttribPointer(gl.glGetAttribLocation(depth.shaderprogram, quadVerts.getName()), quadVerts.getElementSize(), quadVerts.getType(), false, 0, 0);
gl.glEnableVertexAttribArray(gl.glGetAttribLocation(depth.shaderprogram, quadVerts.getName()));
gl.glDrawBuffer(gl.GL_NONE);
gl.glDrawArrays(gl.GL_TRIANGLES, 0, quadVerts.getLength()/4);
gl.glDisableVertexAttribArray(gl.glGetAttribLocation(depth.shaderprogram, quadVerts.getName()));
depth.dontUseShader(gl);
}
Without updating the drivers,
tested with the DepthPeeling.java by adding the gl.glDrawBuffer(gl.GL_NONE);
in the public void peelDepth(GL3 gl) function can make the transparency correctly.
public void peelDepth(GL3 gl){
gl.glViewport(0, 0, width, height);
gl.glEnable(gl.GL_TEXTURE_2D);
gl.glActiveTexture(gl.GL_TEXTURE0);
gl.glBindTexture(gl.GL_TEXTURE_2D, texs[1]);
depth.useShader(gl);
gl.glUniform1i(gl.glGetUniformLocation(transp.shaderprogram, "image"), 0);
gl.glUniform1i(gl.glGetUniformLocation(transp.shaderprogram, "width"), width);
gl.glUniform1i(gl.glGetUniformLocation(transp.shaderprogram, "height"), height);
gl.glClearColor(0, 0, 0, 1);
gl.glClear(gl.GL_COLOR_BUFFER_BIT);
gl.glClearDepth(1);
gl.glClear(gl.GL_DEPTH_BUFFER_BIT);
gl.glBindBuffer(gl.GL_ARRAY_BUFFER, quadVerts.getID());
gl.glVertexAttribPointer(gl.glGetAttribLocation(depth.shaderprogram, quadVerts.getName()), quadVerts.getElementSize(), quadVerts.getType(), false, 0, 0);
gl.glEnableVertexAttribArray(gl.glGetAttribLocation(depth.shaderprogram, quadVerts.getName()));
gl.glDrawBuffer(gl.GL_NONE);
gl.glDrawArrays(gl.GL_TRIANGLES, 0, quadVerts.getLength()/4);
gl.glDisableVertexAttribArray(gl.glGetAttribLocation(depth.shaderprogram, quadVerts.getName()));
depth.dontUseShader(gl);
}
benjamin.kutschan wrote:Probier mal den Treiber der Version 13.9.
Mit anderen Treibern haben wir's auf unseren Radeons auch nicht zum Laufen gekriegt.
Gruß
Benjamin
-
- Posts: 48
- Joined: Mon 16. May 2011, 16:29
Re: JOGL3Viewer doesn't support the transparency?
Can you explain what this command (glDrawBuffer) exactly does in this case?
Re: JOGL3Viewer doesn't support the transparency?
In DepthPeeling.java, two FBOs are used.
One of them mount with the color and depth
and the other one mount with only the depth.
glDrawBuffer with GL_NONE means No color buffers are written
which fits the one with the depth only.
One of them mount with the color and depth
and the other one mount with only the depth.
glDrawBuffer with GL_NONE means No color buffers are written
which fits the one with the depth only.
benjamin.kutschan wrote:Can you explain what this command (glDrawBuffer) exactly does in this case?
Re: JOGL3Viewer doesn't support the transparency?
Hi,
Besides LineShaderExample is still not working using JOGL3Viewer,
Just let you guys know that the ClippingPlaneExample doesn't work either if I use the JOGL3Viewer.
It looks like we have a long way to go if we want the same feature of the old viewer.
Thanks.
Besides LineShaderExample is still not working using JOGL3Viewer,
Just let you guys know that the ClippingPlaneExample doesn't work either if I use the JOGL3Viewer.
It looks like we have a long way to go if we want the same feature of the old viewer.
Thanks.
cznlzq wrote:I'm glad that you will work on it sooner or later.
I think the transparent lines are great and important features in JReality.
The JOGL3Viewer is supposed to be better than the JOGLViewer.
Or at least it's reasonable to make them consistent as the JOGLViewer, right?
benjamin.kutschan wrote:Hi,
are you using the newest version of jReality from git?
[url]git://gitorious.org/jreality/jreality.git[/url]
If I enable transparency in the RenderingHintsShader of the "root appearance" and set the transparency value in the polygonShader of the Appearance of the dodecahedron, then it works in both backends. How are you enabling transparency?
And about the transparent lines: Maybe I find time in December. Not sure yet. Sorry.