mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 12:59:14 +12:00
fix: lighting & use lut texture
This commit is contained in:
parent
3e9d2a852c
commit
c5bdb28ca1
4 changed files with 65 additions and 19 deletions
|
@ -105,7 +105,7 @@ inline MTL::PrimitiveType toMTLPrimitiveType(PrimType primType) {
|
|||
Helpers::warn("Triangle fans are not supported on Metal, using triangles instead");
|
||||
return MTL::PrimitiveTypeTriangle;
|
||||
case PrimType::GeometryPrimitive:
|
||||
Helpers::warn("Geometry primitives are not yet, using triangles instead");
|
||||
//Helpers::warn("Geometry primitives are not yet, using triangles instead");
|
||||
return MTL::PrimitiveTypeTriangle;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue