glTF: Remove separate occlusion texture

next
Fernando García Liñán 3 years ago
parent d7dd7e2c6e
commit 2c82cd4475

@ -256,13 +256,10 @@ struct GLTFBuilder {
SGPropertyNode *normalTexNode = makeChild(params, "texture", 1); SGPropertyNode *normalTexNode = makeChild(params, "texture", 1);
if (!makeTextureParameters(normalTexNode, material.normalTexture.index)) if (!makeTextureParameters(normalTexNode, material.normalTexture.index))
makeChild(normalTexNode, "type")->setValue("null-normalmap"); makeChild(normalTexNode, "type")->setValue("null-normalmap");
SGPropertyNode *metRoughTexNode = makeChild(params, "texture", 2); SGPropertyNode *ormTexNode = makeChild(params, "texture", 2);
if (!makeTextureParameters(metRoughTexNode, pbr.metallicRoughnessTexture.index)) if (!makeTextureParameters(ormTexNode, pbr.metallicRoughnessTexture.index))
makeChild(metRoughTexNode, "type")->setValue("white"); makeChild(ormTexNode, "type")->setValue("white");
SGPropertyNode *occlusionTexNode = makeChild(params, "texture", 3); SGPropertyNode *emissiveTexNode = makeChild(params, "texture", 3);
if (!makeTextureParameters(occlusionTexNode, material.occlusionTexture.index))
makeChild(occlusionTexNode, "type")->setValue("white");
SGPropertyNode *emissiveTexNode = makeChild(params, "texture", 4);
if (!makeTextureParameters(emissiveTexNode, material.emissiveTexture.index)) if (!makeTextureParameters(emissiveTexNode, material.emissiveTexture.index))
makeChild(emissiveTexNode, "type")->setValue("white"); makeChild(emissiveTexNode, "type")->setValue("white");

@ -70,6 +70,7 @@ PropStringMap<BufferFormat> buffer_format_map {
{"r32f", {GL_R32F, GL_RED, GL_FLOAT}}, {"r32f", {GL_R32F, GL_RED, GL_FLOAT}},
{"rg16f", {GL_RG16F, GL_RG, GL_HALF_FLOAT}}, {"rg16f", {GL_RG16F, GL_RG, GL_HALF_FLOAT}},
{"rg32f", {GL_RG32F, GL_RG, GL_FLOAT}}, {"rg32f", {GL_RG32F, GL_RG, GL_FLOAT}},
{"rgb10-a2", {GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_10_10_10_2}},
{"r11f-g11f-b10f", {GL_R11F_G11F_B10F, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV}}, {"r11f-g11f-b10f", {GL_R11F_G11F_B10F, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV}},
{"depth16", {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT}}, {"depth16", {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT}},
{"depth24", {GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT}}, {"depth24", {GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT}},

Loading…
Cancel
Save