-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMaterial.cpp
More file actions
32 lines (29 loc) · 1.15 KB
/
Material.cpp
File metadata and controls
32 lines (29 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "Material.h"
#include "SimpleShader.h"
#include "WICTextureLoader.h"
Material::Material(DirectX::XMFLOAT4 colorTint, float shininess, class SimpleVertexShader* VS, class SimplePixelShader* PS)
{
this->colorTint = colorTint;
this->shininess = shininess;
this->vertShader = VS;
this->pixelShader = PS;
}
Material::Material(DirectX::XMFLOAT4 colorTint, float shininess, ID3D11ShaderResourceView* texResource, ID3D11SamplerState* sampler, SimpleVertexShader* VS, SimplePixelShader* PS)
{
this->colorTint = colorTint;
this->shininess = shininess;
this->diffuseTextureWrapper = texResource;
textureSampler = sampler;
this->vertShader = VS;
this->pixelShader = PS;
}
Material::Material(DirectX::XMFLOAT4 colorTint, float shininess, struct ID3D11ShaderResourceView* diffuseTexture, struct ID3D11ShaderResourceView* normalMapTexture, struct ID3D11SamplerState* sampler, class SimpleVertexShader* VS, class SimplePixelShader* PS)
{
this->colorTint = colorTint;
this->shininess = shininess;
this->diffuseTextureWrapper = diffuseTexture;
textureSampler = sampler;
this->vertShader = VS;
this->pixelShader = PS;
this->normalMapWrapper = normalMapTexture;
}