mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 22:56:09 +00:00
Make gl_Position(-1, -1) map to texel (0, 0) of the render target
There was a lot of missing around with viewports and flip the Y coordinate in vertex shaders before. Turns out things are simpler than we thought: *all* APIs have gl_Position(-1, -1) map to texel (0, 0). It is just the present coordinate system that changes. Remove some of the hacks we had to work around non-existent viewport issues and fix tests.
This commit is contained in:
committed by
Corentin Wallez
parent
d0d6e5cd20
commit
47155a3555
@@ -23,7 +23,6 @@ namespace backend { namespace d3d12 {
|
||||
spirv_cross::CompilerHLSL compiler(builder->AcquireSpirv());
|
||||
|
||||
spirv_cross::CompilerGLSL::Options options_glsl;
|
||||
options_glsl.vertex.flip_vert_y = false;
|
||||
options_glsl.vertex.fixup_clipspace = true;
|
||||
compiler.spirv_cross::CompilerGLSL::set_options(options_glsl);
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace backend { namespace opengl {
|
||||
#else
|
||||
options.version = 440;
|
||||
#endif
|
||||
options.vertex.flip_vert_y = true;
|
||||
compiler.set_options(options);
|
||||
|
||||
// Rename the push constant block to be prefixed with the shader stage type so that uniform
|
||||
|
||||
Reference in New Issue
Block a user