Gamestudio Links
Zorro Links
Newest Posts
Tradestation Multi-sessions??
by walt_Schwarz. 06/27/26 12:32
Z9 getting Error 058
by jcl. 06/26/26 14:07
ZorroGPT
by TipmyPip. 06/24/26 18:31
Lapsa's very own thread
by Lapsa. 06/20/26 18:18
Ranger by Robert Pardo - now for Zorro
by Smallz. 06/20/26 11:23
Z12 live performance
by jcl. 06/19/26 11:21
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 11,081 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: 2 pass rendering [Re: Matt_Aufderheide] #19964
04/23/04 08:51
04/23/04 08:51
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
i still don't understand how this works.

i have an effect which uses 3 texture stages:

colormap
detailmap
shadowmap

the shadow map does only contain shadows and no lighting information (white = no shadow, black = shadow). so i use modulate and not modulate2x.

for older cards i would like to render the shadow map in a second pass.

i enabled alpha blending and tried all

SrcBlend
DestBlend

combinations but nothing worked properly. what exactly is the source and what the destination? what do i have to set as colorop in the second pass? how does rendering such an effect in two passes work? do i need an alpha channel?

Re: 2 pass rendering [Re: ventilator] #19965
04/23/04 10:36
04/23/04 10:36
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
I have been screwing with this a little too. To see Pass p0 an p1 you will
need to look at the fixed-function multitex at my site/





The basic way I am adding a shadow map is this way, and it is happening
in Pass p2:

Pass p0
{
.... lay down the base skin
.... using tex[0]
}

Pass p1
{
.... Add a second texture using an alphamap
.... Using Texture 0,1
}

Pass p2
{

alphaop[0]=disable; // Frame buffer is filled, but no alphaops wanted

alphablendenable=true;

SRCBLEND=ZERO; // <<<<<<<<<<<<<
DESTBLEND=SRCCOLOR; // <<<<<<<<<<<<<

zenable=true;
zwriteenable=true;
ditherenable=true;

Texture[1] = <mtlSkin2>;

magFilter[1]=linear;
minFilter[1]=linear;
mipFilter[1]=linear;

TextureTransformFlags[1] = disable;

texcoordindex[1]=1;

}

Re: 2 pass rendering [Re: Steempipe] #19966
04/23/04 22:13
04/23/04 22:13
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
thanks! i got it to work. the reason for the problem was this:

first pass:

colormap
detailmap

second pass:

shadowmap
disable

if you don't disable the second texture stage of the second pass it uses the same settings as in the first pass which leads to strange results!

Re: 2 pass rendering [Re: ventilator] #19967
04/24/04 10:03
04/24/04 10:03
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
I see...

Your note about disabling the pass 2/ stage 2 operations made sense.

I made a new project, did not do any masking of textures and disabled the 2nd stage of pass 2. In the earlier reply I think I had to disable AlphaOp because I was using alphamap in the previous passes. I suppose I could have done that in the 2nd stage as well.

Here are some shots for comparing shadow, diffuse light, and just a detail map.
web page

Page 2 of 2 1 2

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