Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, juanex, Grant), 1,018 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
question about shader implementation #74131
05/13/06 18:39
05/13/06 18:39
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
hi there, i was once again trying to implement a displacementmapping and used tex2D(map,texCoord).x as a scaling factor. however, i get "Malfunction w1550 .. cannot map expression to vertex shader instruction set, ID3DXEffectCompiler::CompilerEffect.

this way of using a texture in the vertex shader (model 3.0) is shown all over in books so, why doesnt it work here?

another strange thing i found is the following code, which doesnt give any error, but doesnt work too,:

Code:

static float3 g[] =
{
1,1,0, -1,1,0, 1,-1,0, -1,-1,0,
1,0,1, -1,0,1, 1,0,-1, -1,0,-1,
0,1,1, 0,-1,-1, 0,1,-1, 0,-1,-1,
1,1,0, 0,-1,1, -1,1,0, 0,-1,-1
};

texture gradTexture
<
string texturetype = "2D";
string format = "q8w8v8u8";
string function = "GenerateGradTexture";
int width = 16, height = 1;
>;

float3 GenerateGradTexture (float p: POSITION) : COLOR
{
return g[p*16];
}

sampler gradSampler = sampler_state
{
texture = <gradTexture>;
AddressU = Wrap;
AddressV = Clamp;
MAGFILTER = POINT;
MINFILTER = POINT;
MIPFILTER = NONE;
};



when using the sampler lateron , something shoud be visible, but it isnt.

is this something i am doing wrong, or is shadermodel3.0 not fully supported by 3dgs?

if you feel this belongs to the shader forum, please move it over. i thought to put it here

thanks in advance for any info

Re: question about shader implementation [Re: ello] #74132
05/15/06 11:01
05/15/06 11:01
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
I'm moving this to the shader forum where the question probably can be better answered - compared to me, many users know lot more about shaders.

Error messages like above are often caused because not all register combinations are supported in lower shader models.

Shadermodel 3.0 is supported by 3DGS (if you give it in the vs_compile and ps_compile instructions).

Re: question about shader implementation [Re: jcl] #74133
05/15/06 11:26
05/15/06 11:26
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
ehm, vs_compile and ps_compile? i thought its only compile for both. i'll check that


Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1