mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Make shader clip space consistent across APIs and projection matrices.
- All shaders are expected to output clip space values that are effectively y-up, with [-1, 1] z, in NDC. - The transform to a backend's expected clip space values from the above range now happens after user vertex shader code is run, instead of inside a projection matrix. - Projection matrices no longer need to be flipped when rendering to a canvas versus the main screen. This means custom projection matrices might need to be altered to account for the more consistent range.
This commit is contained in:
@@ -271,7 +271,6 @@ public:
|
||||
graphics::GraphicsReadback *newReadbackInternal(ReadbackMethod method, love::graphics::Texture *texture, int slice, int mipmap, const Rect &rect, image::ImageData *dest, int destx, int desty) override;
|
||||
void clear(OptionalColorD color, OptionalInt stencil, OptionalDouble depth) override;
|
||||
void clear(const std::vector<OptionalColorD> &colors, OptionalInt stencil, OptionalDouble depth) override;
|
||||
Matrix4 computeDeviceProjection(const Matrix4 &projection, bool rendertotexture) const override;
|
||||
void discard(const std::vector<bool>& colorbuffers, bool depthstencil) override;
|
||||
void present(void *screenshotCallbackdata) override;
|
||||
void backbufferChanged(int width, int height, int pixelwidth, int pixelheight, bool backbufferstencil, bool backbufferdepth, int msaa) override;
|
||||
|
||||
Reference in New Issue
Block a user