Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/21/26 19:15
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 6,962 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 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: 28,074
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,074
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 | 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