I'm trying to use the distance without scaling (the true distance from the foreground clipping plane) to the objects in my scene in the shader of the GLSL fragment. The value of gl_FragCoord.z is less than what I expect. In my vertex shader, I just use ftransform () to set gl_Position. I see values from 2 to 3 when I expect them to be between 15 and 20.
How can I get the real depth of the eye space? Thank!
Pass everything you want as changing from the vertex shader.
Z, , z-near/z-far ( ) DepthRange. , . , OpenGL Z, , , , ( , ), , , .
Z, gl_ModelViewMatrix * gl_Vertex, Z , Z.
gl_ModelViewMatrix * gl_Vertex
Source: https://habr.com/ru/post/1742747/More articles:How to kill blocked mysql queries - phpwhat is the advantage of using negative enums - enumsStarting another animation after the first end of the animation (Objective-C) - objective-cКак развернуть приложение Mono Winforms для Suse Linux 11.0 Server Enterprise? - c#SQLiteDataAdapter update method returning 0 - c #Ошибка местоположения Android - javaregex to match strings that have illegal file names - javaWhat data types are supported by the Google App Engine datastore? - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1742751/which-tools-to-use-and-how-to-find-file-descriptors-leaking-from-glassfish&usg=ALkJrhjFFeKkiz1AICnGHBQlkF-ynPDwlA- [CFString length]: the message was sent to the freed instance 0x3881940 when I scroll to the bottom of the table on iphone - debuggingAll Articles