Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 959 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Transparent models disappear in front of fx_mirrorWater shader. #376759
07/06/11 14:45
07/06/11 14:45
Joined: Jul 2007
Posts: 53
Germany
Henning Offline OP
Junior Member
Henning  Offline OP
Junior Member

Joined: Jul 2007
Posts: 53
Germany
Hi all,

I have a small island with palms (billboards) on it and fx_mirrorWater shader applied to the sea. When I compile it in WED and use it, some of the palms disappear when in front of the sea. See picture:
Image: rearmost palms disappear.

The same works with partly transparent models, just add the red parts to water.c from the samples folder of 3D Gamestudio installation and you will see the rearmost trees disappear:

function setTree () {
vec_fill (my.scale_x, 0.02);
vec_set (my.x, vector (random (400)-200, random (400)-200, -5));
set (me, TRANSLUCENT);
}

function main()
{
if (d3d_shaderversion<2020)
error("Shaders require Commercial Edition!");
d3d_antialias = 4;
video_mode = 8;
fps_max = 60;
// load a level, and create sky, water, and a model :
level_load("small.hmp");
ent_createlayer("skycube+6.dds",SKY | CUBE | SHOW,1);
ent_create("water.hmp",vector(0,0,-5),water);
ent_create("blob.mdl",vector(0,0,30),blob);
vec_set(sun_color,vector(200,240,240));

var i;
for (i=0; i<30; i++) {
ent_create("tree2.mdl",vector(0,0,-5),setTree);
}


Picture: model trees.
Does anybody know a solution?

Thx.

Re: Transparent models disappear in front of fx_mirrorWater shader. [Re: Henning] #376987
07/08/11 13:49
07/08/11 13:49
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
That happens because you use the Transparent Rendering Process method (see the "'Transparency' is not what you think" subject) instead of Solid Pass Process.

Simply add the d3d_entsort = 0; to the main function or add the bool PASS_SOLID; flag in the mirrorWater.fx file.


Last edited by rojart; 07/08/11 14:06.

Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: Transparent models disappear in front of fx_mirrorWater shader. [Re: rojart] #377217
07/11/11 08:30
07/11/11 08:30
Joined: Jul 2007
Posts: 53
Germany
Henning Offline OP
Junior Member
Henning  Offline OP
Junior Member

Joined: Jul 2007
Posts: 53
Germany
Thanks rojart,

d3d_entsort = 0 does the job. I looked everywhere, except for these 3d3 functions. Seems it is time to reread them.
The palms do not sort properly now in some cases as predicted, but that is a minor (not so visible) problem.

henning


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