예제 #1
0
ShaderErrors LightShader::Initialize(ID3D11Device* device, HWND hwnd, IShaderParams* params)
{
	if(!InitializeShader(device,hwnd,params,L"../../Core/Engine/Shaders/LightShader/VertexShader.hlsl",L"../../Core/Engine/Shaders/LightShader/PixelShader.hlsl"))
		return SHDR_COMPILATION_FAILED;
	
	return SHDR_OK;
}
bool ReflectionShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	result = InitializeShader(device, hwnd, L"../Engine/reflectionvs.hlsl", L"../Engine/reflectionps.hlsl");
	return result;
}
예제 #3
0
bool TranslateShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	result = InitializeShader(device, hwnd, L"../Engine/translatevs.hlsl", L"../Engine/translateps.hlsl");
	return result;
}
bool LightingShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	// Initialize the vertex and pixel shaders.
	//result = InitializeShader(device, hwnd, L"./DirectionalLight/LightingAmbient.fx", L"./DirectionalLight/LightingAmbient.fx");
	//result = InitializeShader(device, hwnd, L"./DirectionalLight/LightingDiffuse.fx", L"./DirectionalLight/LightingDiffuse.fx");
	result = InitializeShader(device, hwnd, L"./DirectionalLight/LightingPhongDiffuse.fx", L"./DirectionalLight/LightingPhongDiffuse.fx");
	//result = InitializeShader(device, hwnd, L"./DirectionalLight/LightingPhongSpecular.fx", L"./DirectionalLight/LightingPhongSpecular.fx");
	//result = InitializeShader(device, hwnd, L"./DirectionalLight/LightingSpecular.fx", L"./DirectionalLight/LightingSpecular.fx");

	//result = InitializeShader(device, hwnd, L"./PointLight/LightingDiffuse.fx", L"./PointLight/LightingDiffuse.fx");
	//result = InitializeShader(device, hwnd, L"./PointLight/LightingPhongDiffuse.fx", L"./PointLight/LightingPhongDiffuse.fx");
	//result = InitializeShader(device, hwnd, L"./PointLight/LightingPhongSpecular.fx", L"./PointLight/LightingPhongSpecular.fx");
	//result = InitializeShader(device, hwnd, L"./PointLight/LightingSpecular.fx", L"./PointLight/LightingSpecular.fx");

	//result = InitializeShader(device, hwnd, L"./SpotLight/LightingDiffuse.fx", L"./SpotLight/LightingDiffuse.fx");
	//result = InitializeShader(device, hwnd, L"./SpotLight/LightingPhongDiffuse.fx", L"./SpotLight/LightingPhongDiffuse.fx");
	//result = InitializeShader(device, hwnd, L"./SpotLight/LightingPhongSpecular.fx", L"./SpotLight/LightingPhongSpecular.fx");
	//result = InitializeShader(device, hwnd, L"./SpotLight/LightingSpecular.fx", L"./SpotLight/LightingSpecular.fx");

	if(!result)
	{
		return false;
	}
	return true;
}
예제 #5
0
	bool AlphaMapShader::Initialize(Graphics* graphics)
	{
		if(!InitializeShader(graphics,L"Content/Shaders/AlphaMapVS.cso",L"Content/Shaders/AlphaMapPS.cso"))
			return false;

		return true;
	}
예제 #6
0
bool FontShader::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;
	result = InitializeShader(device, hwnd, "FontVertexShader.hlsl", "FontPixelShader.hlsl");
	if (!result) return false;
	return true;
}
예제 #7
0
bool FontShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	if (!InitializeShader(device, hwnd, L"../GameGame/font.vs", L"../GameGame/font.ps"))
		return false;

	return true;
}
bool FoliageShaderClass::Initialize(ID3D10Device* device)
{
	bool result;

	result = InitializeShader(device, L"../ModellingInThreeDimensions/data/foliage/foliage.fx");

	return true;
}
예제 #9
0
Shader::Shader(std::string vpFile, std::string fpFile)
{
	m_vp.assign(LoadShaderProgram(vpFile));
	m_gp.clear();
	m_fp.assign(LoadShaderProgram(fpFile));

	InitializeShader();
}
예제 #10
0
	bool MultiTextureShader::Initialize(Graphics* graphics)
	{
		// initialize our shaders
		if(!InitializeShader(graphics,L"Content/Shaders/MultiTextureVS.cso", L"Content/Shaders/MultiTexturePS.cso"))
			return false;

		return true;
	}
bool BumpMapShader::Initialize(ID3D11Device* device, HWND hwnd) {
	bool result;
	
	// Initialize the vertex and pixel shaders.
	result = InitializeShader(device, hwnd, L"bumpmap.vs.hlsl", L"bumpmap.ps.hlsl");
	if(!result) return false;

	return true;
}
bool ProjectionLightMapShaderClass::Initialize(ID3D11Device* device, HWND hwnd){
	bool result;

	// Initialize the vertex and pixel shaders.
	result = InitializeShader(device, hwnd, L"projection_lightmap_vert.hlsl", L"projection_lightmap_pix.hlsl");
	if (!result) return false;

	return true;
}
예제 #13
0
bool TextureShaderClass::Initialize(ID3D10Device* device, HWND hWnd) {
	bool result;

	result = InitializeShader(device, hWnd, L"../DX10/texture.fx");
	if (!result) {
		return false;
	}

	return true;
}
예제 #14
0
bool ColorShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	//Initialize the vertex and pixel shaders
	result = InitializeShader(device, hwnd, L"../Engine/color.vs", L"../Engine/color.ps");
	if(!result)
		return false;

	return true;
}
예제 #15
0
bool ColorShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	result = InitializeShader(device, hwnd, L"ColorVertex.vs", L"ColorPixel.ps");
	if (!result)
	{
		return false;
	}
	return true;
}
// Initializes the light.fx shader file
bool LightShaderClass::Initialize(ID3D10Device* device, HWND hwnd){
	bool result;

	result = InitializeShader(device, hwnd, L"../ModellingInThreeDimensions/data/light.fx");
	if(!result)
	{
		return false;
	}

	return true;
}
bool ParticleShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	result = InitializeShader(device, hwnd, L".\\Shader\\particle.fx", L".\\Shader\\particle.fx");
	if (!result)
	{
		return false;
	}
	return true;
}
bool MultiShadowShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	result = InitializeShader(device, hwnd, L"Shader\\shadow.fx", L"Shader\\shadow.fx");
	if (!result)
	{
		return false;
	}
	return true;
}
예제 #19
0
bool ShadowShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	// Initialize the vertex and pixel shaders.
	result = InitializeShader(device, hwnd, L"Data/Shaders/shadow.vs", L"Data/Shaders/shadow.ps");
	if (!result)
		return false;

	return true;
}
bool SpecmapShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	result = InitializeShader(device, hwnd, L"specmap.fx", L"specmap.fx");
	if (!result)
	{
		return false;
	}
	return true;
}
bool RefractionShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
    bool result;

    result = InitializeShader(device, hwnd, L"refraction.fx", L"refraction.fx");
    if (!result)
    {
        return false;
    }
    return true;
}
bool TextureShaderClass::Initialize(ID3D11Device* device, HWND hwnd){
	WCHAR currentDir[256];
	DWORD const buffer_chars = sizeof(currentDir) / sizeof(currentDir[0]);
	DWORD a = GetCurrentDirectory(buffer_chars, currentDir);

	std::wstring dirVSWStr = std::wstring(currentDir) + L"\\Data\\texture.vs";

	std::wstring dirPSWStr = std::wstring(currentDir) + L"\\Data\\texture.ps";
	
	return InitializeShader(device, hwnd, (WCHAR*)dirVSWStr.c_str(), (WCHAR*)dirPSWStr.c_str());
}
예제 #23
0
bool LightShaderClass::Initialize(ID3D11Device* device, HWND hwnd){

	bool result;

	//Initialize the vertex and pixel shaders
	result = InitializeShader(device, hwnd, L"light.vs", L"light.ps");
	if (!result)
		return false;

	return true;
}
예제 #24
0
bool FontShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;
	// Initialize the vertex and pixel shaders.
	result = InitializeShader(device, hwnd, L"../Engine/font.vs", L"../Engine/font.ps");
	if(!result)
	{
		return false;
	}

	return true;
}
bool MultiTextureShader::Initialize(ID3D11Device* device)
{
	bool result;

	result = InitializeShader(device, "Shaders\\MultiTextureVertexShader.cso", "Shaders\\MultiTexturePixelShader.cso");
	if (!result)
	{
		return false;
	}

	return true;
}
예제 #26
0
bool ColorShaderClass::Initialize( ID3D11Device* device, HWND hwnd )
{
	bool result;

	result = InitializeShader(device, hwnd, L"./Effect/color.vs", L"./Effect/color.ps");
	if(!result)
	{
		return false;
	}

	return true;
}
예제 #27
0
bool ColorShader::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;

	result = InitializeShader(device, hwnd, "../3D2-Project/ColorVS.hlsl", "../3D2-Project/ColorPS.hlsl");
	if (!result)
	{
		return false;
	}

	return true;
}
예제 #28
0
/*The Initialize function will call the initialization function for the shader. 
We pass in the name of the HLSL shader file*/
bool Shader::Initialize(ID3D10Device* device, HWND hwnd)
{
	bool result;

	// Initialize the shader that will be used to draw the triangle.
	result = InitializeShader(device, hwnd, L"assets/color2.fx");
	if(!result){
		return false;
	}

	return true;
}
bool TransparentShaderClass::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;
	// Initialize the vertex and pixel shaders.
	result = InitializeShader(device, hwnd, L"../DMArcadeInterface/transparent.vs", L"../DMArcadeInterface/transparent.ps");
	if (!result)
	{
		return false;
	}

	return true;
}
예제 #30
0
bool CLightShader::Initialize(ID3D11Device* device, HWND hwnd)
{
	bool result;
	result = InitializeShader(device, hwnd, "Shaders/specularlight.vs", "Shaders/specularlight.ps");
	if (!result)
	{
		CLog::Write("CLightShader::Initialize() : could not initialize the shader");
		return false;
	}

	return true;
}