You follow the steps below.
Folder-File Structure.
C:\Projects\EsenthelEngineShader\(move the appropriate rar files here)
C:\Projects\Shader CPP\(move the appropriate rar files here)
C:\Projects\Shader HLSL\(move the appropriate rar files here)
C:\Projects\material_user_shader.enum.h
C:\ESENTHEL\Projects\(your project's folder e.x. !h4kif3gxoo270!s45ai7a1t)\Game\Shader\2\User
C:\ESENTHEL\Projects\(your project's folder)\Game\Shader\3\User
C:\ESENTHEL\Projects\(your project's folder)\Game\Shader\4\User
C:\ESENTHEL\Projects\(your project's folder)\Game\Shader\GL\User
Now in the Esenthel Code
Code:
/****************/
#include "stdafx.h"
#include "c:/Projects/material_user_shader.enum.h"
/****************/
void InitPre()
{
Paks.add("C:/Esenthel/Bin/engine.pak");
DataPath("C:/Esenthel/Projects/(your project's folder)/Game/");
...
}
//In order to compile the shader code to the binary form.
void CompileShaders()
{
if(D.shaderModel()==SM_GL)
{
ShaderCompile("C:/Projects/Shader HLSL/2D Shader.cpp", S+DataPath()+"Shader/GL/User/Custom Shader", SM_GL);
}else
if(D.shaderModel()>=SM_4)
{
ShaderCompile("C:/Projects/Shader HLSL/2D Shader.cpp", S+DataPath()+"Shader/4/User/Custom Shader", SM_4);
}else
{
ShaderCompile("C:/Projects/Shader HLSL/2D Shader.cpp", S+DataPath()+"Shader/2/User/Custom Shader", SM_2);
ShaderCompile("C:/Projects/Shader HLSL/2D Shader.cpp", S+DataPath()+"Shader/3/User/Custom Shader", SM_3);
}
}
//This is how you call a shader technique and draw it on the screen.
void Draw()
{
Shaders("User/Custom Shader").getTech("CustomTechnique").draw(null, null);
}
I hope i didn't forget anything. Let me know if you manage to do anything.
Also you can customize the sctructure to what you want later on but until you got something working stick to the one i wrote above.