ddf8196 / MaterialBinTool

MCBE RenderDragon着色器解包/打包/编译工具
MIT License
108 stars 12 forks source link

Fixed program not reading defines.json as expected #4

Closed SIsilicon closed 1 year ago

SIsilicon commented 1 year ago

According to the README file, the following would be added to defines.json.

"flagModes": {
    "SourceInputType0": {
        "Constant": [],
        "Sampled": ["SOURCE_INPUT_0_SAMPLED"]
    },
    "SourceInputType1": {
        "Constant": [],
        "Sampled": ["SOURCE_INPUT_1_SAMPLED"]
    },
    "SourceInputType2": {
        "Constant": [],
        "Sampled": ["SOURCE_INPUT_2_SAMPLED"]
    }
}

However, the program does not properly read it. Instead, it would read something like this.

"flagModes": {
    "SourceInputType0": ["SOURCE_INPUT_0_SAMPLED"],
    "SourceInputType1": ["SOURCE_INPUT_1_SAMPLED"],
    "SourceInputType2": ["SOURCE_INPUT_2_SAMPLED"]
}

This pull request fixes that.