Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Imhotep, opm), 785 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Lighting Question [Re: Superku] #475721
01/05/19 02:07
01/05/19 02:07
Joined: Jan 2006
Posts: 245
PA
Garrettwademan Offline OP
Member
Garrettwademan  Offline OP
Member

Joined: Jan 2006
Posts: 245
PA
Okay so I watched your over the top demo of your shaders and now I am shaking with excitement literally, like my mind is racing on what I just saw. Okay so question, I am using C-Script, what am I limited to on the shaders I just saw? I feel like since I am using C-Script and now Lite-C I am limited.

Second question, how in the heck did you learn how to do those shaders? Do you have a learning source so I can look into this and start getting into trouble?

You have just boggled my mind by the way.


Current Project: Computer Repair Simulator
https://www.computer-repair-simulator.com
Re: Lighting Question [Re: Garrettwademan] #475729
01/05/19 16:25
01/05/19 16:25
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Hehe. Well, I haven't used C-Script in 11 years or whenever lite-C came along, but looking at the Gamestudio Wiki you can use regular DX9 shaders with it. Apparently, the postprocessing works the same as well, which is good.

Slin made some shader tutorial videos many years ago, I watched them but didn't get much from them (nonetheless they were my start into the world of shaders, so thanks for that!). You only need to understand the basic concept of rendering with shaders, everything else is straightforward (more or less) and learning by doing from there on.
For each vertex a vertex shader function is executed. It uses input such as position, texture coordinates, normals, does some calculations with them and writes the results in some registers. For every pixel on screen (not a texture pixel) when drawing a triangle a pixel shader function is executed where you can grab interpolated information from the 3 vertices (and vertex shader results) making up the triangle. On a very basic level this might be interpolated texture coordinates which you can use to sample a texture, for color, normal maps and all that good stuff.

Oh, there's an official tutorial I forgot: http://www.conitec.net/shaders/
Read "Introduction", "The D3D Pipeline", Workshop 1,2,5 for a start.
I have a default shader similar to the one from Workshop 2 and use it as a basis for most new shaders, no need to write it a new each time.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Lighting Question [Re: Superku] #475745
01/06/19 14:19
01/06/19 14:19
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline
Serious User
jumpman  Offline
Serious User

Joined: Apr 2002
Posts: 1,246
ny
@superku

Excellent work! How did you get multiple shadow casting lights?

Re: Lighting Question [Re: jumpman] #475749
01/06/19 16:44
01/06/19 16:44
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Thank you!
I'm rendering all lights (views) into a single 16bit shadow atlas texture, as in DOOM (2016) (and probably many/ most other game):

My render/ lighting pipeline is not finished yet though, currently the number and types of lights are hardcoded into a single pass.
I want to make a quad based deferred renderer (for the lights) if that makes sense. That is let's say divide the screen into 8x6 quads, then calculate for each quad lights which touch the extruded quad volume in screen space and then process that quad with a custom bmap_process function. The latter is already implemented, for the most part at least, and allows to execute a pixel shader for sections of the target bitmap - which in my case could be a 16 bit HDR light color map, we'll see.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Lighting Question [Re: Superku] #475775
01/07/19 18:34
01/07/19 18:34
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline
Serious User
jumpman  Offline
Serious User

Joined: Apr 2002
Posts: 1,246
ny
WOW. All I can really say.

I love doom, and saw many talks and PDF's about their rendering and animation process, but here you are actually doing it. I think Conitec should hire you.

Re: Lighting Question [Re: jumpman] #475781
01/07/19 19:40
01/07/19 19:40
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Haha there's still quite a few differences between DOOM's and my rendering but... thanks. wink
Yeah they have some good stuff in there, and it's nice of them to share it with us folks.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1