You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
I made a shader with help of Nespa using reflection and transparency. I want now know if is possible to render those clipped polygons. Using OpenGL. Take a look.
material settings: material flags , normals, z-buffer.....
If You have applied the shader to the sphere, You must apply the shader to the alls objects inside of the sphere. The shader is rendered the last, so, if the objects inside are not rendered again, they will be cliped.
I don't think is this. I did the following, make a sphere, copied it, flipped normals and paste inside. This is the same material. There is some way to order the engine to render the inner sphere after the outer?
Professional Software Developer and Amateur Game Designer
I have not alls the informations about your sphere to analyze what is happend.
I'm afraid i didn't understood what polygons in your sphere are clipped, they are separate objects or belong of the same object(sphere)?
If it is about the behind polygons around of the sphere, set flags frontface and backface too.
The transparent polygons are drawn last, and without ZBuffering. You would have to draw the inner sphere BEFORE to the outer one, so the transparency is correctly drawn.
The transparency is an important issue in 3d engines because it doesn't get along well with the ZBuffering, and normaly, the way to deal with it is to delay the rendering of the transparent objects to the last part of the render, where they will be sorted back to front and drawn over the solid objects.
The problem is that this z-sorting is done only with the objects, and not with the faces that compose them, so, is posible that some faces are drawn incorrectly, and that is what happens with your screenshot.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Kalango wrote:Doesnt irrlicht have polygon offset atribute to avoid z fighting? If it doesnt it nees ASAP...
Nope.. it is a problem that took me months to fight, ultimately having to modify Irrlicht to make things work as I needed.
From your post, I did a search and found out that openGL does have a polygon offset attribute, and DirectX/Direct3D might too (not sure)... never knew this.
After a long time, I'm on active again (was dealing with logic). Yes, your suggestion worked very well. I made a bit different:
I used two domes, one for inside another for outside e none for the solid part.
Thanks man!
Professional Software Developer and Amateur Game Designer