Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, SBGuy, Petra), 801 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Combining materials and/or shaders #457990
02/11/16 04:07
02/11/16 04:07
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
I am using the fx_mirrorWater() function from mtlfx.c and it works nicely. However, I was trying to see if I could combine this effect with the soft particles effect from the user wiki.

So far, I've been unsuccessful. I don't know anything about writing shaders, and I think by applying one material it will cancel the other one. So as a result I can have either a soft edge OR mirror water, but not both.

Now I know it's possible to have soft, reflective water in a game, there are plenty that do it. I tried combining the actual .fx files, but again, with no real knowledge of how shaders work, I didn't get very far.

Has anyone tried this, or know of a soft water shader that already exists?

Re: Combining materials and/or shaders [Re: Dooley] #458000
02/12/16 07:51
02/12/16 07:51
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
You need to learn to write shaders in order to combine them and make some great looking graphics or use a complete graphics framework.

Gamestudio actually offers you a lot of comfort when writing shaders and pipelines. Also the shader tutorial as well as the manual are quite good in this concern. Just try it wink


Visit my site: www.masterq32.de
Re: Combining materials and/or shaders [Re: MasterQ32] #458016
02/12/16 23:35
02/12/16 23:35
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Yes,
I guess I knew it would come to that. I found the shader workshop on the Gamestudio Downloads page ... is that a good place to start?

Re: Combining materials and/or shaders [Re: Dooley] #458018
02/13/16 07:24
02/13/16 07:24
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
It is.
However, it could be a little more basic or give a better overview at first.
When you read that tutorial keep the following things in mind:
- A vertex shader gets executed for every vertex.
- A pixel shader is executed for every pixel drawn to the screen (independent of the model's texture resolution).
- You transfer data from the vertex shader to the pixel shader by writing the stuff into "texcoord" texture coordinate sets/ buffers. The data the pixel shader receives is interpolated data between the triangle's corresponding 3 vertices.
- All texture coordinates are in the [0,1] interval, independent of the actual resolution. (This means for example that when you use a [0,4] interval, f.i. by multiplying the "InTex" UV mapping data by 4, your texture will be tiled 4 tiles, assuming you use WRAP as an address mode (instead of CLAMP).)


"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: Combining materials and/or shaders [Re: Superku] #458123
02/20/16 03:18
02/20/16 03:18
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Thanks for the advice!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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