Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / DetailMap shader which supports AGK built'in shadows (all 3 modes or mode 3 only) ? :)

Author
Message
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 10th Dec 2017 02:38
Has anyone already achieved this ? i have already my Detail map shader (texture stage 2) but i want it to take AppGameKit built'in shadows into account at the same time i have tried (in shadow mode 1/2 for the moment which use only one texture stage (7) ...) :



but it only darkens the texture without any shadows ... (arg !)... without the shader the object correctly receives shadows

I don't imagine in mode 3 (cascade with all additional texture stage)... lol

Shaders are not my friends :p

thanks for any help
OriginalKronos
6
Years of Service
User Offline
Joined: 10th Nov 2017
Location:
Posted: 10th Dec 2017 12:46
You don't need to include anything regarding shadows in the shader. just set the shadows up with the normal commands and don't use texture slots 4-7 on the mesh.


Jeff Miller
19
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: New Jersey, USA
Posted: 10th Dec 2017 12:56
You might surf the DBPro board. I recall Green Gandalf made a shader for a self-shadowing terrain (where high points on the terrain shadowed lower portions depending upon position of sun). Lee had added ability to load a volume texture to accommodate such experiments. Don't know if AppGameKit does that as yet.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 10th Dec 2017 22:18 Edited at: 10th Dec 2017 22:19
To cast shadows you don't need anything in the shader but if you want the object to receive shadows you need to add GetPSLighting( mediump vec3 normal, highp vec3 pos ) in your light calculations.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 10th Dec 2017 23:26
thanks janbo ! i will make a try
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 12th Dec 2017 11:14
Quote: "GetPSLighting( mediump vec3 normal, highp vec3 pos )"


Works great ! thanks janbo

Login to post a reply

Server time is: 2024-04-19 03:55:01
Your offset time is: 2024-04-19 03:55:01