public void SetMaterial(P3dBlendMode blendMode, Texture texture, Texture shape, P3dChannel shapeChannel, float hardness, float wrapping, float normalBack, float normalFront, float normalFade, Color color, float opacity, Texture tileTexture, Matrix4x4 tileMatrix, float tileOpacity, float tileTransition) { switch (Extrusions) { case 0: Material = new P3dHashedMaterial(cachedSpotMaterial, cachedSpotMaterialHash); break; case 1: Material = new P3dHashedMaterial(cachedLineMaterial, cachedLineMaterialHash); break; case 2: Material = new P3dHashedMaterial(cachedQuadMaterial, cachedQuadMaterialHash); break; } Blend = blendMode; Pass = blendMode; Color = color; Opacity = opacity; Hardness = hardness; Wrapping = wrapping; Texture = texture; Shape = shape; ShapeChannel = P3dHelper.IndexToVector((int)shapeChannel); TileTexture = tileTexture; TileMatrix = tileMatrix; TileOpacity = tileOpacity; TileTransition = tileTransition; var pointA = normalFront - 1.0f - normalFade; var pointB = normalFront - 1.0f; var pointC = 1.0f - normalBack + normalFade; var pointD = 1.0f - normalBack; NormalFront = new Vector2(pointA, P3dHelper.Reciprocal(pointB - pointA)); NormalBack = new Vector2(pointC, P3dHelper.Reciprocal(pointD - pointC)); }
public Material SetMaterial(Texture texture, Color color) { Material = new P3dHashedMaterial(cachedMaterial, cachedMaterialHash); Texture = texture; Color = color; return(cachedMaterial); }
public Material SetMaterial(P3dBlendMode blendMode, Texture texture, Color color, float opacity, float minimum) { Blend = blendMode; Material = new P3dHashedMaterial(cachedMaterial, cachedMaterialHash); Pass = blendMode; Texture = texture; Color = color; Opacity = opacity; Minimum = minimum; return(cachedMaterial); }
public Material SetMaterial(Texture textureR, Texture textureG, Texture textureB, Texture textureA, Vector4 channelR, Vector4 channelG, Vector4 channelB, Vector4 channelA) { Material = new P3dHashedMaterial(cachedMaterial, cachedMaterialHash); TextureR = textureR; TextureG = textureG; TextureB = textureB; TextureA = textureA; ChannelR = channelR; ChannelG = channelG; ChannelB = channelB; ChannelA = channelA; return(cachedMaterial); }
public void SetMaterial(P3dBlendMode blendMode, float hardness, Color color, float opacity, Texture tileTexture, Matrix4x4 tileMatrix, float tileOpacity, float tileTransition) { switch (Extrusions) { case 0: Material = new P3dHashedMaterial(cachedSpotMaterial, cachedSpotMaterialHash); break; case 1: Material = new P3dHashedMaterial(cachedLineMaterial, cachedLineMaterialHash); break; case 2: Material = new P3dHashedMaterial(cachedQuadMaterial, cachedQuadMaterialHash); break; } Blend = blendMode; Pass = blendMode; Hardness = hardness; Color = color; Opacity = opacity; TileTexture = tileTexture; TileMatrix = tileMatrix; TileOpacity = tileOpacity; TileTransition = tileTransition; }