Class MaterialLoader
- Namespace
- ValveResourceFormat.Renderer
- Assembly
- Renderer.dll
Loads and caches materials and textures from Source 2 resources.
public class MaterialLoaderInheritance
Inherited Members
Constructors
MaterialLoader(RendererContext)
public MaterialLoader(RendererContext rendererContext)Parameters
rendererContextRendererContext
Fields
ReservedTextures
public static readonly HashSet<string> ReservedTexturesField Value
Properties
MaterialCount
public int MaterialCount { get; }Property Value
MaxTextureMaxAnisotropy
public static float MaxTextureMaxAnisotropy { get; set; }Property Value
Methods
GetDefaultMask()
public RenderTexture GetDefaultMask()Returns
GetDefaultNormal()
public RenderTexture GetDefaultNormal()Returns
GetErrorTexture()
public RenderTexture GetErrorTexture()Returns
GetImageExportFormat(bool)
public static (SizedInternalFormat SizedInternalFormat, PixelFormat PixelFormat, PixelType PixelType) GetImageExportFormat(bool hdr)Parameters
hdrbool
Returns
- (SizedInternalFormat SizedInternalFormat, PixelFormat PixelFormat, PixelType PixelType)
GetMaterial(string?, Dictionary<string, byte>?)
public RenderMaterial GetMaterial(string? name, Dictionary<string, byte>? shaderArguments)Parameters
namestring?shaderArgumentsDictionary<string, byte>?
Returns
GetTexture(string, bool, bool)
public RenderTexture GetTexture(string name, bool srgbRead = false, bool anisotropicFiltering = false)Parameters
Returns
LoadBitmapTexture(SKBitmap)
public static RenderTexture LoadBitmapTexture(SKBitmap bitmap)Parameters
bitmapSKBitmap
Returns
LoadMaterial(Resource?, Dictionary<string, byte>?)
public RenderMaterial LoadMaterial(Resource? resource, Dictionary<string, byte>? shaderArguments = null)Parameters
resourceResource?shaderArgumentsDictionary<string, byte>?
Returns
LoadTexture(Resource, bool, bool)
public RenderTexture LoadTexture(Resource textureResource, bool srgbRead = false, bool isViewerRequest = false)