On 18 September 2014 21:57, Joachim Priesner joachim.priesner@web.de wrote:
When using a right-handed projection matrix, z coordinates of vertices may be negative. This is not considered in the code generating the GLSL fog shader. The patch fixes that and adds a test.
The patch is likely correct, but the test has room for improvement. For example, it doesn't currently distinguish between using the absolute fog coordinate in the vertex shader or doing the same in the fragment shader. Also, please don't forget about ddraw and d3d8.
Thanks for your response.
For example, it doesn't currently distinguish between using the absolute fog coordinate in the vertex shader or doing the same in the fragment shader.
Is it enough to extend the test to include both FOGVERTEXMODE and FOGTABLEMODE? Or what else would I (roughly) have to do?
Joachim
Am Freitag, 19. September 2014 schrieb Henri Verbeet:
On 18 September 2014 21:57, Joachim Priesner joachim.priesner@web.de wrote:
When using a right-handed projection matrix, z coordinates of vertices may be negative. This is not considered in the code generating the GLSL fog shader. The patch fixes that and adds a test.
The patch is likely correct, but the test has room for improvement. For example, it doesn't currently distinguish between using the absolute fog coordinate in the vertex shader or doing the same in the fragment shader. Also, please don't forget about ddraw and d3d8.
On 19 September 2014 21:39, Joachim Priesner joachim.priesner@web.de wrote:
Thanks for your response.
For example, it doesn't currently distinguish between using the absolute fog coordinate in the vertex shader or doing the same in the fragment shader.
Is it enough to extend the test to include both FOGVERTEXMODE and FOGTABLEMODE? Or what else would I (roughly) have to do?
The most straightforward way to do the test would probably be to use vertex/fragment shaders to read/write the fog coordinate. See e.g. fog_with_shader_test().
I am not sure what is going on, but fog has sharp edges again...