Closed wddl closed 7 months ago
Sorry for the miscommunication earlier, clipSpaceTransform is the right parameter to use in device domain. You can see for yourself that it's a mat4 applied to the position written out to gl_Position.
Note however that we do the following:
// GL convention to inverted DX convention (must happen after clipSpaceTransform)
position.z = position.z * -0.5 + 0.5;
So when you expect a Z position in clip space at 0.0 it will actually be at 0.5 (in the domain 0..1).
@romainguy thank you very much! I understand!
Is your feature request related to a problem? Please describe. I need to set gl_Position in the vertex shader, but in device domain cannot change z value through clipSpaceTransform matrix and only in device domain clipSpaceTransform can be set, how can the gl_position be modified? refer to https://github.com/google/filament/issues/7662#issue-2183061747
Describe the solution you'd like engine support modify gl_Position in vertex shader
Describe alternatives you've considered
OS and backend