Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Set Object Transparency - Bug Report?

Author
Message
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 10th Jun 2010 01:30
Should this be a bug report?

I've been trying to set up 2 objects that are the same size and in the same location, and fade between them using SET OBJECT TRANSPARENCY and SET ALPHA MAPPING ON.

Through numerous experiments I've discovered that SET OBJECT TRANSPARENCY and/or SET ALPHA MAPPING ON breaks when you have more than 1 texture stage applied to the objects, which is my current issue since some of my objects have up to 5 textures.

Here is a quick proof to show what I'm talking about.


If you comment out the 2 lines indicated in the code, then the effect I was after works, but with only a single texture stage.

Should this go into a bug report, or is there another way I should be going about this?

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 10th Jun 2010 11:55
KISTech,

first thing, nice effect
second, I'm afraid I don't really can tell the difference when commenting or not these lines



For me they look solid all the way
I run on an Ati card here, it that helps. Maybe if you post a screen that could help.

Last thing, I see that you profusely use the 'set blend mapping on' functions for many things. I used to do so in a first stage, and still some basic things work using that. I have nothing against using it, but I found that shaders are the way for a total control. I just thought you'd want to know. These little issues that now you front are somewhat in the twilight zone for a bug report (at least for my knowledge).
Anyway let's see if we can do something about it.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 10th Jun 2010 18:34 Edited at: 10th Jun 2010 22:32
I would go completely shadered, but there are actually some users that have DX9 capable cards that aren't VS2.0 or PS2.0 capable. (I came across one such user that has VS1.0 and PS1.3)

Granted the game "barely" runs on his machine, but it does run.

On to the little program.

The ball is supposed to start out RED and transition to BLUE.

When I comment out the 2 lines indicated, it does the transition just fine. If I leave the 2 lines uncommented, the ball starts out BLUE and just stays that way.

[edit]
I found an article that explains how to transition between 2 textures in a shader. After only 30 minutes I was able to get that working.

I then looked up a chart showing various video cards and their capabilities, and have decided I'm going to shut down support for non-shader level 2 cards. If the machine/card is that old, it's just not got the horsepower to run the game right anyway, so why kill myself and waste time trying to support them through tricks and techniques from old commands that may or may not get any love anytime soon from the developers.

I am now preparing myself to become a shader guru.
(or at least a close facsimile thereof..)

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 11th Jun 2010 11:27
Quote: "The ball is supposed to start out RED and transition to BLUE.

When I comment out the 2 lines indicated, it does the transition just fine. If I leave the 2 lines uncommented, the ball starts out BLUE and just stays that way."

Well, it goes from red to blue here no matter if the lines are commented or not

Quote: "I found an article that explains how to transition between 2 textures in a shader."

Sure, I think you'll find it easier than you thought, once you know how it is done

Quote: "I then looked up a chart showing various video cards and their capabilities, and have decided I'm going to shut down support for non-shader level 2 cards. If the machine/card is that old, it's just not got the horsepower to run the game right anyway, so why kill myself and waste time trying to support them through tricks and techniques from old commands that may or may not get any love anytime soon from the developers."

I agree. Priorize to give the best visual results, then you can always have an option to 'turn shaders off', for those computers of the 20th century.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 11th Jun 2010 18:11 Edited at: 11th Jun 2010 18:13
Quote: "Well, it goes from red to blue here no matter if the lines are commented or not"


It's just a guess, but are you running the U7.5 beta? I'm still running U7.4.

Quote: "for those computers of the 20th century"


You make it sound like such a long time ago.

Doing the transition in a shader was quite easy. I've completely redone the intro to the game using a shader and texture transitions. I still need to play with the textures a bit, but the animation looks pretty good.

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 11th Jun 2010 18:51
Quote: "It's just a guess, but are you running the U7.5 beta? I'm still running U7.4."

I'm afraid I don't remember when I did the last DBPro update, ajem. Help->About says version 1.071

Maybe someone with an up to date version could try your sample.

Quote: "Doing the transition in a shader was quite easy. I've completely redone the intro to the game using a shader and texture transitions. I still need to play with the textures a bit, but the animation looks pretty good."

Glad to hear so

Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 12th Jun 2010 14:22 Edited at: 12th Jun 2010 14:23
I get the same problem as KISTech (the ball just stays blue in 7.5).

In 7.3 ( or 7.4) the "Set Blend Mapping On" command changed to include four extra parameters. I remember as i just had set up a terrain to blend and when 7.3(4) came it broke that setup so i had to redo all the work again . I have shadered that part now though but still have the old blend setup left as an option however as my app is PhysX dependent i could probably take it out as the GFX hardware needed probably is SM 2.0 compliant.

So if 7.1 works it may have been broken and need a bug reporting.

Regards
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 12th Jun 2010 19:15
Ok. With that information I'll go ahead and post it as a bug.

Thanks.

Login to post a reply

Server time is: 2024-05-02 03:34:53
Your offset time is: 2024-05-02 03:34:53