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 / what's this shading stuff?

Author
Message
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 24th May 2003 01:24
1.what does this shading effect do?
2.how do i make those shading files?
3.if in use, will it drop fps?
Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 10GB HD, Riva TNT2 Ultra 32mb
AlecM
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 24th May 2003 05:42
:-s

Goto http://www.shellshockede.com
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 24th May 2003 12:35
i couldn't find anything on that site :/

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 10GB HD, Riva TNT2 Ultra 32mb
Neophyte
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 24th May 2003 13:10
@Mussi

"1.what does this shading effect do?"

I am assuming you are probably refering to programmable shaders, no?
In that case a shading effect would be whatever a vertex and\or pixel shader were programed to do. Vertex and pixel shaders are programs that run on your gpu. Not all video cards are capable of running them. Generally, if you have a geforce 3 ti or greater card you can run some(but, not all. I 'll get to that later) programmable shaders.

"2.how do i make those shading files?"

You would write your shader code into a text file. Then you would compile the code into machine readable form with either a compiler like NVASM(http://developer.nvidia.com/view.asp?IO=nvasm) or with DBPRO itself with the commands Create Vertex Shader from File or Create Pixel Shader From File. For examples on how to implement shaders in DBPRO just look up the previous commands in the help file an click on the "view usage example" link at the bottom. For tutorials on how to write shaders a good starting point would be here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndrive/html/directx04152003.asp

I should warn you in advance, however, that the only shaders that dbpro can compile are the ones written in ASM. If you see any reference to High Level Shading Languages be warned that, although you can compile the shaders and use the code in DBPRO in some cases, you can not compile it within DBPRO itself. DB only accepts ASM for now.

While I am on the topic of shaders that can and can not run in DBPRO let me introduce you to the concept of profiles. Certain pieces of hardware, most notably older ones, can only accept shaders that compile to or less than a maximum number of instructions. On top of that, the registers are of a different number than that of more recent hardware. These limitations are known as profiles. When you write a piece of code to a certain profile you have to stay with in the limitations of that profile so your shader runs on the hardware that supports that profile. If you don't then you will get an error when you try to compile it. The Profiles that DBPRO should support(since it runs and directx 8.1) are vertex shader profile version 1.1 and Pixel shader profile versions 1.1, 1.2, 1.3, and 1.4. I haven't tested all of these profiles on DBPRO but they should all work since they came with DirectX 8.1.

If you would like to know what profiles(older hardware generally supports the older as well as the newer profiles) your graphics card supports you should probably check its website for info. As a general rule of thumb, graphics cards around the time of the Geforce 3 ti support just the minimum with VS 1.1 and PS 1.1 and slightly older graphics cards like ATI's Radeon 8500 supporting VS 1.1 and PS 1.1, 1.2, 1.3, 1.4.

"3.if in use, will it drop fps?"

Generally speaking, no. In fact, if you use them right they should increase your fps because tasks that your cpu was normally burdened with can be off loaded on to the gpu. Most games are CPU limited meaning that most of the time the gpu is idleing waiting for the CPU to catch up. Making the GPU do a little more work probably won't hurt your performance at all and it will make your game look prettier.

I tried to cover all of the basics, but if I missed anything or you have any questions feel free to post them. I'll be glad to help or clear up any thing I have said.

Login to post a reply

Server time is: 2026-07-11 13:58:23
Your offset time is: 2026-07-11 13:58:23