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 / The Ultimate Shader Thread.

Author
Message
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 1st Apr 2004 22:48 Edited at: 3rd Jun 2004 03:00
The purpose of this thread is to serve as a repository for both shaders, and tutorials on getting shaders to work with DBPro. It will also hold answers to many of the questions commonly asked about shaders.

But first a brief introduction.

INTRODUCTION

Shaders are programs that run exclusively on modern graphics hardware. However, there are many different profiles for shaders which dictate what graphics hardware they can run and what they are capable of.

Profiles consist of different instruction sets that have varying capablities. They are usually refered to by number. For example, one of the earlier vertex shader versions is called vertex shader 1.1 or VS_1_1 or vs 1.1 for short. Shader profile is one of the most common reasons that a shader won't run on your hardware.

A complete list of profiles is as follows.

Vertex shader 1.1
Vertex shader 2.0

Pixel shader 1.1
Pixel shader 1.2
Pixel shader 1.3
Pixel shader 1.4
Pixel shader 2.0

Generally, if a card can support a profile it can support all profiles below it. For example, the Geforce 4 ti 4200 supports Pixel shader 1.3. So it also supports Pixel shader 1.2 and Pixel shader 1.1.

For information on what profile your graphics hardware supports go to the website of the graphics card and it will usually tell you.

Here's a general reference as to what supports what. Cards newer than the listed cards here almost always contain all of the profiles listed for the older cards.

Nvidia Geforce 3 ti - VS 1.1, PS 1.1
Notes:
One of the earliest shader capable cards out there. It supports the basic bare minimum shader profiles and Nvidia cards older than this do not support shaders whatsoever.

ATI Radeon 8500 - VS 1.1, PS 1.1, 1.2, 1.3, 1.4
Notes:
Came out 6 months after the Geforce 3 ti. This is ATI's entry into the shader capable graphics card market. It supports the basic vertex shader profile as well as several new pixel shader profiles most noteably PS 1.4.

Nvidia Geforce 4 ti - VS 1.1, PS 1.1, 1.2, 1.3
Notes:
Adds several new pixel shader versions to the geforce series. Does not support pixel shader 1.4 as this was ATI's creation.

ATI Radeon 9500 - VS 1.1, 2.0 PS 1.1, 1.2, 1.3, 1.4, 2.0
Notes:
Added VS 2.0 and PS 2.0 to the Radeon series. This card and all other Radeons after it should be able to run any shader out there currently.

Nvidia GeforceFX 5200 - VS 1.1, 2.0, PS 1.x, 2.0
Notes:
This card and all other Geforces after it should run almost any shader that you can find out there.

Nvidia GeforceFX 5700 - VS 1.1, 2.x PS 1.x, 2.x
Notes:
The GeforceFX 5700 and up(with the exception of the 5800) add new extensions to the 2.0 model for both vertex and pixel shaders which makes them pixel and vertex shader 2.x capable.

Nvidia Geforce 6800 - VS 1.1, 2.x, 3.0 PS 1.x, 2.x, 3.0
Notes:
Adds the new Shader Model 3.0(VS and PS 3.0) to the Geforce series.

A special note about Geforce 4 MX:
This is the one card that breaks the rule of newer cards supporting the profiles of older cards. This card doesn't support any of the pixel shader profiles and it only supports VS 1.0 which was a vertex shader profile that was never intended to be used in graphics hardware. Its a terrible card that is nothing more than a souped up geforce 2 and I'd recommend avoiding it and buying something far better like a GeforceFX 5200 which is around the same price as Geforce 4 MX but absolutely blows it away in terms of performance and features. I'd even recommend getting the older Geforce 3 ti over the MX.

What profile a shader uses is largely determined by what instructions or how many instructions it uses. Shaders in the .fx file format have their profiles explicitly stated in the .fx file so determining what profile a shader uses is a piece of cake. Shaders that are not in the .fx file format(which we will deal with shortly) are another story.

Shaders written in assembly have what profile they use at the top of their code in abbrevated form. So if you see a VS 1.1 at the top of an assembly shader than it means that it uses the Vextex Shader 1.1 profile.

Shaders written in HLSL, High Level Shader Langauge, do not have their profile explicitly stated in them if they are not in the .fx file format. These are a lot harder to determine whether they work for one profile or not so your best hope of finding out is to look at whatever information came with it if you got it off the net or if that fails just try compiling it with a shader compiler under various profiles. If you are really knowledgable about shaders you could determine what profile it uses by spotting any instructions that are specific to that particular profile but this won't always work as a shader could be of a certain profile because of instruction count limits and not because of instructions used.

DBPro doesn't deal with straight HLSL shader files, though it can deal with assembly files. So concerns about shader profile won't really factor in until you decided to convert an HLSL shader to the .fx file format.
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 1st Apr 2004 22:49 Edited at: 2nd Apr 2004 21:24
THE FX FILE FORMAT - PART ONE - BUMPREFLECTHLSL SHADER IN DBPRO

The .fx file format is a simple, easy, to use format that encapsulates a number of parameters required to run a shader. These parameters include, but are not limited to, the shaders themselves, various techniques, the number of passes to be made, textures used, models used, constants, render states, sampler states, shader states, light properties, materials, etc. Basically, almost anything that can make up a graphical scene is or can be included in a .fx file.

In this tutorial, I will cover how to set constants, loading in the media that DBPro requires to run shaders as well as a brief overview of the FX file. The specific shader that we will be using is the BumpReflectHLSL shader that comes with Nvidia's FX Composer. The Media for this tutorial can also be found with Nvidia's FX Composer.

Here is the BumpReflectHLSL shader in .fx format:


It can be broken up roughly into Seven sections.

The first section is called "un-tweakables."

The un-tweakables are a series of constants that can't be manipulated by hand. You can't just increase one of the values in them by one and expect to see coherent results. These un-tweakables usually consist of a series matricies that are necessary to display 3D models on the screen. An example of one of these maticies would be this:



This section of code can be split up into four parts: type, variable name, semantic, and annotion.

The float4x4 part is the type. This denotes the fact that the variable is a 4 by 4 array of floating point numbers. Most matricies are size float4x4 though they can be smaller.

The worldMatrix part is the variable name. The variable name always comes directly after the type. This is important as we might need this variable name later on if we need to set the constant manually. Setting a constant manually is usually necessary when DBPro can't set it for you due to an unrecognized semantic.

Which leads us to Semantics, the next part of in this section of code. The part that comes after the ":" symbol is the Semantic; in this case it is World. DBPro recognizes a certain set of case-insenstive semantics and will supply the necessary data for them. The current list of supported semantics as of Upgrade 5.2 is as follows:

World
View
Projection
WorldView
WorldViewProjection
WorldIT
ViewIT

The final part of this section of code is the annotion. It consists of everything between the < and > symbols. Annotions are optional and are entirely application specific. There is no current standard for what can be in an annotion. They are mainly used by content creation applications like FX Composer to provide additional information like what kind of User Interface gadget the constant can use if any. You'll see in this section of code that the UI widget is set to "none." That's because matricies like these can't be easily manipulated due to the complex math behind making a valid matrix.

The next section of the .FX file is called "tweakables".

There is only one in this file, bumpHeight, but there is usually more. As you can see, bumpHeight is of type "float" and is to be set to 0.5. DBPro, as of upgrade 5.2, won't set it to 0.5 though. You'll have to set bumpHeight manually.

The next section of the .FX file format contains the textures to be loaded and their respective sampler states.

This section will need a little modifying as DBPro, as of Upgrade 5.2, doesn't support FX Composers naming conventions. You'll have to change the line:

to:

Basically, you change "Resource" to "name" and DBPro will understand that you want to load a texture. Do the same for the cube map so it's line looks like this:

These two textures are included with FX Composer. You'll find them under MEDIA->HLSL_textures and MEDIA->textures->cubemaps respectively. Make sure that you include these files in the same directory as your shader so they load with it.

The section after the previous one holds the structures that are passed into and out of the Pixel and Vertex shader if any.

These really aren't very important for our purposes right now so I'll skip over them.

The next two sections are the vertex shader and the pixel shader respectively.




Now there can be more than one vertex and/or pixel shader in the .FX file or than can be none at all(which will be covered in a subsequant tutorial). These sections will only exist for HLSL shaders. Assembly shaders are contained in another section.

The final section of the .FX file is the technique section.

There can be any number of different techniques in a .FX file but there most always be at least one. There are two techniques in this paticular shader, BumpReflect0 and ReflectNoPixelShader. BumpReflect0 contains two shaders that use profiles pixel shader 2.0 and vertex shader 2.0. This is the high quality version of the effect. The second technique, ReflectNoPixelShader, is a lower quality version of the effect and will run on most cards. Its image quality is based on how well tessellated the model is though. DBPro will operate on the first technique if your card can run it. If it can't it will move to the next available technique and see if it can run that. So no need to switch techniques to get what version you need to run it on a card, unless you are deliberately running the technique below the cards capabilites to boost your games performance. Or running a different effect using the shaders in the effect file. The choice is your's.

But enough talk. Lets get to some code.

In order to figuare out quickly what constant's you are going to need to set start a new project and type in this code:

This will print all of the constants to the screen. The important part to notice is the value of "Hook: ". It will be 1 if DBPro knows how to set the value and 0 if it doesn't. A gentle reminder: Make sure that you have the media for this shader in the same directory as the shader before you run this code.

Now you should see a 0 value after the hook for worldViewMatrixI, viewInverseMatrix, and bumpHeight. Will deal with bumpHeight first because it is the easiest. In order to set the bumpHeight constant all you have to do is type in the following code before the do loop:


Now we know that bumpHeight is of value float due to "VarType: " having a value of 3. The value of VarType corresponds to what type the constant expects. Here are the values and their corresponding Types:

Value: 0 Type: Undetermined. This occurs for textures and sampler states. Since we don't need to be set anything with a Value of 0 these should be ignored.

Value: 1 Type: Boolean.

Value: 2 Type: Integer.

Value: 3 Type: Float.

Value: 4 Type: Vector.

Value: 5 Type: Matrix.

Now we move on to the two matricies that need to be set, worldViewMatrixI and viewInverseMatrix. Lets start with worldViewMatrixI.

Figuaring out what these matrices need is usually pretty easy as most coders name their variables after the order in which the matrices are multipled or operated on. For example, with worldViewMatrixI we can deduce that we will need a world matrix and a view matrix to multiple together and an inverse operation to perform on the result. So write in the following code above the do loop to set up the matrices we will need for this constant:

Here we are making two 4x4 matricies numbered 1 and 2. The null return value is not important. It will always be 1 and isn't really needed other than to fill out the requirement of a variable for the make matrix4 to return its result into.

Next up is filling in these matricies. Now the DBPro 3DMath command set has a large selection of possible matrices to choose from. We want two paticular matrices, World and View, so we use the World Matrix4 and the View Matrix4 commands:

Its as easy that. We now have our matricies filled out so lets multiply them.

DBpro's 3Dmath command set is really simple so don't let other people fool you into thinking it's too tough to approach. Take the above command for example. All we did was multiply matrix 1(our world matrix) by matrix 2(our view matrix) and store the result back into matrix 1. So now we have matrix 1, which contains world*view, and matrix 2 which contains just view. Pretty simple, no?

All we have to do now is perform one last operation on matrix 1 and we are ready to set our first matrix constant. Type this in after the above code:

The null# is just a place holder for the necessary return value needed by inverse matrix(which is also a float and not an integer for some bizarre reason).

With this simple operation performed on our world*view matrix we now have the necessary result needed to set our constant. So without further ado here is the code to set the constant:


That's one down. Now for number 2.

Recall that we already stored our view matrix into matrix number 2. Now to get the value for viewInverseMatrix we have to, as you might have guessed, invert our view matrix. We'll use the same command as we did last time:

Since that is all that we have to do to get the needed result we type in the following code to set the constant:


With that done you should be able to run the the shader and see the BumpReflectHLSL shader in all of its glory.

A Quick Note: if you left the code for checking your constants in your do loop you'll notice that the hook values for the constants you just set are still 0. This doesn't mean that you didn't set them. DBPro, as of Upgrade 5.2, doesn't check to see if you set a constant. Only whether the semantics associated with that constant are supported or not.

This concludes the first part of THE FX FILE FORMAT tutorial series. For the complete code to run the BumpReflectHLSL shader look in the source button below this post.

If you find any factual errors or would like to recommend any additions to this post that would increase clarity(not content) than please post in this thread and I'll see what changes I can make.
las6
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 2nd Apr 2004 09:09
VERY nice tutorial. I'd suggest that mods make the thread locked & stickyed. (easier to handle)

only few things.
1. I assume that the 'I' in worldViewMatrixI stands for inverse. Cos I was a bit lost there not knowing why the matrix was inversed.

2. The first source box is a bit overwhelming. Perhaps you should add one box with the untweakables. Easier to get the hang of it without scrolling back to the original box and so on...

3. Will there ever be "automatic" shaders.. meaning that can DBpro automatically feed the shader with the correct matrices if it recognizes the semantics or is it always manual?


Keyboard not detected. Press F1 to continue.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 2nd Apr 2004 11:22
Nice work. I shall return to this thread when I reach the "eyecandy" stage of my project.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 2nd Apr 2004 11:38
Nice, I'll be sure to read it when I get a new graphics card.


"Computers are useless they can only give you answers."
_Gouki_
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: England
Posted: 2nd Apr 2004 13:49 Edited at: 2nd Apr 2004 13:50
Good call Neophyte.

One small tip:

The last row of the ViewIT (inverse transpose view) matrix holds the eye position in world space. Easier than explicitly passing it in.



Darren
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 2nd Apr 2004 21:25
@las6

"VERY nice tutorial."

Thanks. It took me a while to write.

" I assume that the 'I' in worldViewMatrixI stands for inverse. Cos I was a bit lost there not knowing why the matrix was inversed."

Yeah, it does. Of couse, the semantic that is associated with the variable is also named WorldViewInverse(which DBPro doesn't support) so that kind of gives it away as well.

"The first source box is a bit overwhelming. Perhaps you should add one box with the untweakables. Easier to get the hang of it without scrolling back to the original box and so on..."

Will do.

"Will there ever be "automatic" shaders.. meaning that can DBpro automatically feed the shader with the correct matrices if it recognizes the semantics or is it always manual?"

I believe if it regcognizes the semantic associated with the variable than it will automatically feed the needed data in. It won't always be manual.

@_Gouki_

"The last row of the ViewIT (inverse transpose view) matrix holds the eye position in world space. Easier than explicitly passing it in."

Thanks for the tip. I'll keep that one in mind.
las6
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 14th Apr 2004 11:00 Edited at: 14th Apr 2004 15:52
few other questions:

When's the next one coming?
(you said it was series!)

oh and you should be paid big bucks for this. Have you tried to sell this to TGC for little support? (I hear they are buying tutorials)

Are you going to do even simpler shader example? I think one with no media would be good. (for those without DX9SDK - might be tricky to find a cubemap .dds)
Perhaps a Noise-generating shader or simply a per-pixel lighting shader would be a good example. That would make even better "first step".

Ever planning on putting these on any other form rather than a forum post? Printer-friendly would be good thing too. (just printed this out... or actually just the Bumpreflect shader part - 9 pages with the source boxes on {except the first} and +4 pages for that.)


| Keyboard not detected. Press F1 to continue. |
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 14th Apr 2004 20:06
Quote: "I hear they are buying tutorials"

they stopped


Formerly known as "DarkWing Duck"
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 15th Apr 2004 07:31
@las6

"When's the next one coming?
(you said it was series!)"

Not sure. I haven't really begun work on the next one yet but I do have plans. I've been busy lately so hopefully I'll be able to get the next one out by at the latest next week. At the earliest I might be able to make it this week, but I can't make any promises that I will.

"oh and you should be paid big bucks for this. Have you tried to sell this to TGC for little support?"

I thought about it, but I decided against it. At the time there were a lot of questions about shaders popping up and since the tutorials that Rich asked for still haven't become available(to my knowledge) I choose to just release it for free as that was the quickest way to get it out and answer people's questions.

"Are you going to do even simpler shader example? I think one with no media would be good. (for those without DX9SDK - might be tricky to find a cubemap .dds)"

Originally, I was going to post part one with a medialess shader but since most shaders require some sort of media I wanted to get an example out that was representative of most stuff people will encounter. I still have the source for the medialess shader that I used so I might post that in the next few days along with a quick explaination.

I don't know if I'll have the time though. As I said before, I'm really busy and this is the first time of managed to get onto the forums all day. We'll see how events fold out in the next few days.

"Perhaps a Noise-generating shader or simply a per-pixel lighting shader would be a good example. That would make even better "first step"."

Noise-generating shaders require PS 2.0 and since not many people have the latest hardware, I decided against using anything fancy. Same applies for per-pixel lighting...usually.

There are lower version capable per-pixel lighting shaders out there that accomplish the task with multiple passes and normal maps but they aren't as easy to find. I'll see what I can do about finding one though as I remember a lot of people being interested in per-pixel lighting shaders.

"Ever planning on putting these on any other form rather than a forum post?"

Maybe. I might collect all of these and put them into one big pdf, but I lack some place to upload it currently. If this series gets really popular I could always ask Rich to host it in PDF format along with all of the required media. He might agree to host it but I don't really know for sure.
las6
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 15th Apr 2004 11:42
Hosting shouldn't be a problem. I have 2 - 4 places where I could host it myself. (depending on the size) And I'm sure there are many others willing to host it for you.

as for the 2.0 issue. I see how you might want to stick with the basic shaders, but the way I see it, the shaders become usefull After the PS2.0 version. 3.0 is just around the corner as nVidia 6800 Ultra has been already previewed... and I suspect DirectX 9.0c won't be far behind.
(and you can get 2.0 shaders on pretty Normal cards thesedays... {mine's a Radeon 9600 pro} still, a lot of people have quite old HW)
But I see your point, so in the end it's up to you whether you want to do it or not.

No worries if you're busy. I know a thing or two about that and something about deadlines too. So take your time, at least I'll be waiting for the next one.


| Keyboard not detected. Press F1 to continue. |
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 15th Apr 2004 20:20
Vertex Shader Fixed-Function, 1.0, 1.1, 2.0, 2.x
Pixel Shader 1.0, 1.1, 1.2, 1.3, 1.4, 2.0, 2.x

NVIDIA
Geforce : None
Geforce 2/2mx/4mx : FF
Geforce 3/*4Ti : FF PS 1.0/1.1/1.2/1.3 VS 1.x
Geforce **FX : FF PS 1.x/2.x VS 1.x/2.x
Geforce 6 : FF PS 1.x/2.x/3.x VS 1.x/2.x/3.x

ATI
8500 : PS 1.0/1.1 VS 1.x
9000/9200 : FF PS 1.0/1.1/1.3 VS 1.x
9500/9700 : FF PS 1.0/1.1/1.2/1.3 VS 1.x
9600/9800 : FF PS 1.x/2.0 VS 1.x/2.0

S3
ChromeDelta : FF PS 1.1/1.3/1.4/2.0 VS 1.x/2.0

Matrox
Perhelia 256/512 : FF PS 1.0/1.1/1.4 VS 1.x

SiS
Xaber : FF PS 1.x VS 1.x

*The exception being Geforce 4 Ti 4800/4900 both support PS 1.4 as well
**There are a number of 2.x Extentions only available to the 58xx/59xx versions of this GPU


Athlon64 FX-51 | 1.5Gb DDR2 PC3400 | GeForce FX 5900 Ultra 56.60 | DirectX9.1 SDK | Audigy2 | Windows XP 64-Bit
Ideajuice
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Cyberspace.. out near the edge
Posted: 17th Apr 2004 03:18
#define name resourcename

at the top of your effects file, and you can edit shaders with NVidia FX Composer and for the most part just use them in DarkBasic without having to edit them at all.

E Unibus Plurum
Ideajuice
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Cyberspace.. out near the edge
Posted: 17th Apr 2004 03:24
I just reread the original tutorial, and apparently FX Composer has changed the syntax, but the tip above still applies.

#define name Resource

would be the appropriate thing to do if you are using a version of FX composer that uses "Resource" instead of "ResourceName"

E Unibus Plurum
Ideajuice
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Cyberspace.. out near the edge
Posted: 17th Apr 2004 04:50
OK.. that seemed to help but it didn't really. It keeps FX Composer from complaining about you changing the names in the FX file, but on the other hand it means that darkbasic doesn't understand how to load the textures anymore.

Apologies for the false information.

I did however come up with a useful tip on getting some of the shaders that don't work to work.

I was trying to get the Metallic Flakes shader working, and in the end it seems that procedural textures don't get initialized properly.

But if you have FX composer, you can right click on a procedural texture in the preview window and just save it as a .dds file. I did this with the procedural noise texture used in the metallic flakes .fx file and now it's finally working.

After saving the .dds file from inside FX Composer as pnknoise.dds, I changed just this one part of the .fx file:

texture NoiseMap
<
string TextureType = "VOLUME";
string name = "pnknoise.dds";
int width = 32;
int height = 32;
int depth = 32;
>;

The second line used to read 'string function = "GenerateSparkle";'

I think this is one of the key things needed to make some of the non working effects to work.

E Unibus Plurum
las6
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 17th Apr 2004 16:54
umm.. that kinda beats the purpose of Using such shader that creates the textures on the fly.


| Keyboard not detected. Press F1 to continue. |
Ideajuice
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Cyberspace.. out near the edge
Posted: 17th Apr 2004 17:35
Well it wasn't me who 'defeated the purpose' of procedural textures... DarkBasic doesn't seem to support them, so I am just posting a workaround that might help other people actually use these things.

And the textures may be created 'on the fly' as you say, but it's only done once when the texture is loaded, and after that the same texture is used over and over again. The texture is not regenerated on a per pixel or per vertex basis.

Some of the shader examples in fact have 'ifdefs' in them that do pretty much the same thing.. substitute a static texture for a procedural, and if you examine the shader FX examples that come with FX composer you will notice that pretty much all of the effects that use procedural shaders simply generate a fixed size texture using a formula of some sort in which all of the numbers and constants are predefined.

And the fact is that I have working shaders here that did not work at all before. You can't tell the difference between the ones that create (static) textures 'on the fly' in FX composer, and the ones that use exactly the same textures loaded from a file.

If you have shaders that use procedural textures working the way they are supposed to.. please share. I would love to use them the way they are supposed to be used.

How do you tell DarkBasic which texture to generate the procedural texture into? How do you tell DarkBasic that you have changed one of the textures and get it to reload or otherwise use your new texture? How do you generate a 3 dimensional volume texture from within DarkBasic?

E Unibus Plurum
las6
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 19th Apr 2004 09:11
Quote: "And the fact is that I have working shaders here that did not work at all before. You can't tell the difference between the ones that create (static) textures 'on the fly' in FX composer, and the ones that use exactly the same textures loaded from a file."


except that you have to store the static texture with the app. whereas shader takes only few kb's max as it's only text, the texture will take a lot more. and if there are many such textures...
and what about shaders that create model specific textures?


| Keyboard not detected. Press F1 to continue. |
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 19th Apr 2004 09:51
Quote: "(I hear they are buying tutorials)"


Only ones about the DBP language though.


Quote: "they stopped"


Where'd you hear that? As far as I know, APEXnow is still reviewing tutorials and editing them.


"Computers are useless they can only give you answers."
Ideajuice
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Cyberspace.. out near the edge
Posted: 19th Apr 2004 16:38
Quote: "except that you have to store the static texture with the app. whereas shader takes only few kb's max as it's only text, the texture will take a lot more. and if there are many such textures...
and what about shaders that create model specific textures?"


I understand quite well why procedural textures are good, and what the disadvantages of replacing them with fixed textures are.

But you don't seem to understand that they don't work in DarkBasic.

The bottom line is that if you have beefs about the way DarkBasic handles effects files, you need to take it up with Lee Bamber, not me.

And if you don't think what I posted is helpful.. keep in mind it is just your opinion. I disagree with your opinion, and I'm sure other people do too.

E Unibus Plurum
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 19th Apr 2004 16:49
@Neophyte: I would be happy to host such a thing for you. Email me with any details, questions, etc...

adam@mighty-atom.com
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 20th Apr 2004 00:31
Quote: "Where'd you hear that?"

i offered to write one for them and they said that they don't buy them anymore...


Formerly known as "DarkWing Duck"
Orro
20
Years of Service
User Offline
Joined: 20th Apr 2004
Location:
Posted: 21st Apr 2004 07:26 Edited at: 21st Apr 2004 07:32
Hi

I am trying to use Flame HLSL that this in the FX-Composer, will be that it could help me? what this making a mistake? it this not presenting nothing



PS. I modified in file fx string Resouce for String name
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 21st Apr 2004 12:20
@las6 and TheOneRing

Thanks for the offers to host. I really appreciate it. I'll start thinking about how to organize this pdf file now.

@Raven

With regards to the Nvidia cards being able to support PS 1.4 we've had this discussion before. The Geforce 4 series is powered by the nfiniteFX II engine and that only supports PS 1.1, 1.2, and 1.3.
http://www.tomshardware.com/graphic/20020206/geforce4-03.html
Quote: "NVIDIA was also able to improve the pixel shader functionality of GeForce4 Ti.
The new chip supports pixel shaders 1.2 and 1.3, but not ATi's 1.4 extension."


The later version of the Geforce 4 series, Geforce 4 ti 4800, is just a souped up version of the Geforce 4 ti 4600 and as such doesn't support PS 1.4. The Geforce ti 4900 doesn't exist. I don't know where you got that number but I've never heard of it and it isn't on Nvidia's site.

As for the Geforce FX series and its support of PS 1.4, I plan on getting a Geforce 5900 soon so I'll put this issue to rest personally. I will add the Geforce 6 to the list though.

As for the extensions to the 2.0 shader models, I'm not quite sure where to place them. According to nvidia, the second generation CineFX engine supports these extensions and can be found in the Geforce 5700 and 5900. However, they don't mention the 5800 at all and my source here says that it supports these extensions.
http://www.tomshardware.com/graphic/20030512/geforce_fx_5900-05.html

I'll asssume that the 5700 and up support the new extensions to the shader 2.0 model with the exception of the 5800, for now as that is what the evidence seems to indicate.
Quote: "...based on the FX 5800(NV30) design."

Here we see that the 5800 doesn't have CineFX 2.0.
Quote: "NVIDIA claims that cards with CineFX 2.0 (NV 35/36/38) are twice as fast as those with CineFX 1.0 (NV 30/31/34)."

Here we see that both the 5700 and 5900 do have CineFX 2.0.
Quote: "The new FX 5700 (NV36), on the other hand, traces its roots back to the more modern 5900 (NV35), "

And now the lynch pin where it all comes together. The CineFX 2.0 engine and the introduction of VS 2.0+ and PS 2.0+. I won't quote the whole thing so I'll just provide a link.
http://www.nvidia.com/object/feature_cinefx.html

From what I can determine, NV 35(5900), NV 36(5700), and NV 38(5950), support the 2.0 extensions via the CineFX 2.0 engine. I'll take a guess and say that the NV 40(6000) supports them as well also.

As for the ATI cards:

The 8500 supports VS 1.1, and PS 1.1, 1.2, 1.3, and the then new 1.4. I don't know what you mean by "VS 1.x" as there was only one version of the vertex shader spec at the time(not counting VS 1.0 which was never really implemented in hardware) so I'll assume its just a typo on your part and you meant PS 1.x.

As for the rest of the Radeon series I can't begin to comment on how totally wrong all of this is.

9000 - VS 1.1, PS 1.1, 1.2, 1.3, 1.4
http://www.tomshardware.com/graphic/200207181/index.html

As the 9200 card is a DX 8.1 like the 9000, I doubt that its specs are much different.

9500/9600 - VS 1.1, 2.0 PS 1.x, 2.0
http://www.tomshardware.com/graphic/20030306/radeon9800pro-04.html

9700/9800 - VS 1.1, 2.0 PS 1.x, 2.0
http://www.tomshardware.com/graphic/20030306/radeon9800pro-02.html

I'm not sure whether to include the non-mainstream cards in the list as I doubt they are worth listing as few people have them. I might include them later if I feel like it or someone says they have one.

@Ideajuice

Thanks for posting the tip about the procedural textures. Unfortunately, I don't have the hardware to run them as I have a lowly Geforce 4 ti 4200 and it only supports PS 1.3 at most. So I'm afraid I'm in a bit of a bind when it comes to figuaring out how to get them to work with DBPro. You'll have to talk to lee bamber about any problems that you run into with regards to procedural textures and DBPro. I'll email him if I get the time and work up a (hopefully) working example of the problem, but you should probably email him too. More people reporting the problem means its likely to be fixed sooner.

@Orro

What graphics card do you have? I took a look at the Flame shader that came with FX Composer and it needs PS 2.0 to run. If you have older hardware that doesn't support PS 2.0 then you won't be able to see it.
las6
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 21st Apr 2004 15:00
Orro, upload it and I can test it for you. I have a PS 2.0 compliant card. (9600 pro) But then again if it works for you in the FX composer...


| Keyboard not detected. Press F1 to continue. |
Ideajuice
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Cyberspace.. out near the edge
Posted: 21st Apr 2004 16:31
Some of the effects that use procedural textures are relatively low in terms of their other requirements.

The 'msmetallicflakes' shader is a good example of that. It only requires PS_1_1 and VS_1_1, but it does use a procedural noise texture, so if you wanted to play around you could try that one.

E Unibus Plurum
Orro
20
Years of Service
User Offline
Joined: 20th Apr 2004
Location:
Posted: 21st Apr 2004 17:44
@Neophyte

I have Nvidia GeforceFX 5200, for the document it I support VS 2.0 and PS 2.0, some new suggestion?


@Ias6

Here he has as to make upload?


@Ideajuice

I will go to make this test, but it would like to use flame.fx for a demo.

Tanks to all
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 21st Apr 2004 22:51
Neophyte don't be a moron all your life.
We have been through the Geforce 4 Ti 1.4 issue, I believed they ALL supported 1.4 as my 4800 did, as did other peoples. But what was found was ONLY the 4800 supported it.

As for you not knowing what the 4900 is then that's probably because your blind.

http://www.nvidia.com/page/geforce_pcx.html

Geforce PCX 4300 = Geforce 4 Mx PCX
Geforce PCX 4900 = Geforce 4 Ti PCX

As for your reference. Quite frankly I'm not even going to follow the links. Why don't you try looking from the ACTUAL hardware manufacturers for once. Perhaps then you'd know what their hardware CAN and CANNOT achieve.

Also yes i made a mistake on my stuff as i put they use 1.3 instead of 1.4 which is what they use.

I want to know, HOW can the 8500 use 1.3/1.4 when it was released BEFORE the Geforce 3 was released?
It uses 1.0/1.1 end of story, it was ATI's first shader card; Geforce 2 GTS was NVIDIA's

9000-9500 & 9700 use SmartShader 1.0 ... PS 1.0/1.1/1.4 VS 1.0/1.1
9600/9800 use SmartShader 2.0 ... PS 1.x/2.0 VS 1.x/2.0
9600/9800 use SmartShader 2.1 ... PS 1.x/2.0 VS 1.x/2.0

That is direct from ATI.com on SmartShader, I believe them over Tom's Hardware. Especially considering this is also what test I have personally had to carry out over the years have also revealed.

Just because no one uses 1.0 anymore DOES NOT mean that it does not exist!

9700 does not use Shader 2.0, a good reason behind this is probably the fact it was released BEFORE Shader 2.0.


Athlon64 FX-51 | 1.5Gb DDR2 PC3400 | GeForce FX 5900 Ultra 56.60 | DirectX9.1 SDK | Audigy2 | Windows XP 64-Bit
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 22nd Apr 2004 04:17
@Ideajuice

Thanks for the heads up on that shader. I'll check it out later when I get the time.

@Orro

I'll check out the shader later and see if I can get an example to work. I don't have the hardware to run it so whatever I produce will have to be tested by someone else.

@Raven

Neophyte don't be a moron all your life.

You have no idea how much you amuse me when you say those things. The irony brings a smilie to my face everytime.

We have been through the Geforce 4 Ti 1.4 issue, I believed they ALL supported 1.4 as my 4800 did, as did other peoples. But what was found was ONLY the 4800 supported it.

Nice revisionist history you have going there Raven. But you are the only one who claimed that the Geforce 4800 was PS 1.4 capable. And no, it wasn't found that the 4800 supported it. Here is the thread in question to jog your memory.
http://darkbasicpro.thegamecreators.com/?m=forum_view&t=8191&b=1

As for you not knowing what the 4900 is then that's probably because your blind.

http://www.nvidia.com/page/geforce_pcx.html


There is no 4900 on that page kid. There is a 4300, 5300, 5750, and 5950. And you called me blind! You just linked yourself to a page that showed you were wrong! F'ing Priceless!


*wipes tears from eyes*

I swear you are the funniest person I've ever met on the internet, Raven. It just doesn't get any better than that.

As for your reference. Quite frankly I'm not even going to follow the links.

How typical.

Why don't you try looking from the ACTUAL hardware manufacturers for once. Perhaps then you'd know what their hardware CAN and CANNOT achieve.

If you'd have bothered to follow my links you would have noticed that I did with that one concerning CineFX 2.0.

Also yes i made a mistake on my stuff as i put they use 1.3 instead of 1.4 which is what they use.



Do my eyes decieve me? Is Raving Raven actually admitting that he was wrong??! That's it. Its offical. Hell has frozen over.

I want to know, HOW can the 8500 use 1.3/1.4 when it was released BEFORE the Geforce 3 was released?

Because it wasn't. Take a look at this:
Quote: "SANTA CLARA, CA - OCTOBER 18, 2001 - NVIDIA® Corporation "

Quote: "NVIDIA's add-in card partners have stocked retail shelves with graphics boards based on the GeForce2 Ti, GeForce3 Ti 200 and GeForce3 Ti 500 GPUs."

So here we see that the Geforce 3ti is in stores on October 18, 2001.
http://www.nvidia.com/object/IO_20011017_6841.html

Now it appears that ATI released their card before Nvidia:
Quote: "Tuesday, October 9, 2001 "

Quote: " announced today that the RADEON™ 8500 graphics board, the world’s fastest and most technologically advanced graphics board available, and the foundation for ground-breaking visual effects, is shipping to retail outlets worldwide at a manufacturers’ suggested retail price (MSRP) of just (US) $299. "

I'd also like to point out this:
Quote: "SMARTSHADER™, an advanced technology that is the first application of its kind to take advantage of Microsoft’s new DirectX 8.1 specification, including supporting Pixel Shaders Versions 1.2 - 1.4"

http://mirror.ati.com/companyinfo/press/2001/4418.html

But, according to this October 16 article no members of the press had even seen a sample yet. Tile: ATi's Radeon 8500 Is Final Or Something Like That ...
http://www.tomshardware.com/graphic/20011016/index.html
Quote: "ATi announced Radeon 8500 on October 9, 2001, and claimed that the cards are shipping, but at this time nobody of the press had even seen a sample. "

This article was written hastily as a result of getting the Radeon sample cards very late. The reviewers, which normally get hardware in advance, didn't even have the hardware till around October 16. Two days before Nvidia announced that their Geforce 3s were in stores now. I'd also like to draw your attention to the summary:
Quote: "A week after ATi's announcement that claimed Radeon 8500 is shipping, final Radeon 8500 cards were all over a sudden rushed to the online press."

So if reviewer's hadn't recieved a copy of the cards yet you can be damn sure that there was no way those cards were in stores. So unless they magically got into stores within three days, Nvidia had their Geforce 3 out first. But since its a real close call, I'll be generous and say that both cards came out at around the same time.

However, I did quote ATI as saying their 8500 supported PS 1.2 - 1.4 of the new Dx 8.1 spec. Which makes you look all the more of the fool for suggesting otherwise.

It uses 1.0/1.1 end of story, it was ATI's first shader card; Geforce 2 GTS was NVIDIA's

Although that was ATI's first shader card the Geforce 2 GTS was not Nvidia's.
Quote: "GeForce2 GTS support for the DirectX 7 API "

http://www.nvidia.com/object/IO_20010809_4802.html
Shaders weren't introduced until Dx 8.

As I stated above, the Geforce 3 ti is Nvidia's first shader capable card.
http://www.nvidia.com/object/IO_20011106_6172.html
Quote: "NVIDIA's GeForce3 graphics processing unit, featuring NVIDIA's Shader Technology, marks the first time that game developers have been able to take advantage of the numerous real-time special effects and custom looks that programmable graphics hardware offers,"


9000-9500 & 9700 use SmartShader 1.0 ... PS 1.0/1.1/1.4 VS 1.0/1.1
9600/9800 use SmartShader 2.0 ... PS 1.x/2.0 VS 1.x/2.0
9600/9800 use SmartShader 2.1 ... PS 1.x/2.0 VS 1.x/2.0

That is direct from ATI.com on SmartShader, I believe them over Tom's Hardware.


So why exactly didn't you link to ATI's site where it stated such?

Oh wait...

Radeon 8500 - SmartShader 1.0 PS 1.1-1.4 VS 1.1
http://www.nvidia.com/object/IO_20011106_6172.html
Quote: "Major technological advancements include TRUFORM™, an innovative rendering technology that helps to deliver the smoothest, most natural 3D images ever seen on existing and next-generation 3D games; and SMARTSHADER™, an advanced technology that takes advantage of Microsoft’s new DirectX 8.1 specification, including supporting Pixel Shaders Version 1.4 to enable more complex and realistic texture and lighting effects without sacrificing performance."


Radeon 9000 - SmartShader 1.0 PS 1.1-1.4 VS 1.1
http://mirror.ati.com/companyinfo/press/2002/4517.html
Quote: "RADEON 9000 and RADEON 9000 PRO feature industry-leading technologies, including quad-pipe architecture, with four parallel rendering pipelines; programmable pixel and vertex shaders, powered by SMARTSHADER™, allowing mainstream users to benefit fully from Microsoft® DirectX® 8.1 for the first time"


Radeon 9500/9700 - SmartShader 2.0 PS 1.x 2.0 VS 1.1 2.0
http://www.ati.com/products/radeon9500/radeon9500pro/faq.html
Quote: "Q5: What are the 3D features released in SMARTSHADERâ„¢ 2.0 for the RADEONâ„¢ 9700 and RADEONâ„¢ 9500 Series graphics cards? "

http://www.ati.com/developer/quotes/index.html
Quote: "HLSL and 2.0 pixel and vertex shaders are enabling us to make our games visually stunning, taking advantage of RADEON 9500 and 9700 advanced programmable engines.""

Quote: "HLSL and 2.0 pixel and vertex shaders are enabling us to make Lejendary Adventure visually stunning. We are taking full advantage of RADEON 9500 and 9700 advanced programmable engines.""


Radeon 9800 - SmartShader 2.1 PS 1.x 2.0 VS 1.1 2.0
http://mirror.ati.com/products/radeon9800/index.html
Quote: "SMARTSHADERâ„¢ 2.1 enables 128-bit full floating point precision for hyper-realistic imagery."


...guess that was why, huh?

Especially considering this is also what test I have personally had to carry out over the years have also revealed.

Right. Are they the same test that confirmed every card in the Geforce 4 series had PS 1.4?

Just because no one uses 1.0 anymore DOES NOT mean that it does not exist!

I never stated it didn't. In fact, I said it did exist but only in the horrible Geforce 4 mx.
Quote: "A special note about Geforce 4 MX:
This is the one card that breaks the rule of newer cards supporting the profiles of older cards. This card doesn't support any of the pixel shader profiles and it only supports VS 1.0 which was a vertex shader profile that was never intended to be used in graphics hardware. "


Since even the first shader capable card, Geforce 3, supports VS 1.1 at minimum, I don't see much point in talking about VS 1.0. VS 1.1 is a superset of VS 1.0 and as such any reference to VS 1.1 can safely include 1.0.

9700 does not use Shader 2.0, a good reason behind this is probably the fact it was released BEFORE Shader 2.0.

You continually amaze me at how ignorant about shaders you are. Just when I think you can't get any dumber you open your mouth and remove all doubt.

Face it Raven. You don't know jack about shaders and I do. I've been arguing with you about shaders for over a year and I've beaten you every time. Honestly, what makes you think that you can beat me? You must know that I'll win. I always do. So why continue? Why humiliate your self with these public displays of gross ignorance? Are you some kind of masochist that gets his kicks out of public humilation?

I mean, here you are accusing me of being blind and not reading their site and you go and link directly to a page that contradicts what you are saying. You scream at me to:
Quote: "Why don't you try looking from the ACTUAL hardware manufacturers for once. Perhaps then you'd know what their hardware CAN and CANNOT achieve."

and then I quote from the ACTUAL hardware manufacturers showing how everything you say is wrong. And not just wrong in the mild sense of the word. But completely out in left field. You weren't even close to being right. And on top of all this you have the audacity to call me a moron?

How stupid and utterly self absorbed must you be to make these accusations?

Get lost Raven, and come back when you get a clue.

Maybe then I wouldn't have to hold your hand like a child and teach you the basics of shaders.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 22nd Apr 2004 08:25
Screw it, i'll let you make you own mistakes.
You want to believe that the 8500 is capable of Hardware 1.4 then do so.
You want to believe that the 9700 is capable of Hardware 2.0 then do so.
You want to believe a whole host of the things to do with shaders then do so. Quite frankly I'm tired of this, you don't want to believe there is a Geforce 4900 PCX even though it is on the Geforce 4 section then do so...

i really don't give a damn anymore.
as for teaching me the basics of shaders, kid you've taught me nothing; in-fact i would've suggested if you were even half-way intelligent that rather than trying to argue with me you sat down and listened.
No one says you have to agree with what i say... that is entirely upto you, but at the end of the day whilst you've gone around quoting sites and aruging with me;
I've not only shown working shaders in DBP, but i've also helped others to develop them and understand them better as well.

Regardless of hardware and/or software readme's i've helped people get these things working and appearing how they should.
And what you have so far contributed is nothing but aggrovation on the subject and this tutorial which quite frankly is something that is going to zoom right over the heads of almost everyone who doesn't already have basic knowlage.


Athlon64 FX-51 | 1.5Gb DDR2 PC3400 | GeForce FX 5900 Ultra 56.60 | DirectX9.1 SDK | Audigy2 | Windows XP 64-Bit
las6
21
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Finland
Posted: 22nd Apr 2004 09:33 Edited at: 22nd Apr 2004 09:39
Quote: "Why don't you try looking from the ACTUAL hardware manufacturers for once."


let's take a look, shall we?

first you give us this link to prove that 4900 exists:
http://www.nvidia.com/page/geforce_pcx.html
then you say it's under the Geforce 4. Well, I checked that out for you, and here are the pages:
http://www.nvidia.com/page/geforce4go.html
http://www.nvidia.com/page/geforce4mx.html
http://www.nvidia.com/page/geforce4ti.html
and the last one kinda tells you everything you need to know..

well, since manufacturer pages can't prove anything, here's what you could find with google:
http://www.google.fi/search?q=geforce+4900&ie=UTF-8&oe=UTF-8&hl=fi&lr=lang_en%7Clang_fi
Please do check the first link. see that nvidia 4900 in it? Turns out it was a typo, and their actually referring to 4600.

but this has got to be the best site ever:
http://bbspot.com/News/2003/02/ati_ascii.html

It would explain a lot if bbspot.com would be your main source of information, Raven.


| Keyboard not detected. Press F1 to continue. |
Eric T
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location: My location is where I am at this time.
Posted: 22nd Apr 2004 09:47
Quote: "You want to believe that the 8500 is capable of Hardware 1.4 then do so.
You want to believe that the 9700 is capable of Hardware 2.0 then do so.
"



Actually to get into specifics The 8500 LE has support for 1.0 1.1 and 1.4

and the 9700 base and sapphire have support for 2.0

(you may want to start checking manufacters boxs before pulling this up... cause i happen to have both [in which i am using the 9700 spahire as we speak)


anyway... back to the conversation

"I like you... when the world is mine, you death shall be quick and painless"
Current good thing: The Apprentice
Former name : Liquidz_Snake
AlecM
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 22nd Apr 2004 09:54 Edited at: 22nd Apr 2004 09:55
Las6: don't bother. Nvidia is a religion for Raven so he will ignore logic whenever he needs to.

Raven: Do you ever wonder why it's always you vs. the rest of the world? Maybe its not us?


EricT: this is unrelated, but what color is the PBC on your sapphire 9700?

Eric T
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location: My location is where I am at this time.
Posted: 22nd Apr 2004 10:02
mine is red....ugly red

"I like you... when the world is mine, you death shall be quick and painless"
Current good thing: The Apprentice
Former name : Liquidz_Snake
AlecM
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 22nd Apr 2004 10:04
thats actually lucky. Sapphire was doing OEM 9700/pros for a while that had black PBC. alot of them had some real problems because they used cheap memory modules. Mine was one of them there was a 20 page thread on there forums about it at the time.. i got my money back and got my current radeon baby.

Eric T
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location: My location is where I am at this time.
Posted: 22nd Apr 2004 10:14
yeah I heard about that black thing awhile back....twas a shame really... 9700 sap is a nice card IMO, plays Halo nicely...heh

"I like you... when the world is mine, you death shall be quick and painless"
Current good thing: The Apprentice
Former name : Liquidz_Snake
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 22nd Apr 2004 10:46
@Raven

Screw it, i'll let you make you own mistakes.

That's right. You just keep telling yourself that I'm wrong and maybe I'll go away.

You want to believe that the 8500 is capable of Hardware 1.4 then do so.
You want to believe that the 9700 is capable of Hardware 2.0 then do so.
You want to believe a whole host of the things to do with shaders then do so. Quite frankly I'm tired of this, you don't want to believe there is a Geforce 4900 PCX even though it is on the Geforce 4 section then do so...


I take it this is your way of dodging the fact that I've just conclusivly proven you to be wrong. Too bad its not gonna work. Everyone who has read this thread by now knows how much of an idiot you are. I mean, linking to a page that proved you wrong? How much more boneheaded can one get?

i really don't give a damn anymore.

I remember a time when you said you'd leave the "shader dictating" to the pros. You haven't kept that promise and I doubt you'll honestly keep this one. You'll still butt head's with me over the shader issue in the future and I'll still beat you. Things like that never change.

as for teaching me the basics of shaders, kid you've taught me nothing;

I'm not surprised. You are as thick as a concrete block.

in-fact i would've suggested if you were even half-way intelligent that rather than trying to argue with me you sat down and listened.

Here it comes. The I'm-superior-to-you-because-of-such-and-such speech.

No one says you have to agree with what i say... that is entirely upto you, but at the end of the day whilst you've gone around quoting sites and aruging with me;
I've not only shown working shaders in DBP,


I can't remember a single instance of you actually posting a working shader that ran in DBPro. I've seen you make several attempts at posting a working shader but they were always bugged. The only one I can remember was an extremly simple pixel shader you posted in the code snippets section along time ago. It consisted of two instructions and basically mulitplied and added a fragment to itself. That was it. In fact, I think it was slightly modified copy from the old help files. It was only different by one instruction.

Of course, I've posted a working bumpmapped reflection shader, along with an accompying tutorial and plan on posting more. So really you have nothing to brag about. In fact, compared to me, you've got a lot of catching up to do.

but i've also helped others to develop them and understand them better as well

You mean like I'm doing right now? Oh wait. In order to actually help them like me, you'd first have to have some clue as to what you are doing, wouldn't you?

And what you have so far contributed is nothing but aggrovation on the subject and this tutorial which quite frankly is something that is going to zoom right over the heads of almost everyone who doesn't already have basic knowlage.

I love the double think you put yourself through. Here you are, desperately trying to sound superior to me, and the only thing you can come up with is some sort of vague claim to help people with shaders; all the while my tutorial, which will be a series by the way, is staring you in the face.

Face it, I'm doing more to help people learn shaders than you ever have. I've got a tutorial up with working source code and I'll be posting another one tomorrow if time permits.

And as a parting shot, maybe you should take the advice of this guy:
Quote: "Why don't you try looking from the ACTUAL hardware manufacturers for once. Perhaps then you'd know what their hardware CAN and CANNOT achieve."
*snicker*
Eric T
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location: My location is where I am at this time.
Posted: 22nd Apr 2004 10:56
Quote: "The I'm-superior-to-you-because-of-such-and-such speech."


I always thought of it as more of the "ALL YOUR SHADERS BELONG TO I" speach


anyway this has been amusing... and the whole time i forgot to say

Nice tutorials Neo... gonna be helpful in the near future for me.

"I like you... when the world is mine, you death shall be quick and painless"
Current good thing: The Apprentice
Former name : Liquidz_Snake
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 22nd Apr 2004 18:32
Kinda sucks that this is heading towards flamebait. This thread is (or maybe was ?) useful. Shaders are a tough topic, and the more useful/easy resources we have, the better.

Lord Ozzum
20
Years of Service
User Offline
Joined: 29th Oct 2003
Location: Beyond the Realms of Death
Posted: 23rd Apr 2004 04:33
well, Neophyte, think I'll congratulate you! Never knew you coded as good as you argue

I'm just assuming this is good, because I don't have DB, but if it's stickied, it couldn't suck

Was Mr X

Welcome to the Electric Funeral!!! *creeps back into the Abyss*
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 23rd Apr 2004 13:05
@Eric T

"Nice tutorials Neo... gonna be helpful in the near future for me."

Thanks.

@TheOneRing

"Kinda sucks that this is heading towards flamebait."

Not really. Raven has left so things ought to return to normal now.

"This thread is (or maybe was ?) useful"

I just got done writing a tutorial on the binary encodings of the MOV instruction so next up is another shader tutorial. It'll probably be a media-less one as I have some source already for a medialess shader. Hopefully, within a day or two I'll be able to get it posted.

@Lord Ozzum

"well, Neophyte, think I'll congratulate you! Never knew you coded as good as you argue"

Well...arguing is my favorite past time. Especially when its with Raven.
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 27th Apr 2004 01:09 Edited at: 27th Apr 2004 07:57
Sorry for being late with this. I ran into a bug within DBP's array system.

Anyway, as requested, a media-less shader with full DBPro source code.

The shader in question is the per-vertex Goochy lighting model. It shades everything with Warm and Cool tones on a vertex by vertex basis. Its one of the few per-vertex shaders out there that will light a low poly object rather well. The code for the shader is here:


The accompanying DBPro program will allow you to modify the effect constants in real time and see the result. The DBPro source is here:


Instructions:

Press the Upkey/Downkey to Increment/Decrement the LiteColor.
Press the LeftKey/Rightkey to Increment/Decrement the DarkColor.
Press the W/S keys to Increment/Decrement the WarmColor.
Press the A/D keys to Increment/Decrement the CoolColor.
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 27th Apr 2004 01:23
"The effect does not exist at line 4"

??
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 27th Apr 2004 01:50
You'll have to copy and paste the effect into notepad and save as goochy.fx. Also, make sure that the effect file is in the same directory as the project. Sorry for leaving those last steps out.
TheOneRing
20
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 27th Apr 2004 03:16
Already did that. No workey.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Apr 2004 04:57
TheOneRing... go into your .fx and manually put a '/' right at the start of the file.
The genius forgot to Ctrl-C properly

His print out command also don't work (atleast not in 1.05.2)
But it does work, after the .FX edit


AthlonXP 2500+ | 256MB DDR PC2700 | GeForce FX 5700 60.18 | DirectX 9.0b | CMedia 8620 | Windows XP Professional
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 27th Apr 2004 08:02
@Raven

"The genius forgot to Ctrl-C properly "

Heh, even geniuses make mistakes from time to time.

"His print out command also don't work (atleast not in 1.05.2)"

I believe I stated in the source as much.

DBPro's array delete element command is busted. It ends up wiping the first element to zero after it has deleted the specified element. It also rearranges the order of the elements after that. It was just recently confirmed as a bug.

http://darkbasicpro.thegamecreators.com/?m=forum_view&t=30466&b=15
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 27th Apr 2004 11:20
Slight update:

I've emailed lee concerning the bug with Procedural textures not getting generated. Hopefully, he'll respond within a couple days and I'll post another update on that issue.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 27th Apr 2004 11:33
It wasn't the array that was the problem. The entire function itself doesn't work even if you set it as a static array.
Considering you know what data your working with it is possible to make a static array.
Which is more speed efficient anyways, infact there are alot of things in your example which kill speed.

If you bothered to do some procedual texture tests, in both FX and ASM you'd understand alot more about the functionality in this area rather than bothering Lee.


AthlonXP 2500+ | 256MB DDR PC2700 | GeForce FX 5700 60.18 | DirectX 9.0b | CMedia 8620 | Windows XP Professional
Neophyte
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 27th Apr 2004 11:53
@Raven

"It wasn't the array that was the problem."

I never said it was.

Quote: "DBPro's array delete element command is busted."


from the source:
Quote: "`^^^^^KNOWN BUG^^^^^^^^^^^^^.
`As of DBP U5.2 array delete element deletes
`an element and makes the first element in the
`list set to zero. Then it reverses the order of
`all of the elements there after. As a result, one
`of the display spaces occupied flag doesn't get set
`to zero like it should. Also, that means that when
`ever an element is removed from the print list, it
`takes whatever element is at the start of the list
`withit because the TimeToTerminate field is set
`to zero and is thus <= FrameTime."

Check the link I provided. It takes you straight to the bug report forum where I reported this bug and it was confirmed. There is even example code that illustrates the problem.

"Considering you know what data your working with it is possible to make a static array."

I know that. I didn't want a static array though. I wanted a dynamic array capable of handling varying amounts of data. I plan on reusing that code in later examples. Something I couldn't do if I hard coded the size and parameters of each array item.

"Which is more speed efficient anyways, infact there are alot of things in your example which kill speed."

I'm not aiming for speed. I'm aiming for flexibilty and easy to read code(you did notice how I commented practically every line in there didn't you?).

"If you bothered to do some procedual texture tests, in both FX and ASM you'd understand alot more about the functionality in this area rather than bothering Lee."

Raven, shut up. You don't know jack. Procedural textures aren't getting generated by DBPro. Hence, the bug report. But if you think that you can do it and I can't then, please, put your money where your mouth is and post a working example of procedural textures being generated within DBPro.

Here, I'll give you a head start:

That is the source code to display the msmetallicflakes.fx file from the FX Composer. It loads and displays just fine, minus the sparkles which should be generated and visible on the surface of the sphere.

The shader in question is here:

You'll need the "default_reflection.dds" that came with FX Composer in the same directory as the shader.

If you want to know how it should look, check it out in FX Composer which I'm sure you have.

You should also notice how I set all of the effect constants properly. For a complete list of what needs to be set uncomment the remstart-remend block to see the needed variables printed to the screen.

Login to post a reply

Server time is: 2024-04-26 23:29:52
Your offset time is: 2024-04-26 23:29:52