Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (Ayumi, Akow, monk12, AndrewAMD), 1,398 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: A Bumpmap Demo [Re: Rhuarc] #35964
11/13/04 15:06
11/13/04 15:06
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline OP
Serious User
Steempipe  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Quote:

Good to hear .

EDIT: I got two sources now too- if you use two passes, you don't have to worry about the blending


-Rhuarc




That appears to be a good solution. Good you pointed it out.

Re: A Bumpmap Demo [Re: Steempipe] #35965
11/13/04 23:36
11/13/04 23:36
Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
Rhuarc Offline
Expert
Rhuarc  Offline
Expert

Joined: Mar 2001
Posts: 3,298
Beverly, Massachusetts
I've begun to build mine back into HLSL (so far so good, *crosses fingers*), here's how I manage the two passes:
Code:
technique normalMapping
{
pass EnvLight
{
//globals
zwriteenable= true;
zenable = true;

//shaders
VertexShader = compile vs_1_1 vs_main();
PixelShader = compile ps_1_4 ps_main();
}
pass DynLight
{
//globals
zwriteenable= true;
zenable = true;
Lighting=True;
AlphaBlendEnable=True;

SrcBlend=One;
DestBlend=InvSrcColor;

BlendOp=Add;

//locals
ColorOp[0]=SelectArg1;
ColorArg1[0]=Texture;

Alphaop[0]=SelectArg1;
AlphaArg1[0]=Texture;

//shaders
VertexShader = compile vs_1_1 vs_main2();
PixelShader = compile ps_1_4 ps_main2();
}

}



vs_main2() and ps_main2() omit the base texture and only render the lighting pass; it is rendered with alpha blending over the other pass, illuminating the texture from it.

Of course, there are also advantages to keeping both lights in a single pass, as you can condense the shader more and not worry about going overkill :P.

-Rhuarc


I no longer post on these forums, keep in touch with me via:
Linkedin.com
My MSDN blog
Page 3 of 3 1 2 3

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