hi,
I created two planes and set glsles shaders that just output a color. But when I moved the camera, some parts of the plane at the back were rendered to the front, just like they were on the same plane, There was enough distance between two planes, and some other objects on the plane had the same situation. This just happened on device.
I've tried to set DepthCheckEnabled to false, that situation didn't happened, but some parts of other object on the plane disappeared.
I'm using OGRE 1.9 , ios7, glsles2.0 and ipad air
Does anyone have an idea?
Thanks in advance!
[ios]Object at the back was rendered to the front on device
-
- Gnoblar
- Posts: 4
- Joined: Thu Nov 28, 2013 1:29 pm
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: [ios]Object at the back was rendered to the front on dev
Could you give some code that replicates the issue? Do you see any errors in the log? Have you tried the same code on a desktop?
-
- Gnoblar
- Posts: 4
- Joined: Thu Nov 28, 2013 1:29 pm
Re: [ios]Object at the back was rendered to the front on dev
Sorry, I can not paste code here for some reason, I use the ogre Xcode 4 templates code, and make some changes, and I'm using Xcode 5. Could you show me some special code I should take care? and i can type my code here.
There is one error about texture in the log.
Error loading texture spheremap.png. Texture layer will be blank.
And I have another problem with running SimpleBrowse. It just shows a black screen. There are some errors in the log like this:
object unsurpported by render system in OffsetMapping.material(35): shader name : Examples/OffsetMappingPSAsm.
Compiler error : unknown error in RTShaderSystem.material(23):token class, rtshader_system, unrecognized.
I don't know whether I have compiled ogre correctly, but my code worked fine with those .a files, except the problem above.
I have not tried the code on a desktop, and I'll try it later. it seems ok on simulator.
There is one error about texture in the log.
Error loading texture spheremap.png. Texture layer will be blank.
And I have another problem with running SimpleBrowse. It just shows a black screen. There are some errors in the log like this:
object unsurpported by render system in OffsetMapping.material(35): shader name : Examples/OffsetMappingPSAsm.
Compiler error : unknown error in RTShaderSystem.material(23):token class, rtshader_system, unrecognized.
I don't know whether I have compiled ogre correctly, but my code worked fine with those .a files, except the problem above.
I have not tried the code on a desktop, and I'll try it later. it seems ok on simulator.
-
- Gnoblar
- Posts: 4
- Joined: Thu Nov 28, 2013 1:29 pm
Re: [ios]Object at the back was rendered to the front on dev
I've solved this problem. It's about the shader files.
When I change "precision mediump float" to "precision highp float", it works. But why? Should 64bit system use higher precision?
When I change "precision mediump float" to "precision highp float", it works. But why? Should 64bit system use higher precision?
- c6burns
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 138
Re: [ios]Object at the back was rendered to the front on dev
http://www.khronos.org/registry/gles/sp ... 1.0.17.pdf
Check the section on precision and precision qualifiers. It has nothing to do with your CPU. It's a performance feature to allow you to implement lower precision (and thus better performing) variables in your shaders.
Check the section on precision and precision qualifiers. It has nothing to do with your CPU. It's a performance feature to allow you to implement lower precision (and thus better performing) variables in your shaders.
-
- Gnoblar
- Posts: 4
- Joined: Thu Nov 28, 2013 1:29 pm
Re: [ios]Object at the back was rendered to the front on dev
I'll read more about it, and thanks, c6burns.