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/AppGameKit Studio Showcase / 3D Point Light Shadow Shader

Author
Message
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 22nd Feb 2023 16:43 Edited at: 22nd Feb 2023 16:46
So i made a Point Light shader a few years ago but i never posted the code and that changes with this post.

Example Project
3D Point Light Shadow Shader.zip

Notes
It supports only one light no sun no nothing.
I posted it like it is so you have something to work with and a chance figure out the rest.
The Color comes from the PointLight that is build into AppGameKit but you have to pass and update the position and range to the shader.
For more lights you would need to render more cubemaps(equrectangular maps might might be usefull here too) and pass them to the shader (preferably combined in one texture to save texture stages) and add a for loop in the shader and so on.
You can shoot balls and place the light with a press of the pointer.
I invite you to try it and post your findings.

Video

Attachments

Login to view attachments
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 22nd Feb 2023 18:19
Thank you mr Janbo I will make good use of this.

Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 26th Mar 2023 15:53
Hi

Thank you.
It's vey interesting.
AGK2 tier1 - http://www.dracaena-studio.com

Login to post a reply

Server time is: 2024-04-14 15:24:53
Your offset time is: 2024-04-14 15:24:53