X-Git-Url: https://harrygodden.com/git/?p=convexer.git;a=blobdiff_plain;f=config.py;h=e485027af5a609b50d9829093540f234a28facc8;hp=cb5597cc0286ac33fd79671b070c9e9227d1eef6;hb=HEAD;hpb=05e7fa40fd47dd5bfeaa1de9e9eba73319ae8564 diff --git a/config.py b/config.py index cb5597c..e485027 100644 --- a/config.py +++ b/config.py @@ -14,7 +14,8 @@ cxr_shaders = \ "LightMappedGeneric": { "name": "Light Mapped" }, "VertexLitGeneric": { "name": "Vertex Lit" }, "UnlitGeneric": { "name": "Unlit" }, - "Builtin": { "name": "Builtin" } + "Builtin": { "name": "Builtin" }, + "WorldVertexTransition": { "name": "Light Mapped Blend" } } # Shader graph mapping @@ -22,7 +23,7 @@ cxr_shaders = \ def material_tex_image(v): return { - "ShaderNodeTexImage": + "Image Texture": { "image": F"${v}" } @@ -30,18 +31,29 @@ def material_tex_image(v): cxr_graph_mapping = \ { - "ShaderNodeBsdfPrincipled": + # 'Special' shader for wvt + "cxr_blend": + { + "modulate": material_tex_image("blendmodulatetexture"), + "basetexture": material_tex_image("basetexture"), + "basetexture2": material_tex_image("basetexture2"), + "bumpmap": material_tex_image("bumpmap"), + "bumpmap2": material_tex_image("bumpmap2") + }, + + # Default shader setup + "Principled BSDF": { "Base Color": { - "ShaderNodeMixRGB": + "Mix": { "Color1": material_tex_image("basetexture"), "Color2": material_tex_image("decaltexture") }, - "ShaderNodeTexImage": + "Image Texture": { - "image":"$basetexture" + "image": "$basetexture" }, "default": [("VertexLitGeneric","$color2"),\ @@ -50,7 +62,7 @@ cxr_graph_mapping = \ }, "Normal": { - "ShaderNodeNormalMap": + "Normal Map": { "Color": material_tex_image("bumpmap") } @@ -66,7 +78,10 @@ cxr_shader_params = \ "Textures": { "type": "ui", - "shaders": ("UnlitGeneric","VertexLitGeneric","LightMappedGeneric"), + "shaders": ("UnlitGeneric",\ + "VertexLitGeneric",\ + "LightMappedGeneric",\ + "WorldVertexTransition"), "$basetexture": { @@ -74,6 +89,18 @@ cxr_shader_params = \ "type": "intrinsic", "default": None }, + "$basetexture2": + { + "name": "Base Texture 2", + "type": "intrinsic", + "default": None + }, + "$blendmodulatetexture": + { + "name": "Blend Modulate", + "type": "intrinsic", + "default": None + }, "$decaltexture": { "name": "Decal Texture", @@ -100,6 +127,13 @@ cxr_shader_params = \ "type": "intrinsic", "flags": NBVTF_TEXTUREFLAGS_NORMAL, # OpenGL (correct) normal maps. "default": None + }, + "$bumpmap2": + { + "name": "Normal Map 2", + "type": "intrinsic", + "flags": NBVTF_TEXTUREFLAGS_NORMAL, + "default": None } }, "$color": @@ -119,7 +153,7 @@ cxr_shader_params = \ "Lighting": { "type": "ui", - "shaders": ("VertexLitGeneric", "LightMappedGeneric"), + "shaders": ("VertexLitGeneric", "LightMappedGeneric", "WorldVertexTransition"), "$phong": { @@ -240,6 +274,13 @@ cxr_shader_params = \ "name": "Surface", "type": "string", "default": "" + }, + "$surfaceprop2": + { + "shaders": ("WorldVertexTransition",), + "name": "Surface 2", + "type": "string", + "default": "" } }