internal Kn5MaterialSimpleBase([NotNull] Kn5MaterialDescription description) { if (description == null) { throw new ArgumentNullException(nameof(description)); } if (description.Material == null) { throw new ArgumentNullException(nameof(description.Material)); } Description = description; IsBlending = Kn5Material.BlendMode == Kn5MaterialBlendMode.AlphaBlend; }
private IRenderableMaterial CreateMaterial(Kn5MaterialDescription description) { if (description?.Material == null) { return(new InvisibleMaterial()); } switch (description.Material.ShaderName) { case "GL": return(new Kn5MaterialGlDeferred()); case "ksWindscreen": return(new InvisibleMaterial()); default: return(new Kn5MaterialDeferred(description)); } }
public Kn5MaterialSimpleAlpha([NotNull] Kn5MaterialDescription description) : base(description) { }
public Kn5MaterialSimpleReflective([NotNull] Kn5MaterialDescription description) : base(description) { }
internal Kn5MaterialSimple([NotNull] Kn5MaterialDescription description) : base(description) { }
internal DebugMaterial(Kn5MaterialDescription kn5Material) { Description = kn5Material; IsBlending = Kn5Material.BlendMode == Kn5MaterialBlendMode.AlphaBlend; }
private IRenderableMaterial CreateMaterial(Kn5MaterialDescription description) { if (description?.Material == null) { return(new InvisibleMaterial()); } // return new Kn5MaterialSimpleGl(description); switch (description.Material?.ShaderName) { case "ksBrokenGlass": return(new InvisibleMaterial()); case "GL": return(new Kn5MaterialSimpleGl(description)); case "ksTyres": case "ksBrakeDisc": return(new Kn5MaterialSimpleDiffMaps(description)); case "ksWindscreen": return(new Kn5MaterialSimple(description)); case "ksPerPixel": case "ksPerPixelAT": case "ksPerPixelAT_NS": case "ksTree": return(new Kn5MaterialSimple(description)); case "ksPerPixelAT_NM": return(new Kn5MaterialSimpleAtNm(description)); case "ksPerPixelReflection": case "ksPerPixelSimpleRefl": return(new Kn5MaterialSimpleReflective(description)); case "ksPerPixelNM": case "ksPerPixelNM_UV2": return(new Kn5MaterialSimpleNm(description)); case "ksPerPixelNM_UVMult": return(new Kn5MaterialSimpleNmMult(description)); case "ksPerPixelMultiMap": case "ksPerPixelMultiMap_AT": case "ksPerPixelMultiMap_AT_NMDetail": case "ksPerPixelMultiMap_damage": case "ksPerPixelMultiMap_damage_dirt": case "ksPerPixelMultiMap_damage_dirt_sunspot": case "ksPerPixelMultiMap_NMDetail": case "ksPerPixelMultiMapSimpleRefl": return(new Kn5MaterialSimpleMaps(description)); case "ksPerPixelAlpha": return(new Kn5MaterialSimpleAlpha(description)); case "ksSkinnedMesh": // TODO return(new Kn5MaterialSimpleMaps(description)); default: return(new Kn5MaterialSimple(description)); } }
public Kn5MaterialSimpleDiffMaps([NotNull] Kn5MaterialDescription description) : base(description) { }
private IRenderableMaterial CreateMaterial(Kn5MaterialDescription description) { if (description?.Material == null) { return(new InvisibleMaterial()); } var shader = description.Material?.ShaderName; if (shader == null) { return(new InvisibleMaterial()); } switch (description.Material?.ShaderName) { case "ksBrokenGlass": return(new InvisibleMaterial()); case "GL": return(new Kn5MaterialDarkGl(description)); case "ksTyres": case "ksBrakeDisc": return(new Kn5MaterialDarkTyres(description)); //case "ksBrakeDisc": // return new Kn5MaterialSimpleDiffMaps(description); case "ksWindscreen": return(new Kn5MaterialDarkWindscreen(description)); case "ksPerPixel": case "ksPerPixelAT": case "ksPerPixelAT_NS": case "ksTree": return(new Kn5MaterialDark(description)); case "ksPerPixelAT_NM": return(new Kn5MaterialDarkAtNm(description)); case "ksPerPixelReflection": case "ksPerPixelSimpleRefl": return(new Kn5MaterialDarkReflective(description)); case "ksPerPixelNM": case "ksPerPixelNM_UV2": return(new Kn5MaterialDarkNm(description)); case "ksPerPixelNM_UVMult": return(new Kn5MaterialDarkNmMult(description)); case "ksPerPixelMultiMap": case "ksPerPixelMultiMap_AT": case "ksPerPixelMultiMap_AT_NMDetail": case "ksPerPixelMultiMap_damage": case "ksPerPixelMultiMap_damage_dirt": case "ksPerPixelMultiMap_damage_dirt_sunspot": case "ksPerPixelMultiMap_NMDetail": case "ksPerPixelMultiMapSimpleRefl": return(new Kn5MaterialDarkMaps(description)); case "ksPerPixelAlpha": return(new Kn5MaterialDarkAlpha(description)); case "ksSkinnedMesh": case "ksSkinnedMesh_NMDetaill": return(new Kn5MaterialDarkSkinnedMaps(description)); case "ksSky": case "ksSkyBox": return(new Kn5MaterialDarkSky(description)); default: if (shader.IndexOf("skinned", StringComparison.OrdinalIgnoreCase) != -1) { return(new Kn5MaterialDarkSkinnedGl(description)); } return(new Kn5MaterialDark(description)); } }
public Kn5MaterialDarkNmMult([NotNull] Kn5MaterialDescription description) : base(description) { }
internal Kn5MaterialDark([NotNull] Kn5MaterialDescription description) : base(description) { }
public Kn5MaterialDarkMaps([NotNull] Kn5MaterialDescription description) : base(description) { }
public Kn5MaterialSimpleReflective([NotNull] Kn5MaterialDescription description) : base(description) { #if REFLECTION_DEBUG && DEBUG _debugReflectionsMode = description.Material?.Name == "Material #25"; #endif }
public Kn5MaterialSimpleWindscreen([NotNull] Kn5MaterialDescription description) : base(description) { }
public Kn5MaterialSimpleSkinnedGl([NotNull] Kn5MaterialDescription description) : base(description) { }