mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Add Depth compare / shadow sampler support. Officially this is only supported in glsl3 shaders.
- Add Texture:setDepthSampleMode(comparemode). Only works on textures with depth pixel formats. A texture with the depth sample mode set will only work with a depth sampler. - Add DepthImage, DepthArrayImage, and DepthCubeImage sampler keywords to glsl3. --HG-- branch : minor
This commit is contained in:
@@ -26,9 +26,11 @@
|
||||
#include "common/math.h"
|
||||
#include "common/pixelformat.h"
|
||||
#include "common/Exception.h"
|
||||
#include "common/Optional.h"
|
||||
#include "Drawable.h"
|
||||
#include "Quad.h"
|
||||
#include "vertex.h"
|
||||
#include "depthstencil.h"
|
||||
|
||||
// C
|
||||
#include <stddef.h>
|
||||
@@ -143,6 +145,9 @@ public:
|
||||
virtual bool setMipmapSharpness(float sharpness) = 0;
|
||||
float getMipmapSharpness() const;
|
||||
|
||||
virtual void setDepthSampleMode(Optional<CompareMode> mode = Optional<CompareMode>());
|
||||
Optional<CompareMode> getDepthSampleMode() const;
|
||||
|
||||
Quad *getQuad() const;
|
||||
|
||||
virtual ptrdiff_t getHandle() const = 0;
|
||||
@@ -185,6 +190,8 @@ protected:
|
||||
|
||||
float mipmapSharpness;
|
||||
|
||||
Optional<CompareMode> depthCompareMode;
|
||||
|
||||
StrongRef<Quad> quad;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user