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.

Author
Message
Game_Code_here
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 26th Aug 2020 10:26
So I have tried and failed to make a shader for lighting and fog and UV light maps. I have one shader for lighting and fog and the basic light map shader.

I tried to combine them with no luck.

I'm lost in this and to be honest, a product that I buy shouldn't be so hard to code with. Everything should work if it's bought.

And a simple shader for all three is not to much to ask for.

Well, not so simple.

I have to search and search and look here and there and combine shaders together with no luck.

To be honest this is a issue I should not have to learn. It just should be provided.

If I use the basic shader I get full light maps and my levels look perfect. But lights do no effect the objects.

When I add in the lighting and fog shaders my light maps disappear but my objects are effected by light.

My head hurts ?
fubarpk
Retired Moderator
15
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 26th Aug 2020 13:27
Shaders are for the advanced in all languages
GetObjectMeshVSSource ( objID, meshIndex ) and GetObjectMeshPSSource ( objID, meshIndex )
will get the default shaders for an object this will grab the details i think your after providing you have set up the objects with fog etc
there is is also alsorts of examples and code accross the forums there is the shader thread and my snippets that should help also
https://www.appgamekit.com/documentation/guides/13_shaders.htm

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Game_Code_here
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 26th Aug 2020 21:12
Hi fubarpk

I used that code before for light and fog and it works but doesn't load in my light maps. So it's useless.

I need to use light maps with lighting

I can care less about fog.

But this is in free game making software and works with no problems.

Even fpsc is free and full shaders work with lighting and shade and light maps.
Lupo4mica37
User Offline
Joined: 1st Jun 2020
Location:
Posted: 27th Aug 2020 03:19
Patience is a virtue my friend. AppGameKit for sure is not for everyone, but as long as you are willing to solve the problem, you will be victorious, however if you allow yourself to indulge on your lack of patience then you will not learn anything and remain where you are, meaning without a solution to your problem.

All the best on your journey of discovery.
Bengismo
2
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 27th Aug 2020 13:11 Edited at: 27th Aug 2020 13:13
lol

You dont even need to use a custom shader to do this ??

If you just apply a lightmap to an object and then add a point light to a 3d scene - it works


This scene has a coned white light applied and a red point light.

If you then want the shader that is used to draw the scene you can get it with GetObjectMeshPSSource( objID, meshIndex ) and GetObjectMeshVSSource ( objID, meshIndex ) if you did want it.
Scraggle
Moderator
17
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 27th Aug 2020 18:39 Edited at: 27th Aug 2020 18:52
Quote: "a product that I buy shouldn't be so hard to code with. Everything should work if it's bought."

I know exactly what you mean. I bought a new car recently and it absolutely refused to take me anywhere. I had to get in the drivers seat and do it myself.

I mean, I bought the car, so it should just work.... right?

Login to post a reply

Server time is: 2020-10-22 02:15:56
Your offset time is: 2020-10-22 02:15:56