Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,574 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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