Hi,
On which source code file i can get the source of the Lightmapping shader?
I am not good at source mining but i really need that for study...
Any helps appreciated...
thanks in advance...
source code of shader
source code of shader
skumar
Re: source code of shader
http://en.wikipedia.org/wiki/Lightmap
I don't think you need a shader for this technique of lighting since lights are baked into textures (?)
PS. Why do you put "..." after most of your sentences?
I don't think you need a shader for this technique of lighting since lights are baked into textures (?)
PS. Why do you put "..." after most of your sentences?
Working on game: Marrbles (Currently stopped).
-
- Posts: 758
- Joined: Mon Mar 31, 2008 3:32 pm
- Location: Bulgaria
Re: source code of shader
@skumar: AFAIK Irrlicht is not using a shader for the lightmap materials. It`s using some blend states for this, as its extremely easy. But, in a shader you`ll simply need a color sampler texture and a lightmap sampler texture, usually 2 texturecoordinate sets, which you pass from the vertex to the pixel shader and you do:
Can`t be easier than that. Well, some extremely basic shader knowledge is needed though.
Code: Select all
float4 finalColor = sampledTextureColor * sampledLightMapColor;
return finalColor;
He does this because recently there`s a shortage of "."-s in the forum because of this guy, who never puts single periods in his posts: http://irrlicht.sourceforge.net/forum/v ... =1&t=44772serengeor wrote:PS. Why do you put "..." after most of your sentences?
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Re: source code of shader
Oh, That makes sense nowshadowslair wrote:He does this because recently there`s a shortage of "."-s in the forum because of this guy, who never puts single periods in his posts: http://irrlicht.sourceforge.net/forum/v ... =1&t=44772serengeor wrote:PS. Why do you put "..." after most of your sentences?
Working on game: Marrbles (Currently stopped).
Re: source code of shader
Thank you shadowslair and all others for helping me....
serengeor.... i put a lot of dots simply to show the flow rather than a stop...
like when we speak....
everything in the life is flowing...why dont that happen when you write also....
bye .....
serengeor.... i put a lot of dots simply to show the flow rather than a stop...
like when we speak....
everything in the life is flowing...why dont that happen when you write also....
bye .....
skumar
Re: source code of shader
I was taught otherwise at school.skumar wrote:Thank you shadowslair and all others for helping me....
serengeor.... i put a lot of dots simply to show the flow rather than a stop...
like when we speak....
everything in the life is flowing...why dont that happen when you write also....
bye .....
Working on game: Marrbles (Currently stopped).