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
1 registered members (AndrewAMD), 945 guests, and 8 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
Bump with detail? #472089
04/05/18 21:42
04/05/18 21:42
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Is there a bump map shader that also allows for a detail map?

Last edited by Dooley; 04/05/18 21:42.
Re: Bump with detail? [Re: Dooley] #473669
08/03/18 01:06
08/03/18 01:06
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Do you have an example of what you're looking to do?

Re: Bump with detail? [Re: Steempipe] #474162
09/26/18 03:27
09/26/18 03:27
Joined: May 2005
Posts: 868
Chicago, IL
Dooley Offline OP
User
Dooley  Offline OP
User

Joined: May 2005
Posts: 868
Chicago, IL
Sorry, I did not check here for a while.

I guess I don't have an example. Just wondering if any bump map shaders allow for adding a detail texture. So you would get a bump effect from the main texture, but when you look up close you could also see a higher resolution detail map. It would be for terrain.

Re: Bump with detail? [Re: Dooley] #474173
09/26/18 13:16
09/26/18 13:16
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
You can just write it yourself. Take this normal mapping shader from the tutorial as a basis: http://www.conitec.net/shaders/shader_work4.htm

Add a third sampler that either references entSkin3 as a texture or some script BMAP via the _bmap feature.

In the pixel shader, sample your DetailMapSampler like this:
float Detail = tex2D(DetailMapSampler, InTex*8).r; // we only take the r channel, assuming it's a greyscale detail texture - *8 is the detail map scaling, try other values here

Multiply the pixel shader result/ output with Detail. This might and will darken the result a little (because 0 <= Detail <= 1), so you could multiply Detail with 1.1 or add 0.1 to it.


"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

Moderated by  Blink, Hummel, Superku 

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