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 / Vertex Shader commands

Author
Message
haggisman
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th Aug 2002 18:57
would it be possible for someone to post some information about these commands?

SET VERTEX SHADER MATRIX
SET VERTEX SHADER STREAM
SET VERTEX SHADER STREAMCOUNT
SET VERTEX SHADER VECTOR
Specs:- 1GHZ athlon, Radeon8500, 192mb ram
DSG
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Hampshire, England
Posted: 27th Aug 2002 19:16
SET VERTEX SHADER MATRIX
This command will select the matrix to be used by the specified vertex shader.

SYNTAX
SET VERTEX SHADER MATRIX VertexShader Number, Constant, Matrix4, ConstantCount


SET VERTEX SHADER STREAM
This command will set a vertex shader stream for the specified vertex shader. The stream index must start
from one, being the first stream into the shader. The Data is specified using one of the following values,
which relate to the FVF Format code you would use to convert your object prior to using a
shader:VSDE_POSITION=FVF_XYZ=0, VSDE_BLENDWEIGHT=FVF_XYZRHW=1,
VSDE_BLENDINDICES=FVF_XYZB1=2, VSDE_NORMAL=FVF_NORMAL=3, VSDE_PSIZE=FVF_PSIZE=4,
VSDE_DIFFUSE=FVF_DIFFUSE=5, VSDE_SPECULAR=FVF_SPECULAR=6, VSDE_TEXCOORD0=FVF_TEX0=7,
VSDE_TEXCOORD1=FVF_TEX0=8, VSDE_TEXCOORD2=FVF_TEX0=9, VSDE_TEXCOORD3=FVF_TEX0=10,
VSDE_TEXCOORD4=FVF_TEX0=11, VSDE_TEXCOORD5=FVF_TEX0=12, VSDE_TEXCOORD6=FVF_TEX0=13,
VSDE_TEXCOORD7=FVF_TEX0=14. The Datatype is specified using one of the following values:

SYNTAX
SET VERTEX SHADER STREAM VertexShader Number, Position, Data, Datatype


SET VERTEX SHADER STREAMCOUNT
This command will set the vertex shader stream count for the specified vertex shader.

SYNTAX
SET VERTEX SHADER STREAMCOUNT VertexShader Number, Count


SET VERTEX SHADER VECTOR
This command will select the vector to be used by the specified vertex shader.

SYNTAX
SET VERTEX SHADER VECTOR VertexShader Number, Constant, Vector3, ConstantCount


If you are looking to develop either vertex or pixel shaders for your DBPro projects, you may be interested in the 'Shader Programming' series by Wolfgan Engel which you can find on GameDev ( http://www.gamedev.net - look under 'previously featured articles' ).

haggisman
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th Aug 2002 19:19
thanks for the info, just hoping to use it to convert some of the examples in ATI's rendermonkey to DBpro.

Specs:- 1GHZ athlon, Radeon8500, 192mb ram
GamzMan
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: M25
Posted: 28th Aug 2002 04:09
silly question but what are Vertex Shaders?

The smart one is always the quiet one
crawlin
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 28th Aug 2002 13:05
I think they allow you to apply special effects (lighting + texturing) to each vertex on the screen. The same with pixel shaders but on a per pixel level.

Someone correct me if i'm wrong

P4 1.6GHz - 256Mb DDR RAM - GeForce 2 MX400 - SoundMAX Integrated Sound - Windows XP Home

Login to post a reply

Server time is: 2024-04-20 15:36:27
Your offset time is: 2024-04-20 15:36:27