Hi guys. I'm using a shader. When the camera is away from the object (GLCamera1.AdjustDistanceToTarget(Power(1.1, -ZoomValue / 480));),
artifacts appear.
I think that this is due to the insufficient accuracy of the calculations. How to deal with this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Alexander, ok , the problem is you must understanding better how opengl pipeline redering engine work.
Let me explain a bit: an 3D objects depend of the structure , when is rendering, of the material and the shader
I took your sample and changed colors for a better view of the problem and explain how rendering work
Take a look at those screenchots and test attached sample
1st : Is with your default setting
2nd : By changy DummyCube objectsorting property to none
3rd : By changy DummyCube objectsorting property (it's seems inverted with farthest)
4th : in add, by changing Materail.DepthProperties
ps : Open picture in you tab
ps : ps : You'll probably need change project option s to compil. I'm on the community edition
Hmm, thanks looked your decision. In the case of two cubes, this works (although it's also not always ideal). I tried on a complex scene - the render is wrong, some objects disappear, some objects appear.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
have you check the others properties have changed like camera.nearplanebias ?
If you have complex scene, you must take care of how your scene is organized and how objects are sorted. Like you've seen here the ObjectsSorting property is very important.
And the materials to. See the Depthproperties, it can influence the final rendering. You must check and inspect all your scene's objects.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the advice! camera.nearplanebias is something that I have overlooked. Increasing this value, I got what I wanted! This is amazing! Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys. I'm using a shader. When the camera is away from the object


(GLCamera1.AdjustDistanceToTarget(Power(1.1, -ZoomValue / 480));)
,artifacts appear.
I think that this is due to the insufficient accuracy of the calculations. How to deal with this?
Hi Alexender it is screenshot from your applications ? Can you put your sample please. I cannot answer with just that. Are you in Delphi or Lazarus ?
Best regards
Delphi. Well, I'll make an example.
Example is ready
Hi Alexander, ok , the problem is you must understanding better how opengl pipeline redering engine work.
Let me explain a bit: an 3D objects depend of the structure , when is rendering, of the material and the shader
I took your sample and changed colors for a better view of the problem and explain how rendering work
Take a look at those screenchots and test attached sample
1st : Is with your default setting
2nd : By changy DummyCube objectsorting property to none
3rd : By changy DummyCube objectsorting property (it's seems inverted with farthest)
4th : in add, by changing Materail.DepthProperties
ps : Open picture in you tab
ps : ps : You'll probably need change project option s to compil. I'm on the community edition
Best regards
Last edit: Jerome.D (BeanzMaster) 2018-09-14
Hmm, thanks looked your decision. In the case of two cubes, this works (although it's also not always ideal). I tried on a complex scene - the render is wrong, some objects disappear, some objects appear.
Can you post some screenshots ?
have you check the others properties have changed like camera.nearplanebias ?
If you have complex scene, you must take care of how your scene is organized and how objects are sorted. Like you've seen here the ObjectsSorting property is very important.
And the materials to. See the Depthproperties, it can influence the final rendering. You must check and inspect all your scene's objects.
Thanks for the advice! camera.nearplanebias is something that I have overlooked. Increasing this value, I got what I wanted! This is amazing! Thank you!