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.

Dark GDK / Shader Help

Author
Message
Alfie
16
Years of Service
User Offline
Joined: 25th Dec 2007
Location:
Posted: 30th Nov 2008 10:42 Edited at: 3rd Dec 2008 01:19
Sorry for the long post (and sorry if this sounds noobish).

-First, is it possible to get an updated version of the documentation somewhere without installing the upgrade as it still seems to have some bugs which I don't have time for atm (as tempting as it is to check it out ><. There seems to be a lot of functions missing from the intial documentation.


-Can camera effects only write out to an image? There isn't a way to just put the effect on your main camera and rock and roll ?
I.e. is there something like dbSetCameraEffect that outputs to the backbuffer instead or something (is that actually possible?).
My main problem is at the moment I have to hide my scene for the second draw, which is just a sphere in the advanced shaders tutorial but when you have a real scene active it means hiding and showing thousands of objects each loop (also would dbSync () do its optimization properly if the scene is hidden each time it was called?). Or is there a better way to tell my main camera not to render all 3D objects in the scene?

Cheers in advance.
Alfie
16
Years of Service
User Offline
Joined: 25th Dec 2007
Location:
Posted: 3rd Dec 2008 01:30
Also, does anyone know how I can fix this problem?

Is there a way to have mipmaps without the blending thing going on here?
The second image has filtering and mipmaps turned off, but I would think without mipmaps I am also losing some performance? Or would the performance loss be basically negligable?

Even better is there a way to make sure the draw order is more accurate?
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 3rd Dec 2008 10:20
Well, some code to see the setup won't hurt.
Try changing the transparency mode.
And about the mipmapping and performance, sometimes it runs faster without mipmaps. Turning mipmapping on takes longer to load (or bigger sizes in disk, if they are pre-built) and they spend more video memory.
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 3rd Dec 2008 14:04 Edited at: 3rd Dec 2008 14:52
Quote: "Also, does anyone know how I can fix this problem?
"


That is a common problem.
The solution is to ALWAYS make sure that any part of a model that is transparent or has some transparency on it is to be rendered last.
That way you are making sure the background parts are already rendered before the transparent/ semi-transparent part gets rendered.

In objects like *.x files, the layer at the start of the file is always rendered LAST, and the layer at the end of the file is always rendered FIRST. This has implications for things like vehicles that have transparent glass on it.

As far as terrain is concerned, You are basically out of luck (based on some rendering tests i did a few weeks ago), unless you are doing bill boarding and you build up the layers so that the inner most layer (the furthest away from the camera) is rendered first and the progressive outgoing layers get rendered in the order that they are going outwards. Individual trees as you have them now is impossible to do as you have done them, and not have a problem from at least one view direction.
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 3rd Dec 2008 18:34
Yeah, just use transparency mode 4 (number 4) and see what happens

Cheers,
-Try

Login to post a reply

Server time is: 2024-11-25 08:01:10
Your offset time is: 2024-11-25 08:01:10