fix: lighting & use lut texture

This commit is contained in:
Samuliak 2024-07-04 09:37:28 +02:00
parent 3e9d2a852c
commit c5bdb28ca1
4 changed files with 65 additions and 19 deletions

View file

@ -46,8 +46,10 @@ class RendererMTL final : public Renderer {
Metal::DepthStencilCache depthStencilCache;
Metal::VertexBufferCache vertexBufferCache;
// Helpers
MTL::SamplerState* basicSampler;
// Objects
MTL::SamplerState* nearestSampler;
MTL::SamplerState* linearSampler;
MTL::Texture* lightLUTTextureArray;
// Pipelines
MTL::RenderPipelineState* displayPipeline;
@ -100,4 +102,5 @@ class RendererMTL final : public Renderer {
Metal::Texture& getTexture(Metal::Texture& tex);
void setupTextureEnvState(MTL::RenderCommandEncoder* encoder);
void bindTexturesToSlots(MTL::RenderCommandEncoder* encoder);
void updateLightingLUT();
};