filamat: add Backend-to-TargetApi utility.
This commit is contained in:
@@ -88,7 +88,7 @@ Entity createQuad(Engine* engine, Texture* tex, ImageOp op, Texture* secondary)
|
||||
)SHADER")
|
||||
.require(VertexAttribute::UV0)
|
||||
.parameter(filamat::MaterialBuilder::SamplerType::SAMPLER_2D, "color")
|
||||
.targetApi(filamat::MaterialBuilder::TargetApi::OPENGL)
|
||||
.targetApi(filamat::targetApiFromBackend(engine.getBackend()))
|
||||
.shading(Shading::UNLIT)
|
||||
.depthWrite(false)
|
||||
.depthCulling(false)
|
||||
@@ -112,7 +112,7 @@ Entity createQuad(Engine* engine, Texture* tex, ImageOp op, Texture* secondary)
|
||||
.require(VertexAttribute::UV0)
|
||||
.parameter(filamat::MaterialBuilder::SamplerType::SAMPLER_2D, "color")
|
||||
.parameter(filamat::MaterialBuilder::SamplerType::SAMPLER_2D, "secondary")
|
||||
.targetApi(filamat::MaterialBuilder::TargetApi::OPENGL)
|
||||
.targetApi(filamat::targetApiFromBackend(engine.getBackend()))
|
||||
.shading(Shading::UNLIT)
|
||||
.depthWrite(false)
|
||||
.depthCulling(false)
|
||||
@@ -196,7 +196,7 @@ Entity createQuad(Engine* engine, Texture* tex, ImageOp op, Texture* secondary)
|
||||
.require(VertexAttribute::UV0)
|
||||
.parameter(filamat::MaterialBuilder::SamplerType::SAMPLER_2D, "color")
|
||||
.parameter(filamat::MaterialBuilder::UniformType::FLOAT4, SAMPLE_COUNT, "weights")
|
||||
.targetApi(filamat::MaterialBuilder::TargetApi::OPENGL)
|
||||
.targetApi(filamat::targetApiFromBackend(engine.getBackend()))
|
||||
.shading(Shading::UNLIT)
|
||||
.depthWrite(false)
|
||||
.depthCulling(false)
|
||||
@@ -312,7 +312,7 @@ Entity createDisk(Engine* engine, Texture* reflection) {
|
||||
.parameter(filamat::MaterialBuilder::SamplerType::SAMPLER_2D, "roughness")
|
||||
.parameter(filamat::MaterialBuilder::SamplerType::SAMPLER_2D, "ao")
|
||||
.parameter(filamat::MaterialBuilder::SamplerType::SAMPLER_2D, "reflection")
|
||||
.targetApi(filamat::MaterialBuilder::TargetApi::OPENGL)
|
||||
.targetApi(filamat::targetApiFromBackend(engine->getBackend()))
|
||||
.specularAntiAliasing(true)
|
||||
.shading(Shading::LIT)
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user