Chernobyl Shaders - converting all shaders to Cg in work...
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
-
- Posts: 299
- Joined: Mon Nov 27, 2006 6:52 pm
- Location: GERMANY
- Contact:
Hey guys, can anyone accord me a plastic shader in HLSL? Perhaps convert Nadro's one to HLSL? Don't know how much work it is to convert such a shader, sry.
@Nadro: great work!
@BlindSide: When do you think to release your shader-pack? Does it contain a plastic shader? Which shader will it include in general?
Hope your pack is released soon
@Nadro: great work!
@BlindSide: When do you think to release your shader-pack? Does it contain a plastic shader? Which shader will it include in general?
Hope your pack is released soon
You can probably use ATI's http://sourceforge.net/projects/hlsl2glsl to convert most of your HLSL to GLSL.BlindSide wrote:Hey since you are good at GLSL can you convert my shadow mapping shaders from HLSL to GLSL please? I will release my own shader pack very soon in HLSL so we can work together to provide solutions for both drivers.
PS: Irrlicht already has Shadow Volumes thats what stencil shadows are...But maybe it is faster in a shader?
-
- Posts: 299
- Joined: Mon Nov 27, 2006 6:52 pm
- Location: GERMANY
- Contact:
Yes I used this but for some reason it didnt work, I think it will need someone to do it manually. Also Irrlicht requires a special method for passing textures to GLSL that is different from HLSL (And im not sure what that method is haha). But I really want to switch shadow maps to open gl because:HidekiAI wrote:You can probably use ATI's http://sourceforge.net/projects/hlsl2glsl to convert most of your HLSL to GLSL.BlindSide wrote:Hey since you are good at GLSL can you convert my shadow mapping shaders from HLSL to GLSL please? I will release my own shader pack very soon in HLSL so we can work together to provide solutions for both drivers.
PS: Irrlicht already has Shadow Volumes thats what stencil shadows are...But maybe it is faster in a shader?
A - In opengl (In irrlicht) you can have any resolution RTT you want, so high res shadow maps without having to change screenres.
B - In opengl (In irrlicht) you can use 24-bit depth maps.
@Masterhawk. About releasing my pack, it will hopefully be pretty soon. I had the flu for a while and I just went on a trip too so time was limited. Hopefully tomorrow or the day after I can finish it up. It has some shaders similar to plastic like phong etc. In fact there is a plastic material so I will try and add that one (Not sure what shader model it was tho..).
-
- Posts: 299
- Joined: Mon Nov 27, 2006 6:52 pm
- Location: GERMANY
- Contact:
Hm, this shader don't work for me. First it says ' Unexpected token: "[" '. When I comment it out the shader loads correctly, but when using I cannot see my sphere and an error message occurs again and again...
error msg:
error msg:
Do I have to have a dynamic light in my scene?HLSL Variable to set not found: 'mLightColor'. Available variables are:
'view_position' Registers:[begin:4, count:1]
'view_proj_matrix' Registers:[begin:0, count:4]
You must add variable in CallBack mLightColor eg:
For OpenGL my shader CallBack look that:
You needn't any Lights on the scene
Code: Select all
video::SColorf Color(1.0,0.9031,0.1536,1.0);
services->setVertexShaderConstant("mLightColor",reinterpret_cast<f32*>(&Color), 4);
Code: Select all
class CGE_Shaders:public video::IShaderConstantSetCallBack
{
public:
virtual void OnSetConstants(video::IMaterialRendererServices* services, s32 userData)
{
video::IVideoDriver* driver = services->getVideoDriver();
core::vector3df Camera_Pos = device->getSceneManager()->getActiveCamera()->getAbsolutePosition();
services->setVertexShaderConstant("Camera_Position", reinterpret_cast<f32*>(&Camera_Pos), 3);
video::SColorf Color(1.0,0.9031,0.1536,1.0);
services->setVertexShaderConstant("Color", reinterpret_cast<f32*>(&Color), 4);
}
};
-
- Posts: 299
- Joined: Mon Nov 27, 2006 6:52 pm
- Location: GERMANY
- Contact:
But these variables are already set in my shader callback. that's the strange thing...
my shadercallback is the one from the shader-tutorial
http://irrlicht.sourceforge.net/tut010.html
my shadercallback is the one from the shader-tutorial
http://irrlicht.sourceforge.net/tut010.html
-
- Posts: 299
- Joined: Mon Nov 27, 2006 6:52 pm
- Location: GERMANY
- Contact: