Gamestudio Links
Zorro Links
Newest Posts
Votes for future features
by 7th_zorro
Today at 01:57
Open WMB file
by Superku
Yesterday at 23:37
Stopping and resuming sessions without interrupting trade statis
by jcl
Yesterday at 08:14
Best Devlopment Experience
by j45p41
03/20/19 23:04
Blog Post: Continuous Futures Data in Zorro
by chsmac85
03/20/19 15:59
Error message : Closing Order Quantity
by OptimusPrime
03/20/19 12:49
script can work but no result(Profit and loss)
by jcl
03/20/19 09:12
AUM Magazine
Latest Screens
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Who's Online
6 registered (MINER, kvm, 3run, sdh309795gaas, 2 invisible), 618 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
FrankFred, QuartzLoop, Conchip, danatrader, ilikezorro
18190 Registered Users
Page 2 of 2 < 1 2
Topic Options
Rate This Topic
#475721 - 01/05/19 03:07 Re: Lighting Question [Re: Superku]
Garrettwademan Offline
Member

Registered: 01/26/06
Posts: 242
Loc: 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

Top
#475729 - 01/05/19 17:25 Re: Lighting Question [Re: Garrettwademan]
Superku Offline
Senior Expert

Registered: 09/13/03
Posts: 6828
Loc: 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

Top
#475745 - 01/06/19 15:19 Re: Lighting Question [Re: Superku]
jumpman Offline
Serious User

Registered: 04/17/02
Posts: 1222
Loc: ny
@superku

Excellent work! How did you get multiple shadow casting lights?
_________________________
A8 Pro 8.47

Top
#475749 - 01/06/19 17:44 Re: Lighting Question [Re: jumpman]
Superku Offline
Senior Expert

Registered: 09/13/03
Posts: 6828
Loc: 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

Top
#475775 - 01/07/19 19:34 Re: Lighting Question [Re: Superku]
jumpman Offline
Serious User

Registered: 04/17/02
Posts: 1222
Loc: 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.
_________________________
A8 Pro 8.47

Top
#475781 - 01/07/19 20:40 Re: Lighting Question [Re: jumpman]
Superku Offline
Senior Expert

Registered: 09/13/03
Posts: 6828
Loc: 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

Top
Page 2 of 2 < 1 2


Moderator:  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