material { name : unlit, requires : [ uv0 ], parameters : [ { type : sampler2d, name : baseColorMap }, { type : float4, name : baseColorFactor }, { type : int, name : baseColorIndex }, { type : float2, name : uvScale } ], depthWrite : true, depthCulling : true, shadingModel : unlit, blending: opaque, culling: none, instanced: false, vertexDomain: object, } fragment { void material(inout MaterialInputs material) { prepareMaterial(material); material.baseColor = materialParams.baseColorFactor; if (materialParams.baseColorIndex > -1) { highp float2 uv = getUV0(); uv.y = 1.0 - uv.y; material.baseColor *= texture(materialParams_baseColorMap, uv); } } }