Askhento
I know that materials use .xml files, but I don’t like them))
Is it possible to use JSON instead?
I know that materials use .xml files, but I don’t like them))
Is it possible to use JSON instead?
Urho3D Editor > View > Material Editor > Save As > *.json
Thnx for response)
Do you have an example file? Sounds stupid but I don’t have editor haha
{
"techniques": [
{
"name": "Techniques/NoTextureUnlit.xml",
"quality": 0,
"loddistance": 0.0
}
],
"textures": null,
"shaderParameters": {
"UOffset": "1 0 0 0",
"VOffset": "0 1 0 0",
"MatDiffColor": "1 1 1 1",
"MatEmissiveColor": "0 0 0",
"MatEnvMapColor": "1 1 1",
"MatSpecColor": "0 0 0 1",
"Roughness": "0.5",
"Metallic": "0"
},
"shaderParameterAnimations": null,
"cull": "ccw",
"shadowcull": "ccw",
"fill": "solid",
"depthbias": {
"constant": 0.0,
"slopescaled": 0.0
},
"alphatocoverage": false,
"lineantialias": false,
"renderorder": 128,
"occlusion": true
}
It works!
Thank you)
By the way what if I want to use EnvCube.xml Technique? Do you an example of a environment texture field in this case?
{
"techniques": [
{
"name": "Techniques/DiffEnvCube.xml",
"quality": 0,
"loddistance": 0.0
}
],
"textures": {
"diffuse": "Textures/Mushroom.dds",
"environment": "Textures/Skybox.xml"
},
"shaderParameters": {
"UOffset": "1 0 0 0",
"VOffset": "0 1 0 0",
"MatDiffColor": "1 1 1 1",
"MatEmissiveColor": "0 0 0",
"MatEnvMapColor": "0.2 0.2 0.2",
"MatSpecColor": "0.1 0.1 0.1 16",
"Roughness": "0.5",
"Metallic": "0"
},
"shaderParameterAnimations": null,
"cull": "ccw",
"shadowcull": "ccw",
"fill": "solid",
"depthbias": {
"constant": 0.0,
"slopescaled": 0.0
},
"alphatocoverage": false,
"lineantialias": false,
"renderorder": 128,
"occlusion": true
}
Thank you! It seems that eventually I need the xml file “Textures/Skybox.xml”? Is there any way to set it as json also?
I found only ParseTextureTypeXml
function in sources